Use a new command for dismissing the product marketing window - #97960
Use a new command for dismissing the product marketing window#97960JS00001 wants to merge 9 commits into
Conversation
…mmand-for-dismissing-marketing-window
…mmand-for-dismissing-marketing-window
|
@huult can you review this one please? |
|
@chuckdries 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] |
|
yes |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75f714d238
ℹ️ 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".
| }, | ||
| ]; | ||
|
|
||
| API.write(WRITE_COMMANDS.DISMISS_MARKETING_WINDOW, {updateKey}, {optimisticData}); |
There was a problem hiding this comment.
Restore the dismissal value when the write fails
When DismissMarketingWindow receives a terminal API error, this write has no failureData, so the optimistic update remains in Onyx even though the server never persisted it. The previous setNameValuePair path explicitly restored lastDismissedMarketingWindow on failure; without equivalent rollback, the window stays hidden on this client while reappearing after server state is loaded elsewhere. Pass the prior value into this action and restore it when the request fails.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I prefer the approach in this PR, because it won't reappear in the current session, it would only re-appear when the user re-opens the app
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@JS00001 Could you check the failed unit tests? |
…mmand-for-dismissing-marketing-window
Explanation of Change
Updates product marketing window dismissal to use a new command
DismissMarketingWindowFixed Issues
$ #95791 (comment)
Tests
Run the same tests expected for the new bottom right product marketing window to work.
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
Reviewer Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).Avatar, I verified the components usingAvatarhave been tested & I retested again)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Screen.Recording.2026-08-06.at.7.35.59.AM.mov