Skip to content

fix: make download model modal responsive and scale on small screens#246

Open
zylitoL wants to merge 1 commit intoCSSLab:mainfrom
zylitoL:download-model-modal-responsive-scaling
Open

fix: make download model modal responsive and scale on small screens#246
zylitoL wants to merge 1 commit intoCSSLab:mainfrom
zylitoL:download-model-modal-responsive-scaling

Conversation

@zylitoL
Copy link

@zylitoL zylitoL commented Feb 28, 2026

Enhance the DownloadModelModal to be robust across all screen sizes and content lengths, specifically addressing edge-case behavior on narrow and short viewports.

Mobile (375 x 667)

Before:

www maiachess com_analysis_7WCFYt0R_1(iPhone SE)

After:

localhost_3000_analysis_7WCFYt0R_1(iPhone SE)

Tablet (768 x 422)

Before:

www maiachess com_analysis_7WCFYt0R_1

After:

localhost_3000_analysis_7WCFYt0R_1

Laptop (1024 x 694)

Before:

www maiachess com_analysis_7WCFYt0R_1 (1)

After:

localhost_3000_analysis_7WCFYt0R_1 (1)

Key Functional Behaviors:

  1. Responsive Scaling (Width):

    • Replaced fixed heights with vertical padding (py-1.5 mobile / md:px-4 desktop).
    • Behavior: On narrow screens (e.g., 375px) where button text wraps, the button height scales naturally while maintaining consistent internal spacing. It no longer crowds the borders.
  2. Internal Scrolling (Height):

    • Added max-h-[90vh] and overflow-y-auto to the modal body.
    • Pinned Actions: The Header (Title) and Footer (Progress/Buttons) are pinned (flex-shrink-0).
    • Behavior: On short viewports (e.g., 768x422 landscape), the modal remains fully contained on screen. Only the middle description scrolls, ensuring the "Download" action is always visible and reachable.
  3. Smart Scrollbars:

    • Uses overflow-y-auto.
    • Behavior: The scrollbar is only injected by the browser when the content actually exceeds the available height.

@vercel
Copy link

vercel bot commented Feb 28, 2026

@zylitoL is attempting to deploy a commit to the Maia Platform Team on Vercel.

A member of the Team first needs to authorize it.

@zylitoL zylitoL force-pushed the download-model-modal-responsive-scaling branch from 6b7d463 to c119b10 Compare February 28, 2026 00:11
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.

1 participant