[HOLD] Add rhpHomePage variant to onboarding A/B/C/D test#86289
[HOLD] Add rhpHomePage variant to onboarding A/B/C/D test#86289marcochavezf wants to merge 1 commit intomainfrom
Conversation
For the rhpHomePage variant, navigate to the Home view after onboarding instead of the default Inbox route. Unlike the previous attempt (#85273), this approach reads the variant from the module-level Onyx variable rather than passing a variantOverride through the call chain, which avoids the regression that affected the control variant. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@ChavdaSachin Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| const handleRHPVariantNavigation: HandleRHPVariantNavigation = (onboardingPolicyID) => { | ||
| if (onboardingRHPVariant === CONST.ONBOARDING_RHP_VARIANT.RHP_HOME_PAGE) { | ||
| Navigation.navigate(ROUTES.HOME); | ||
| SidePanelActions.openSidePanel(true); |
There was a problem hiding this comment.
❌ CONSISTENCY-3 (docs)
SidePanelActions.openSidePanel(true) is duplicated on lines 52 and 57. Both branches of handleRHPVariantNavigation call this identically after navigating. The call can be hoisted after the conditional navigation logic to eliminate the duplication.
Suggested fix:
const handleRHPVariantNavigation: HandleRHPVariantNavigation = (onboardingPolicyID) => {
if (onboardingRHPVariant === CONST.ONBOARDING_RHP_VARIANT.RHP_HOME_PAGE) {
Navigation.navigate(ROUTES.HOME);
} else {
Navigation.navigate(ROUTES.WORKSPACE_OVERVIEW.getRoute(onboardingPolicyID));
}
SidePanelActions.openSidePanel(true);
};Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@ChavdaSachin, I will be taking this over as C+ because I reviewed the previous PR that was reverted. |
Explanation of Change
Rework of the reverted App#85273. For the
rhpHomePageonboarding variant, navigate to the Home view (/home) after onboarding instead of the default Inbox route.The key difference from the previous attempt: this approach reads the variant from the module-level Onyx variable (which is already connected via
Onyx.connectWithoutView) rather than passing avariantOverrideparameter through the entire call chain. The previous approach caused a regression in the control variant because the override parameter propagation changed the function signatures and affected the default behavior. By keeping the existing function signatures unchanged and relying on the Onyx subscription (which fires viaInteractionManager.runAfterInteractions), the other three variants remain completely unaffected.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/610149
Tests
rhpHomePagevariantcontrolvariant still navigates to Inbox with #admins roomrhpAdminsRoomvariant still navigates to Workspace Overview with #admins in RHPrhpConciergeDmvariant still navigates to Workspace Overview with Concierge DM in RHPOffline tests
N/A — variant assignment happens during onboarding which requires network connectivity. The navigation itself is client-side only.
QA Steps
Same as tests — QA should verify all four variants behave correctly after onboarding:
control→ Inbox with #admins roomrhpHomePage→ Home view with side panel openrhpAdminsRoom→ Workspace Overview with #admins in RHPrhpConciergeDm→ Workspace Overview with Concierge DM in RHPVerify that no errors appear in the JS console
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch 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