Skip to content

Conversation

@hxrshxz
Copy link
Contributor

@hxrshxz hxrshxz commented Oct 6, 2025

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
Copy link

Copilot AI left a 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.

@hxrshxz
Copy link
Contributor Author

hxrshxz commented Oct 13, 2025

@coseeian please take a look

Copy link
Collaborator

@coseeian coseeian left a 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;
Copy link
Collaborator

@coseeian coseeian Oct 26, 2025

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);
Copy link
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?

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

2 participants