feat: add creator profile section anchor links (#159)#181
Merged
Chucks1093 merged 1 commit intoApr 26, 2026
Merged
Conversation
- Enable enableHashRouting on ProfileTabPillGroup in LandingPage - Initialise activeProfileTab from window.location.hash on first render so direct URL hash navigation (e.g. /#creations) works immediately - Consolidate two duplicate useEffect calls in ProfileTabPillGroup into one effect that both syncs from the initial hash on mount and listens for subsequent hashchange events, eliminating a mount-time race - Add id/aria-controls to each ProfileTabPill for tab ↔ panel ARIA wiring - Wrap tab-panel content in a div with id, role=tabpanel, aria-labelledby, and tabIndex so the semantic relationship is complete - Add ProfileTabPillGroup.test.tsx (8 tests) covering hash routing, ARIA attributes, initial hash read, hashchange listener, and edge cases - Add docs/CreatorProfileAnchorLinks.md with implementation notes and manual verification steps
|
@Kaycee276 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #159
Adds URL hash anchor links for the main creator profile sections, enabling direct deep-linking, browser back/forward navigation between tabs, and shareable section URLs.
Changes
src/components/common/ProfileTabPill.tsxuseEffectcalls into one, fixing a mount-time race where the initial hash read could fire before thehashchangelistener was attachedwindow.location.hashon mount and registers thehashchangelistenerid="profile-tab-{value}"andaria-controls="profile-panel-{value}"to each tab button (ARIA wiring)src/pages/LandingPage.tsxactiveProfileTabinitial state now reads fromwindow.location.hash— navigating to/#creationsshows the correct tab immediately with no flash to OverviewenableHashRoutingonProfileTabPillGroup— clicking tabs updates the URL hash<div>now carriesid,role="tabpanel",aria-labelledby, andtabIndex={0}for complete semantic tab ↔ panel associationsrc/components/common/__tests__/ProfileTabPillGroup.test.tsx(new)hashchangelistener response, no-op for matching hash, unknown hash fallback,id/aria-controlsattributes,aria-selectedonly on active tabdocs/CreatorProfileAnchorLinks.md(new)Acceptance criteria
docs/CreatorProfileAnchorLinks.md)ProfileTabPillGroup.test.tsx)