Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use anchor tags for all header and footer links (#297) #322

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

frano-m
Copy link
Contributor

@frano-m frano-m commented Feb 19, 2025

Closes #297.

  • Header navigation links (main navigation, menu navigation, and drawer navigation) all use anchor tags instead of buttons.
  • The anchor tags include the relevant rel attribute for internal / external urls.
  • The anchor tags include the target attribute, if configured, otherwise remain as _self.
  • External links use MuiLink and internal links use Next's Link component.

Test

  • A test for the Navigation is advisable, however the component itself will need refactoring to handle recursion all in one file rather than having a parent ↔ child import cycle.
image

@@ -69,18 +70,17 @@ export const NavigationMenuItems = ({
) : (
<Fragment key={i}>
<MMenuItem
component={isClientSide ? Link : MLink}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Component will either be MuiLink for external links or Next's Link component for internal links.

@@ -0,0 +1 @@
export const NAVIGATION_TEST_ID = "navigation";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a test id to the central header's navigation; for future use.

Copy link
Collaborator

@MillenniumFalconMechanic MillenniumFalconMechanic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks F!

@MillenniumFalconMechanic MillenniumFalconMechanic merged commit 95effbf into main Feb 19, 2025
2 checks passed
@MillenniumFalconMechanic MillenniumFalconMechanic deleted the fran/297-header-footer-links branch February 19, 2025 17:38
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.

Use anchor tags for all header and footer links
2 participants