Skip to content

Use a mobile section picker instead of overflowing competition tabs#70

Closed
coder13 wants to merge 2 commits into
devfrom
codex/fix-competition-tabs-scaling-for-mobile
Closed

Use a mobile section picker instead of overflowing competition tabs#70
coder13 wants to merge 2 commits into
devfrom
codex/fix-competition-tabs-scaling-for-mobile

Conversation

@coder13
Copy link
Copy Markdown
Owner

@coder13 coder13 commented May 12, 2026

Motivation

  • Mobile layouts with many competition tabs were overflowing and required scrolling; the intent is to provide a compact, scalable navigation for mobile without horizontal tab scrolling.
  • Keep the existing tabbed navigation intact for md+ screens so desktop and tablet UX remain unchanged.
  • Adhere to the spacing guideline by using space-y-2 instead of odd mt-* spacing to keep vertical rhythm consistent.

Description

  • Added useNavigate and a mobile-only <select> dropdown in src/layouts/CompetitionLayout/CompetitionLayout.tsx to act as a compact "Section" picker for mobile screens.
  • The dropdown only includes tabs that are visible on mobile by filtering out tabs with hiddenOnMobile, and selecting an option navigates via navigate(event.target.value) with the value bound to the current pathname.
  • Kept the existing tab row for md and larger breakpoints by rendering the original StyledNavLink list inside a hidden md:flex container.
  • Updated the container spacing to space-y-2 md:space-y-0 to follow the spacing guidance and avoid mt-* usage.

Testing

  • Ran yarn eslint src/layouts/CompetitionLayout/CompetitionLayout.tsx, which completed successfully.

Codex Task

@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for competition-groups ready!

Name Link
🔨 Latest commit dffb923
🔍 Latest deploy log https://app.netlify.com/projects/competition-groups/deploys/6a02b3b483769a0007fe73d0
😎 Deploy Preview https://deploy-preview-70--competition-groups.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 63
Accessibility: 84
Best Practices: 100
SEO: 96
PWA: 90
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coder13 coder13 closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant