Migrate downgrade-blocked route to dynamic routes#93687
Draft
MelvinBot wants to merge 1 commit into
Draft
Conversation
Replace the backTo query-param pattern for the subscription downgrade-blocked screen with the dynamic routes navigation system. Co-authored-by: Michał Jasikowski <mjasikowski@users.noreply.github.com>
6 tasks
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
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
This migrates the subscription downgrade-blocked screen from the legacy
backToquery-param navigation pattern to the dynamic routes system, as part of [BT-152] Migrate Settings - Security/Wallet/Subscription.Of the routes listed in the issue, the assignee's analysis concluded that only
SETTINGS_SUBSCRIPTION_DOWNGRADE_BLOCKEDis eligible for migration (the others cannot be migrated). Themigrate-to-dynamic-routeskill operates on a single route, so this PR scopes to that one route.What changed:
DOWNGRADE_BLOCKEDentry toDYNAMIC_ROUTESinsrc/ROUTES.ts(pathdowngrade-blocked) with the five screens that open it registered asentryScreens, and removed the old staticSETTINGS_SUBSCRIPTION_DOWNGRADE_BLOCKEDroute (which usedgetUrlWithBackToParam).SUBSCRIPTION_DOWNGRADE_BLOCKEDwithDYNAMIC_DOWNGRADE_BLOCKEDinsrc/SCREENS.ts, and updated the linking config, navigator param list, modal stack binding, and theSETTINGS_TO_RHPrelation accordingly.SubscriptionPlanDowngradeBlockedPage.tsx→DynamicSubscriptionPlanDowngradeBlockedPage.tsx. The page now derives its back target withuseDynamicBackPath(DYNAMIC_ROUTES.DOWNGRADE_BLOCKED.path)and passes it toNavigation.goBack(backPath)instead of relying on abackToparam.createDynamicRoute(DYNAMIC_ROUTES.DOWNGRADE_BLOCKED.path)instead ofROUTES.SETTINGS_SUBSCRIPTION_DOWNGRADE_BLOCKED.getRoute(...).Why: dynamic routes derive the return destination from the actual navigation stack rather than a serialized
backToURL param, which is the direction the codebase is standardizing on for RHP screens. Theeslint.seatbelt.tsvcount change is an automatic baseline tightening from removing onegetUrlWithBackToParamusage.Fixed Issues
$ #83363
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 before marking this PR as "ready for review".
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 aboveScreenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari