Skip to content

Expands the alert dismisser to dismiss banners

Sam Beckham requested to merge dismissible-banners into master

What does this MR do?

This MR expands on the work done in !41323 (merged) and allows banners to be dismissed too. It also re-writes the function so it's easier to add other dismissibles going forward should the need arise.

The reason for this is that some parts of the codebase use the bootstrap js for dismissing alerts to dismiss other things too. One of those things was banners. In a continuation of the effort to remove bootstrap from the codebase, this bridges the gap needed until we have a more solid solution for migrating to GitLab UI more effectively for HAML components.

Note: This uses [aria-label="Dismiss"] to select the dismiss button. I was initially skeptical about using this as a class is usually a better selector. However, after thinking about this further, it also enforces that we correctly add aria labels so maybe it's a good thing.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Merge request reports