Skip to content
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

Replace window.confirm with prettier HTML+JS components #8

Open
kainsavage opened this issue Jul 11, 2017 · 3 comments
Open

Replace window.confirm with prettier HTML+JS components #8

kainsavage opened this issue Jul 11, 2017 · 3 comments
Assignees
Milestone

Comments

@kainsavage
Copy link
Owner

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 kainsavage self-assigned this Jul 11, 2017
@kainsavage kainsavage added this to the v2.1.0 milestone Jul 11, 2017
@kainsavage
Copy link
Owner Author

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
Copy link
Owner Author

kainsavage commented Jul 27, 2017

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
Copy link
Owner Author

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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant