Skip to content

simplify page styling logic (fixes #3 #1)#5

Merged
RyanS4 merged 3 commits into
mainfrom
1-homepage-header-size-fix
Jun 29, 2026
Merged

simplify page styling logic (fixes #3 #1)#5
RyanS4 merged 3 commits into
mainfrom
1-homepage-header-size-fix

Conversation

@RyanS4

@RyanS4 RyanS4 commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Fixes #3
Fixes #1

  • Reduces reused code for mobile-specific text and header styling
  • Implements class-specific styling for navbar components
  • Implements screen size identifiers for style logic

Copilot AI review requested due to automatic review settings June 29, 2026 20:51

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 simplifies responsive styling by removing duplicated “mobile” component variants and instead applying breakpoint-based MUI sx styles to keep the Home header text and NavBar elements from overflowing on smaller screens.

Changes:

  • Replaced the separate mobile Home render path with responsive Typography sizing via MUI breakpoints.
  • Removed the separate mobile NavBar render path and centralized button/title styling into shared style objects.
  • Introduced breakpoint-driven sizing/margins intended to prevent text/nav overflow on small screens.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
green-day-website/src/Pages/Home.jsx Removes mobile-specific branching and uses responsive sx font sizing for the homepage header.
green-day-website/src/components/NavBar.jsx Removes mobile-only NavBar variant and introduces reusable styles for title/buttons.
Comments suppressed due to low confidence (2)

green-day-website/src/Pages/Home.jsx:12

  • Mobile-specific rendering was removed, but the imports for PageHeader, React, and useMediaQuery are now unused (and import { React } from 'react' is not a valid React import). This will trip linters and can cause bundler warnings/errors; please remove the unused imports.
    return (
        <Box sx={{ flexGrow: 1 }}>
            <NavBar />

green-day-website/src/components/NavBar.jsx:19

  • useMediaQuery is no longer used after removing the mobile-only NavBar path, so the react-responsive import is now unused. Please remove it to keep the file warning-free.
    navigate(page);
    }


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 37 to 39
ml: 0.5
}}
/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in the latest commit. The Toolbar now has flexWrap: { xs: 'wrap', sm: 'nowrap' } and the logo/title Box has width: { xs: '100%', sm: 'auto' }, so on small screens the logo and title occupy the full first row and the nav buttons wrap to the next line.

@RyanS4 RyanS4 merged commit 1762364 into main Jun 29, 2026
2 checks passed
@RyanS4 RyanS4 deleted the 1-homepage-header-size-fix branch June 29, 2026 21:01
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.

Mobile specific code optimization and reduction Mobile homepage header text and navbar overflow

3 participants