Skip to content

fix: update button font size and padding to prevent overlap - #985

Merged
ksen0 merged 7 commits into
processing:mainfrom
hxrshxz:fix-overlap
Dec 22, 2025
Merged

ksen0 merged 7 commits into
processing:mainfrom
hxrshxz:fix-overlap

Conversation

@hxrshxz

@hxrshxz hxrshxz commented Oct 6, 2025 •

Copy link
Copy Markdown
Contributor

Description

Fixed overlapping text and UI elements on p5.js mobile view (iPhone SE )

Fixes #903

Screenshots (if applicable)

Before After


Copilot AI review requested due to automatic review settings October 6, 2025 08:16

Copilot AI left a comment

Copy link
Copy Markdown

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.

Comment thread styles/global.scss
Comment thread src/components/Dropdown/styles.module.scss Outdated
Comment thread src/components/Dropdown/styles.module.scss
@hxrshxz

hxrshxz commented Oct 13, 2025

Copy link
Copy Markdown
Contributor Author

@coseeian please take a look

@coseeian coseeian left a comment •

Copy link
Copy Markdown
Collaborator

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;

@coseeian coseeian Oct 26, 2025 •

Copy link
Copy Markdown
Collaborator

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 horizontally 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.

Comment thread styles/global.scss
// 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);

Copy link
Copy Markdown
Collaborator

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?

@hxrshxz

hxrshxz commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

final version
image

I reverted the font size change in the dropdowns. Instead, I adjusted the grid layout in the Settings component to allow the dropdowns to stack (full width) on mobile devices. This provides enough space for the content without compromising readability. Regarding the global SCSS, removing the fixed height/max-height was imp for this taller stacked layout on mobile, makeing sure the container grows dynamically to fit the content."

@ksen0

ksen0 commented Dec 22, 2025

Copy link
Copy Markdown
Member

Thanks @hxrshxz and @coseeian ! Design-wise, I believe this is an improvement.

@ksen0
ksen0 merged commit d3209ab into processing:main Dec 22, 2025
4 checks passed
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.

[Content] Overlapping Text and UI Elements on p5.js Mobile View

4 participants