Migrate Travel workspace address to dynamic route#93765
Draft
MelvinBot wants to merge 1 commit into
Draft
Conversation
Replace the static backTo-based TRAVEL_WORKSPACE_ADDRESS route with a DYNAMIC_ROUTES entry (path 'workspace-address/:domain/:policyID?'), mirroring the TRAVEL_TCS pattern. domain/policyID are carried as path params (not query params) to avoid the mergeQueryStrings collision, and the back path is derived via useDynamicBackPath. Co-authored-by: huult <huult@users.noreply.github.com>
5 tasks
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Contributor
|
@MelvinBot please close this PR |
Contributor
Author
|
🤖 Closing this PR as requested by |
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.
Explanation of Change
Migrates the Travel workspace-address route (
TRAVEL_WORKSPACE_ADDRESS) from the legacy staticbackTo-based pattern to the new dynamic-route pattern, as tracked in the dynamic-route migration effort.What changed:
TRAVEL_WORKSPACE_ADDRESSroute (which relied ongetUrlWithBackToParam+ abackToquery param) and added aTRAVEL_WORKSPACE_ADDRESSentry toDYNAMIC_ROUTESwithpath: 'workspace-address/:domain/:policyID?', carryingdomainandpolicyIDas path params.WORKSPACE_ADDRESS→DYNAMIC_WORKSPACE_ADDRESSand updated all registration points in sync:SCREENS.ts, navigationtypes.tsparam list, linkingconfig.ts, and the modal stack navigator (require binding + replace-animation config).WorkspaceAddressForTravelPage.tsx→DynamicWorkspaceAddressForTravelPage.tsx, wiring it touseDynamicBackPathand rebuilding the post-OTP "next step" route viacreateDynamicRoute(...getRoute(domain, policyID), backPath)instead of reading abackToquery param.BookTravelButton.tsx,DynamicDomainSelectorPage.tsx) and the layeredADDRESS_COUNTRY/TRAVEL_TCSentryScreensreferences to point at the new dynamic screen.Why the previously-claimed blocker does not apply: an earlier attempt deferred this route citing a "policyID/domain query-param collision." That was a misread of
createDynamicRoute'smergeQueryStrings, which only throws on duplicate query param keys. Carryingdomain/policyIDas path params (exactly as the adjacentTRAVEL_TCSdynamic route already does) bypassesmergeQueryStringsentirely, so there is no collision and the route is migratable.Fixed Issues
$ #83867
PROPOSAL:
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
// TODO: The human co-author must fill out the offline tests.
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionmainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari