Yes, I also don’t understand how this exactly plays out on Chrome. If I only clear cookies, it stays dismissed. If I clear the entire browser history, it shows again.
Yes, I just realized that I didn’t dismiss it myself. But at least I’ve gotten the answer from both of you, and it will be there for others, that’s all I’m happy about.
It’s better than pinning topics, that’s for sure.
Browsers are funny things at times. In the incognito chrome browser tab after dismissing and logging back in the banner didn’t show.
Which each refresh supposed to clear cookies. But as @manuel has mentioned it seems to be also stored in browser history cache. Only by closing th chrome incognito browser and opening as new restored the banner.
I think this used to be a problem with global banner. Iirc I think the team fixed that. As before it used to once cleared no global banners would show for that user.
I installed this component and the PREVIEW shows the banner above the header, but the actual site shows it below the header. This occurs in all browsers I tested: Brave, Edge, Safari.
Is your plugin_outlet setting set to above-site-header? Or perhaps this has to do with the Horizon theme
.
I am using FKB Pro theme. The plugin_outlet is set correctly, but it is irrelevant. Whether it is set to above-site-header or below-site-header, the preview works correctly (first example), but the actual site only shows the announcement below the site header (second example).
I made a few updates to the component. Already updated the original post, but here are the changes in more detail:
Localized strings
The bar text and button label are now translatable. Instead of the old bar_text and button_text settings, the strings live in locales/en.yml. You can add additional locales manually or use AI translations.
Simpler dismiss logic
Replaced the cookie-based dismiss with localStorage. The key is derived from the bar text itself, so when you update the announcement text, the bar automatically re-appears for everyone who dismissed the old one.
Responsive layout
Consolidated styles into a single file using flex-wrap. On wide screens, the text and button sit inline. When the text wraps, the button drops below.
BEM element classes
The markup now uses BEM classes for all elements (__text, __button, __close) making it easier to target in theme overrides.


