Draft
Conversation
Contributor
There was a problem hiding this comment.
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
onattribute 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Testing
Useful Links