-
Couldn't load subscription status.
- Fork 180
fix: update button font size and padding to prevent overlap #985
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes UI layout issues on mobile devices (specifically iPhone SE) by adjusting various styling elements to prevent text and component overlapping.
Key changes include:
- Updated dropdown button font sizes and padding for better mobile display
- Modified mobile layout heights and overflow settings to prevent content clipping
- Adjusted icon sizes and positioning for responsive behavior
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| styles/global.scss | CSS formatting improvements and mobile height constraint fixes |
| src/components/ReferenceDirectoryWithFilter/index.tsx | Code formatting improvements and positioning adjustments |
| src/components/PageHeader/HomePage.astro | Responsive icon sizing and overflow visibility fixes |
| src/components/Dropdown/styles.module.scss | Mobile-specific font size and padding adjustments for dropdown buttons |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@coseeian please take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I built the PR locally and tested it using the iPhone SE simulator. The issue mentioned in #903 appears to be resolved.
Moving forward, I think it would be valuable to get some input from the site maintainers to ensure this approach aligns with long-term design patterns and accessibility goals.
| display: inline-block; | ||
| width: 100%; | ||
| // 0.75rem font-size for mobile to fit content in smaller screens | ||
| font-size: 0.75rem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some concerns regarding the approach of reducing the font size to fit the text within the container. While it solves the immediate constraint, it introduces a couple of problems:
-
Visual Consistency: The smaller text negatively impacts the visual aesthetics of the dropdowns. The text no longer appears to be vertically centered with the adjacent icons. And it leads to an unbalanced look between the text and icon sizes.
-
Readability/Accessibility: I think generally it's better to prioritize larger font sizes for better readability and visibility. Shrinking the text should generally be avoided solely to fix container constraints.
I suggest to explore adjusting the grid column width to leave more space for the dropdowns instead, as long as it aligns with the site's design style guide (if any). I recommend confirming this with the site maintainers.
| // 43px is the height of the top mobile bar menu | ||
| height: calc(50vh - var(--spacing-5xl) - 43px); | ||
| max-height: calc(50vh - var(--spacing-5xl) - 43px); | ||
| min-height: calc(50vh - var(--spacing-5xl) - 43px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious if there is any concern to remove the height/max-height/min-height CSS in this component?
Description
Fixed overlapping text and UI elements on p5.js mobile view (iPhone SE )
Fixes #903
Screenshots (if applicable)