Create a resuable HTML5 dialog component
Categories
(Thunderbird :: Mail Window Front End, task)
Tracking
(Not tracked)
People
(Reporter: aleca, Unassigned)
References
(Blocks 1 open bug)
Details
With the new Account Setup, we started using an HTML5 <dialog> element to trigger prompt notification and handle Calendar and Address Book syncing/creation.
All those dialogs, even if identical except for the body content, are repeated HTML elements with some duplicated CSS.
We should extract that logic and create a single reusable component in order to easily remove all those dialogs within dialogs we're using across the application.
Some examples of sections that will benefit from this:
- New address book dialogs.
- Folder pane properties.
- Search folder dialog.
- Calendar dialogs.
- Chat dialogs for identity verification and encryption requests/confirm.
It would be nice for this to be a team effort instead of letting a single developer handle everything since this component will be reused almost anywhere.
Henry, Lasana, and Martin, do you want to collaborate on a possible technical implementation for this?
Comment 1•5 years ago
|
||
On of the advantages of using html:dialog is that we get a dialog that is parsed and we can grab from the document to show.
If/when there is repetition we could have a <template> including the <dialog> somewhere perhaps? I don't think it should the dialogs should in the general case be created by code. Creating in code quickly gets limiting in what you can/could do in the dialog.
| Reporter | ||
Comment 2•5 years ago
|
||
Yes, I was thinking the same.
Having a "static" HTML structure of the barebone dialog that can be included in the pages that need it should be the approach to follow.
Comment 3•5 years ago
|
||
Instead of repeating code like this everywhere, we should put dialog creation behind simple factory methods on relevant objects. That way it's easier to track down usage and make changes in one place if needed.
Description
•