fix(announcement-banner): persist dismiss state in localStorage#2445
Merged
RemiBonnet merged 5 commits intostagingfrom Mar 4, 2026
Merged
fix(announcement-banner): persist dismiss state in localStorage#2445RemiBonnet merged 5 commits intostagingfrom
RemiBonnet merged 5 commits intostagingfrom
Conversation
Use a content-based hash key so the banner stays hidden after page refresh but reappears automatically when PostHog pushes a new announcement. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Qovery can create a Preview Environment for this PR.
This comment has been generated from Qovery AI 🤖.
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## staging #2445 +/- ##
===========================================
+ Coverage 47.15% 50.79% +3.64%
===========================================
Files 1252 210 -1042
Lines 23142 4333 -18809
Branches 6832 1373 -5459
===========================================
- Hits 10912 2201 -8711
+ Misses 10151 1664 -8487
+ Partials 2079 468 -1611
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
RemiBonnet
requested changes
Mar 4, 2026
libs/shared/posthog/feature/src/lib/announcement-banner/announcement-banner.tsx
Outdated
Show resolved
Hide resolved
RemiBonnet
requested changes
Mar 4, 2026
libs/shared/posthog/feature/src/lib/announcement-banner/announcement-banner.tsx
Outdated
Show resolved
Hide resolved
…dismiss key Replace manual localStorage calls and hash function with useLocalStorage from @qovery/shared/util-hooks. Store the dismissed message directly as the key value so the banner auto-reappears when PostHog changes the content.
RemiBonnet
reviewed
Mar 4, 2026
libs/shared/posthog/feature/src/lib/announcement-banner/announcement-banner.spec.tsx
Outdated
Show resolved
Hide resolved
…nnouncement-banner/announcement-banner.spec.tsx Co-authored-by: Rémi Bonnet <bonnet.rem@gmail.com>
RemiBonnet
reviewed
Mar 4, 2026
libs/shared/posthog/feature/src/lib/announcement-banner/announcement-banner.tsx
Outdated
Show resolved
Hide resolved
RemiBonnet
approved these changes
Mar 4, 2026
Member
|
🎉 This PR is included in version 1.294.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
Issue: QOV-1643
Use a content-based hash key so the banner stays hidden after page refresh but reappears automatically when PostHog pushes a new announcement.
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release