HistoryBlock icon indicating copy to clipboard operation
HistoryBlock copied to clipboard

Replace window.confirm with prettier HTML+JS components

Open kainsavage opened this issue 8 years ago • 3 comments

Currently, several components on the options page use window.confirm to get user input, which is gross looking.

Add web components that use html/js to provide modals/dialogs to get user input.

kainsavage avatar Jul 11 '17 16:07 kainsavage

Maybe the best way to do this is not with implementing a modal in HTML/JS on the main options page, but to instead create new pages and open them in private "panel" windows - https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create

This would allow for better control of styling as well as 'escaping' the sandboxed DOM of the options page.

For reference, one can only manipulate the sandboxed DOM on the options page - the addon info and controls 'above the fold' are not in the addon's purview. So, early experimentation with darkening the page and showing a 'modal' in HTML/JS only darkened the sandboxed DOM, which I deemed untenable.

kainsavage avatar Jul 27 '17 16:07 kainsavage

This definitely looks like the way we want to build rich prompts/dialogs/etc.

~~The only hitch at the moment is that the titlebar is ugly until FF56 (addressed here). I'll add an issue to get this resolved in a future release (not scheduled for v.2.1.0).~~

kainsavage avatar Jul 27 '17 16:07 kainsavage

May have to be included in v2.1.0 since Firefox56 broke alert/confirm/prompt and has no plans of fixing it until 57 (maybe?)

kainsavage avatar Sep 28 '17 21:09 kainsavage