Skip to content

fix(ui): update layout in PAT section to avoid overlaps & overflows #331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 28, 2025

Conversation

zamora-carlos
Copy link
Contributor

@zamora-carlos zamora-carlos commented Jun 27, 2025

Description

In the PAT section, the Get your token link overlaps the sample-repo buttons. The New badge and the PAT input also overflow due to the use of position: absolute. This pull request updates the styles in that section by removing absolute positioning while preserving a similar layout.

Closes #328

Changes

  • Replaced flex layout with CSS grid for more flexibility
  • Added custom styles to the PAT checkbox to better align with the overall design

Grid behavior

The grid layout is applied to the #controlsRow element, which contains three child components: Pattern type selector, max file size slider, and PAT section.

  • Default:

    • Single column layout (grid-cols-1)
    • gap-6 between items
  • sm screens:

    • Two columns with a 3:2 width ratio (grid-cols-[3fr_2fr])
    • Horizontal gap increased (gap-x-10)
    • Layout:
      • Pattern type selector in the first column
      • Max file size slider in the second column
      • PAT section spans both columns on the second row
  • lg screens:

    • Three-column layout with a 5:4:4 width ratio (grid-cols-[5fr_4fr_4fr])
    • Vertical gaps removed (gap-y-0) to avoid unnecessary bottom spacing
    • Layout:
      • Each component occupies one column
      • The PAT section spans two rows, while the other elements span only one. This trick allows the first two components to be vertically centered independently of the PAT section’s height.

Screenshots

The images were taken in Google Chrome, but I also verified that the layout looks the same in Safari. I included the UI with the checkbox both checked and unchecked.

Small screens

Screenshot 2025-06-27 at 12 49 13 a m Screenshot 2025-06-27 at 12 49 29 a m

Medium screens

Screenshot 2025-06-27 at 12 48 50 a m Screenshot 2025-06-27 at 12 48 34 a m

Large screens

Screenshot 2025-06-27 at 12 49 52 a m Screenshot 2025-06-27 at 12 50 09 a m

Copy link
Member

@cyclotruc cyclotruc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!
Exactly what we needed, nothing more, thanks a lot for your contribution @zamora-carlos

@cyclotruc cyclotruc merged commit b39ef54 into coderamp-labs:main Jun 28, 2025
18 checks passed
filipchristiansen pushed a commit that referenced this pull request Jun 28, 2025
…331)

* fix(ui): prevent overlaps and overflow by updating layout in PAT section of ingest form

* feat(ui): replace native checkbox styles with custom design

* fix(ui): add missing cursor-pointer styles to inputs in ingest form

* fix(ui): apply top margin to example repositories section if token is present
@coderamp-ci coderamp-ci bot mentioned this pull request Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(ui): “Get your token” link overlaps sample-repo buttons
2 participants