Skip to content

Copilot test - Migrate legacy nav#13826

Draft
amoore108 wants to merge 14 commits intolatestfrom
copilot-testing-migrate-legacy-nav
Draft

Copilot test - Migrate legacy nav#13826
amoore108 wants to merge 14 commits intolatestfrom
copilot-testing-migrate-legacy-nav

Conversation

@amoore108
Copy link
Contributor

Resolves JIRA:

Summary

A very high-level summary of easily-reproducible changes that can be understood by non-devs, and why these changes where made.

Code changes

  • List key code changes that have been made.

Testing

  1. List the steps required to test this PR.

Useful Links

@amoore108 amoore108 self-assigned this Mar 24, 2026
Copy link
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

Migrates the Navigation component off #psammead/psammead-navigation onto local, in-repo equivalents, updating styling and tests/snapshots to match the new structure for both Canonical and AMP navigation.

Changes:

  • Replaced Psammead navigation primitives with new local components (NavigationWrapper, ScrollableNavigation, NavigationList, DropdownNavigation).
  • Updated navigation styling (divider rendering, focus/hover indicators, scrollable gradient) and adjusted Canonical/AMP renderers accordingly.
  • Updated Jest tests/snapshots and bundle size thresholds; allowed AMP’s on attribute in ESLint config.

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/app/components/Navigation/index.tsx Swaps list primitives to local NavigationList / DropdownList components.
src/app/components/Navigation/index.styles.ts Refactors divider and focus/gradient-related styling; removes legacy menuButton styles.
src/app/components/Navigation/index.canonical.tsx Replaces Psammead Navigation/ScrollableNavigation/dropdown/menu button with local wrappers.
src/app/components/Navigation/index.canonical.test.tsx Updates assertion to match new dropdown height implementation (style vs attribute).
src/app/components/Navigation/index.amp.tsx Replaces Psammead AMP navigation components with local wrappers and dropdown/menu button.
src/app/components/Navigation/snapshots/index.test.tsx.snap Snapshot updates for structural/style changes from local navigation components.
src/app/components/Navigation/snapshots/index.canonical.test.tsx.snap Canonical snapshot updates for new component structure/styles.
src/app/components/Navigation/snapshots/index.amp.test.tsx.snap AMP snapshot updates for new component structure/styles.
src/app/components/Navigation/ScrollableNavigation/index.tsx New scrollable nav wrapper with tracking-friendly data-e2e and direction/id support.
src/app/components/Navigation/ScrollableNavigation/index.styles.ts New scrollable nav styles (overflow, scrollbar hiding, focus indicator, LTR/RTL gradient).
src/app/components/Navigation/NavigationWrapper/index.tsx New <nav> wrapper replacing Psammead Navigation, including AMP open-class support.
src/app/components/Navigation/NavigationWrapper/index.styles.ts Styles for wrapper layout and open-state background handling.
src/app/components/Navigation/NavigationList/index.tsx New list + list item rendering (active/current-page handling, tracking prop spreading).
src/app/components/Navigation/NavigationList/index.styles.ts Styles for list/list item/link states and current-page indicator.
src/app/components/Navigation/DropdownNavigation/types.d.ts Adds AMP typing shims for amp-state and the on attribute.
src/app/components/Navigation/DropdownNavigation/index.tsx New dropdown/menu button implementations for Canonical + AMP.
src/app/components/Navigation/DropdownNavigation/index.styles.ts Styles for dropdown container/list and menu button (moved from legacy nav styles).
scripts/bundleSize/bundleSizeConfig.js Updates expected bundle size thresholds after navigation refactor.
.eslintrc.js Allows AMP on attribute in JSX a11y prop allowlist.

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.

2 participants