Conversation
What was broken The gig details profile, forum and opportunity advice links replaced the gig page instead of opening in a new tab. Root cause The platform-ui port omitted the new-tab targets present in the legacy gig advice links. What was changed Add target="_blank" and rel="noopener noreferrer" to all three advice links. Preserve their destinations and existing gig navigation and email behavior. Update the component documentation and Gigs README. Any added/updated tests Add three GigDetailsPage regression cases covering signed-in and anonymous profile destinations, all three advice links, and existing navigation/email links. All 18 tests across the four gig suites pass. Yarn lint and the production build pass. A Chromium fixture using the real page component reproduces the baseline bug and passes 12 new-tab click checks across desktop/mobile widths and signed-in/anonymous states.
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.
What was broken
Clicking the profile, forum or opportunity advice links on the gig details page replaced the gig page instead of opening a new tab.
Root cause
The platform-ui port omitted the new-tab targets present in the legacy gig advice links.
What was changed
target="_blank"andrel="noopener noreferrer"to all three advice links.Files:
src/apps/gigs/src/pages/GigDetailsPage.tsx,src/apps/gigs/src/pages/GigDetailsPage.spec.tsx, andsrc/apps/gigs/README.md.Any added/updated tests
Added three component regression cases covering signed-in and anonymous profile destinations, all three advice links, and existing navigation/email links.
Validation after
nvm use:yarn lint— passed.yarn run build— passed with existing project warnings.yarn test:no-watch --runInBand --watch=false --runTestsByPath src/apps/gigs/src/gigs.utils.spec.ts src/apps/gigs/src/gigs.service.spec.ts src/apps/gigs/src/components/GigApplicationForm.spec.tsx src/apps/gigs/src/pages/GigDetailsPage.spec.tsx— all 18 tests across four suites passed.node /tmp/PM-6266-validation/browser.cjs— a temporary Chromium fixture using the real page component and mocked data/destinations reproduced the baseline same-tab bug and passed 12 new-tab click checks at 1280px and 390px widths for signed-in and anonymous visitors. Each click preserved the original gig page and opened a tab without an opener.