query-monitor icon indicating copy to clipboard operation
query-monitor copied to clipboard

Switch to a web component

Open johnbillion opened this issue 3 years ago • 4 comments

I've been hacking around with the idea of switching QM's output to a web component so its styles are isolated and then I don't need to worry about forcibly overriding theme styles with !important. It's sort of working. Has promise. Not going to focus on this until I've switched to front end rendering though.

  • Fixes #591
  • Fixes #673

johnbillion avatar Apr 14 '21 17:04 johnbillion

Has promise.

Yep, custom elements ftw. But unless you transpile to ES5, be sure to announce you're kicking IE11 and themsuch to the curb.

lkraav avatar Apr 14 '21 20:04 lkraav

~~Yeah I need to look into a polyfill~~ I'll be dropping IE support

johnbillion avatar Apr 14 '21 20:04 johnbillion

Would this mean that QM output would not occur in non-JS situations (ex: testing)?

crstauf avatar Aug 27 '22 20:08 crstauf

Yep, although QM already requires JavaScript in order to work.

johnbillion avatar Aug 28 '22 09:08 johnbillion