[feat] Add a Close Button on the Promotional Banner
Description
Currently, the promotional banner for tech conferences is persistent across all pages — including the homepage, blogs, and other sections. This feels a bit controlling from a user’s perspective since they have no option to dismiss it. The banner remains fixed at the top throughout navigation.
Proposed Solution
Add a close ("×") button on the promotional banner to improve user control and experience.
Implementation details:
- Use React’s
useStateto handle banner visibility in the UI. - Store the user’s choice in
localStorage, so if a user closes the banner once, it remains hidden even after a page reload. - Ensure that the banner reappears only after a set period (optional) or until a new banner is introduced.
Expected Behavior
- The user should be able to close the banner.
- Once closed, it should not reappear on page reload or navigation unless cleared from
localStorage.
Before vs After
Benefits
- Improves user autonomy and overall user experience.
- Reduces distraction, especially for returning visitors.
- Creates a cleaner and more flexible interface across the site.
Have you checked for similar open issues?
- [x] I checked and didn’t find a similar issue
Have you read the Contributing Guidelines?
- [x] I have read the Contributing Guidelines
Are you willing to work on this issue?
- [x] Yes, I am willing to submit a PR!
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Hi 👋, I’ve implemented the fix for this issue. Added a dismissible close ("×") button to the promotional banner, storing the user’s choice in localStorage.
PR: #4537
Kindly review and let me know if any changes are needed. 😊
@SHASHI9705 I've already worked on this issue and have an active PR.
I don’t think we want this. @thulieblack , what’s your view on this?
Hi @derberg , I'd like to work on this issue to add a dismissible close button to the promotional banner using React useState and localStorage! Is this still available?