-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPIKE: Make real-time banners dismissible if allowed #20064
Comments
@laflannery I took a pass at ACs. It looks like in the DST Storybook, if you dismiss their component banner, the markup stays in the DOM. Just FYI, in case that comes up during AC review in refinement. (cc @Agile6MSkinner ) |
@jilladams The
|
After digging into this, I don't believe we will be able to make real time banners dismissible without updating the core |
It might be nice to ask the DST if they're open to that. If not, it's a no op. (They live in #platform-design-system in VA slack. Feel free to cc me and Michael if you want.) |
Great idea, thank you @jilladams! I went ahead and put the question out there |
If we can't accomplish it, seems like we need to remove the option in Drupal so that editors don't think they are making a banner that is dismissible. |
Moving this to Review as I am awaiting further input from the DST prior to taking any next steps. |
NOTE: The below details may be obsolete. Ignore if they don't reflect reality upon inspection.
Background
When making the QA plan for Real-time banners, Laura discovered an existing bug on the VAMC Banners in Prod where they were not respecting the
dismissible
checkbox in Drupal. Even if a banner was set as dismissible, the X icon would not show on the FE.This was brought up early during the implementation process and it was determined that we could easily add this to the new, real-time banners as a "quick win" to get it working properly
However, during testing unfortunately we determined this wasn't quite as simple as we hoped. Because of this complication and because this is not a regression from prod, it was decided that the dismissibility of banners would remain as it was in prod and this ticket was created to tackle it later
Description
Currently va-banners using the real-time API (vets-website situation update banners) cannot use the
showClose
value.Dismissibility is disabled on full-width banners using the real-time banners API due to the use of
dangerouslySetInnerHTML
breaks the ability for the va-banner component to check if the banner is inlocalStorage.DISMISSED_BANNERS
.(
dangerouslySetInnerHTML
is required, in order to preserve rich-text content from Drupal that may include links.)User story
AS A user
I WANT to be able to dismiss banners from the real-time API if they are allowed to be dismissed
SO THAT I don't get repeated banners (or unhideable banners)
Engineering notes / background
va-banner checks if text matches the banner, but text stored in the DISMISSED_BANNERS has the HTML from innerHTML as opposed to the text.
Acceptance criteria
If fixable:
The text was updated successfully, but these errors were encountered: