Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Dialog over Template for some parts? #27

Open
Garbee opened this issue Mar 5, 2015 · 2 comments
Open

Dialog over Template for some parts? #27

Garbee opened this issue Mar 5, 2015 · 2 comments

Comments

@Garbee
Copy link
Contributor

Garbee commented Mar 5, 2015

I'm noticing <template> used a lot for the modals. Seems ones like the device-manager-modal-tpl could be implemented with the <dialog> element and things could be cleaner in terms of setup.

Any specific reason template was used?

This is entirely low-priority if it is decided to change. Not a big deal since we need to focus on function over form atm.

@kdzwinel
Copy link
Contributor

kdzwinel commented Mar 5, 2015

I wanted to avoid two things:

  • building DOM in JS,
  • having unnecesary nodes in the DOM (like hidden modals).

Since <template> helps to avoid these two, and is natively supported, I thought I'll give it a try. Haven't really considered <dialog> though. If it really simplifies the code and doesn't contradict any of the two assumptions that I've made at the top, then we should implement it.

@Garbee
Copy link
Contributor Author

Garbee commented Mar 5, 2015

I'm not sure how dialog interacts at the DOM level compared to template. I will do some research on that as time permits. It is however native in Chrome (no other browsers, but this isn't an issue here.) It probably wouldn't simplify the execution code too much, but would remove whatever is currently making the modals as a dependency. We'd just need to manually style the dialog which isn't a major issue.

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

No branches or pull requests

2 participants