[HomePage] Home - Discover section disappear after Employee open it#81412
[HomePage] Home - Discover section disappear after Employee open it#81412WojtekBoman wants to merge 1 commit intoExpensify:mainfrom
Conversation
|
@ZhenjaHorbach 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff977d3aaa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const handlePress = () => { | ||
| Linking.openURL(getTestDriveURL(shouldUseNarrowLayout, introSelected, isCurrentUserPolicyAdmin)); | ||
|
|
||
| if (hasSeenTour || !viewTourTaskReport || viewTourTaskReport.stateNum === CONST.REPORT.STATE_NUM.APPROVED) { | ||
| return; | ||
| } | ||
|
|
||
| completeTestDriveTask( | ||
| viewTourTaskReport, | ||
| viewTourTaskParentReport, | ||
| isViewTourTaskParentReportArchived, | ||
| currentUserPersonalDetails.accountID, | ||
| hasOutstandingChildTask, | ||
| parentReportAction, | ||
| false, | ||
| ); | ||
| }; |
There was a problem hiding this comment.
Update onboarding state when launching test drive
When users open the tour from the Discover section, handlePress now only calls Linking.openURL(...) and no longer invokes completeTestDriveTask (which sets selfTourViewed and completes the onboarding task). For users who access the tour this way (Storylane URL rather than the in-app TestDriveDemo), the “View tour” onboarding task will never be marked complete and selfTourViewed will remain false, leaving onboarding progress stuck even after they’ve actually viewed the tour. If the intent is only to keep the section visible, you can still mark the task complete without reintroducing the return null check.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This section should be always visible
There was a problem hiding this comment.
@WojtekBoman this is a good point, do we need to remove that first block?
cc: @grgia @mountiny @JmillsExpensify @ZhenjaHorbach
Explanation of Change
useOnboardingTaskInformation,useCurrentUserPersonalDetails,useParentReportAction,completeTestDriveTask,NVP_ONBOARDING) and thehasSeenTourSelectorhelper.handlePressnow only opens the test drive URL and no longer completes or updates any onboarding tasks.hasSeenTourcheck and earlyreturn null, so the Discover section no longer disappears after the tour is viewed.shouldCheckActionAllowedOnPress={false}toMenuItemWithTopDescriptionto bypass action-allowed checks on press.The app behaviour after adjusting it:
Screen.Recording.2026-02-04.at.15.59.47.mov
Fixed Issues
$ #81173
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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