Open Bug 1845150 Opened 1 year ago Updated 1 year ago

Use moz-message-bar instead of message-bar in notificationbox.js

Categories

(Toolkit :: XUL Widgets, task)

task

Tracking

()

People

(Reporter: hjones, Unassigned)

References

(Blocks 4 open bugs)

Details

(Whiteboard: [fidefe-reusable-components])

Attachments

(1 file)

The code in notificationbox.js handles creating info bars that are displayed at the top of web pages in the chrome when certain events occur. Currently the NotificationMessage element extends the message-bar element: https://searchfox.org/mozilla-central/source/toolkit/content/widgets/notificationbox.js#611-614

Now that moz-mesage-bar is available we should us it as the base class for NotificationMessage instead of message-bar. This will solve the issue of in-content/common-shared.css getting pulled into the chrome, which has been a side effect of the current NotificationMessage setup.

There will likely be changes that need to be made to reflect the fact that moz-message-bar has a different API from message-bar - it's more controlled and no longer based around having a single <slot>. Also notificationbox.js adds a number of classes to the message bar element. These styles currently live in message-bar.css, but we removed them from moz-message-bar.css so we may have to add a new stylesheet that gets pulled in to Notificationmessages only.

Attached image Example of an infobar message (deleted) —
Blocks: 1845151
Whiteboard: [fidefe-reusable-components]
Blocks: 1702040
Blocks: 1702771
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: