Hide patch notes after 30 days from release date#1707
Open
KevinWu098 wants to merge 4 commits intomainfrom
Open
Hide patch notes after 30 days from release date#1707KevinWu098 wants to merge 4 commits intomainfrom
KevinWu098 wants to merge 4 commits intomainfrom
Conversation
- Gate shouldShowPatchNotes on calendar age vs LATEST_PATCH_NOTES_UPDATE - Hide Patch Notes header button when stale - Add vitest coverage with fake timers; fix dialog close assertions Co-authored-by: Kevin Wu <KevinWu098@users.noreply.github.com>
…howPatchNotes Real 'now' after 30 days from LATEST_PATCH_NOTES_UPDATE made the 'displays when outdated' case fail in CI; use fake timers during fresh window and add button visibility test for same window. Co-authored-by: Kevin Wu <KevinWu098@users.noreply.github.com>
Revert hiding PatchNotesButton after 30 days; stale check applies only to shouldShowPatchNotes. arePatchNotesStale is store-internal. Co-authored-by: Kevin Wu <KevinWu098@users.noreply.github.com>
Fix ReferenceError from missing setLocalStoragePatchNotesKey import. MUI Dialog leaves the root mounted during exit transition; use waitFor until the dialog test id is gone. Co-authored-by: Kevin Wu <KevinWu098@users.noreply.github.com>
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.
Summary
Patch notes are tied to
LATEST_PATCH_NOTES_UPDATE(YYYYMMDD). After more than 30 calendar days since that date,shouldShowPatchNotes()no longer opens the modal on load. The Patch Notes menu button always remains so users can open the dialog manually.Tests
"now"whereshouldShowPatchNotes()is asserted.localStoragehelper imports (fixessetLocalStoragePatchNotesKey is not definedin CI).waitForuntil the dialog unmounts (MUI keeps the root during exit transition).