feat(notices): let a reader hide a banner without retiring it - #2681
Open
camielvs wants to merge 1 commit into
Open
feat(notices): let a reader hide a banner without retiring it#2681camielvs wants to merge 1 commit into
camielvs wants to merge 1 commit into
Conversation
A notice the host marks mandatory cannot be dismissed, so without this there is no way to clear one off the dashboard home. Hiding is per-reader and reversible: the notice stays in the header inbox, which offers to bring the banners back. A hide persists only for notices the host already allows to be dismissed; hiding a mandatory notice lasts for the session.
🎩 PreviewA preview build has been created at: |
This was referenced Aug 29, 2026
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.

Why
With #2668 merged, dismissing a notice is the only way to clear it off the dashboard home — and dismissal is permanent and only offered on notices the host marked
dismissible. That leaves two gaps:dismissible) sits on the home page with no way to clear it, even for someone who has read it and wants their dashboard back.localStorage.Now that the notices are also in the header popover, taking a banner off the home page doesn't lose it — so hide becomes safe to offer, on every notice.
What you get
The banner's X becomes an eye-off, "Hide notice", present on every card:
hidden-notices.The reader always still has it in the header popover either way. The popover header gains one toggle that flips on state: Hide notices when any are showing, Show notices when any are hidden — so hiding is reversible without touching storage by hand.
Dismissal is unchanged and still lives in the popover: the X there still retires a dismissible notice permanently.
Reviewer notes
useHiddenNoticesis a separate store fromuseNotices, keyed onhidden-notices, and the banners compose the two. Hidden state deliberately doesn't live inuseNotices— a hidden notice is still an active notice, and the popover has to keep listing it.The persist-if-dismissible / session-only-if-mandatory rule is the same two-tier shape #2667 established for dismissal, and it's the reason
showAllcan restore everything: session hides clear on their own, andhidden-noticesis emptied.One shared primitive changes:
InfoBoxgainsdismissIconanddismissLabel, both defaulting to today's values (X/ "Dismiss"), so every existingInfoBoxrenders identically. This is the only change to a design-system primitive in the notices stack, and it exists because a notice card needs the same affordance in the same slot with a different meaning — an eye-off in the banner, an X in the popover — and a second dismiss slot onInfoBoxwould be worse.How to test
Install a source with one dismissible and one mandatory notice (see
src/config/NOTICES.md):Where this sits
Top of the stack, and the most droppable PR in it: #2667 alone is a complete announcements replacement, and #2668 adds the header surface. This is purely a reader affordance and depends on #2668 existing — hiding is only reasonable because the popover keeps the notice reachable.