Skip to content

feat: modernize header and footer#92

Open
Alessandro100 wants to merge 9 commits intomainfrom
feat/90-modernize-header-footer
Open

feat: modernize header and footer#92
Alessandro100 wants to merge 9 commits intomainfrom
feat/90-modernize-header-footer

Conversation

@Alessandro100
Copy link
Copy Markdown
Contributor

Summary:

closes #90

Updates the styling and functionality of the Header and Footer of the page

Expected behavior:

Header

  • New layout to look cleaner on larger screens
  • "Account" button replaced with an Avatar Icon. This is for space savings
  • Search bar added. This will make it easier for users to search throughout the application, especially from feed detail pages
  • Metrics moved to Account dropdown. As more admin features are added, this section will be expanded
  • Dropdown menus are now triggered on hover instead of click. Easier user discovery
  • Move out non critical links from the header (About us, FAQ, Contact US) to the footer

Footer

  • Includes just about all the links for the website
  • Standardized navigation pattern

Testing tips:

Simply play around with the header / footer, test the linking

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with yarn test to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)
Screenshot 2026-03-30 at 11 18 29 Screenshot 2026-03-30 at 11 18 39 Screenshot 2026-03-30 at 11 18 57 Screenshot 2026-03-30 at 11 19 03 Screenshot 2026-03-30 at 11 19 22 Screenshot 2026-03-30 at 11 27 01 Screenshot 2026-03-30 at 11 27 06

@Alessandro100 Alessandro100 requested a review from Copilot March 30, 2026 15:27
@Alessandro100 Alessandro100 self-assigned this Mar 30, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mobilitydatabase-web Ready Ready Preview, Comment Mar 30, 2026 7:02pm

Request Review

Copy link
Copy Markdown
Contributor

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

Modernizes the app’s top-level navigation chrome by restructuring the Header (search + avatar-based account access + hover menus) and redesigning the Footer to centralize secondary links and standardize navigation. (custom: vercel-react-best-practices guidance applied)

Changes:

  • Header: adds a new search bar, updates account UI to an avatar + dropdown, and switches dropdown discovery to hover interactions.
  • Footer: replaces the prior minimal footer with a multi-column footer containing key site links and new i18n strings.
  • Removes mui-nested-menu and updates layout min-height calculations to match the new footer height.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
yarn.lock Removes mui-nested-menu lock entry.
src/app/screens/Feeds/Feeds.styles.ts Adjusts sticky header offset for md breakpoint.
src/app/constants/Navigation.ts Removes less-critical nav links from header navigation items.
src/app/components/HeaderSearchBar.tsx Adds new header search UI + routing to /feeds?q=....
src/app/components/HeaderMobileDrawer.tsx Adds search field and ThemeToggle to the mobile drawer.
src/app/components/Header.tsx Major header redesign: hover menus, avatar account entry, search overlay, i18n labels.
src/app/components/Header.style.ts Tweaks shared header button spacing.
src/app/components/FooterElements.tsx Adds reusable footer link/title components.
src/app/components/Footer.tsx Replaces footer with multi-column layout + social links + i18n.
src/app/[locale]/layout.tsx Updates main container min-height calc to accommodate new footer size.
src/app/App.css Updates client-side min-height calc to accommodate new footer size.
package.json Removes mui-nested-menu dependency.
messages/fr.json Adds new common.* keys and new footer.* namespace.
messages/en.json Adds new common.* keys and new footer.* namespace.

Comment on lines +392 to +394
onClick={() => {
handleNavigation(navigationAccountItem);
}}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

The account avatar button advertises a menu via aria-controls/aria-haspopup, but its onClick navigates to the account page and the menu only opens on hover. This prevents keyboard/touch users from accessing Sign Out / Metrics items. Suggest making click open the menu (and provide a distinct menu item for Account Details), and add focus/keyboard support to match the ARIA semantics.

Suggested change
onClick={() => {
handleNavigation(navigationAccountItem);
}}
onClick={handleAccountOpen}

Copilot uses AI. Check for mistakes.
Comment on lines +308 to 318
<Box
component='span'
onMouseEnter={handleValidatorOpen}
onMouseLeave={handleValidatorClose}
sx={{ display: 'inline-flex' }}
>
<Button
aria-controls='validator-menu'
aria-haspopup='true'
aria-expanded={validatorAnchorEl !== null}
endIcon={<ArrowDropDownIcon />}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

The validators dropdown is now only triggered via onMouseEnter/onMouseLeave on the wrapper and the button has no click/focus handler. This makes the menu inaccessible for keyboard users and unreliable on touch devices (no hover). Consider keeping hover behavior, but also open the menu on click (and/or onFocus/onKeyDown for Enter/Space) so the dropdown is operable without a mouse.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

*Lighthouse ran on https://mobilitydatabase-f89m28zyp-mobility-data.vercel.app/ * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 99 🟢 94 🟢 100 🟢 100

*Lighthouse ran on https://mobilitydatabase-f89m28zyp-mobility-data.vercel.app/feeds * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 91 🟠 87 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-f89m28zyp-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 53 🟢 94 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-f89m28zyp-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 99 🟠 84 🟢 100 🟢 100

*Lighthouse ran on https://mobilitydatabase-f89m28zyp-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 89 🟢 94 🟢 96 🟢 100

Comment on lines +165 to +167
<FooterLink href='/gbfs-validator'>
{t('links.gbfsValidator')}{' '}
</FooterLink>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This must be hidden behind the feature flag or pointing to the current GBFS validator.

@@ -264,186 +312,212 @@ export default function DrawerAppBar(): React.ReactElement {
</Link>
))}
{config.gbfsValidator && (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This feature flag should be applied only to the GBFS validator, not to all validators' links.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is the same logic we have in the Header, do we want to start exposing it in both? Should we even allow the gbfs validator link to start with the external link?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As the new GBFS UI validator is not there yet, let's expose the current GBFS validator and the others. This can be done in a different issue, as it's not part of the current scope.

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.

Modernize the Header and Footer components

3 participants