Closed adaburrows closed 6 months ago
From a quick survey of which scoped elements are still in use in the launcher:
[x] SlAlert (can be replaced with NhAlert)
[x] SlTooltip (can be replaced with NhTooltip)
[x] SlInput, SlCheckbox, SlRadio, SlRadioGroup (will be replaced with NhForm or Nh equivalent of component)
[x] Sl Spinner (need to make NhSpinner)
[x] SlTab, SlTabGroup, SlTabPanel
[x] SlDetails
[x] SlSkeleton
So we are not far away from having all our own scoped components. Perhaps we just need to follow through with wrapping these remaining Sl components and check that the exising Nh ones are using the correct mixin (pretty sure they are).
We could combine this review with updating design system styles to also use a mixin, and changing the way we use overrides.
We should also by that point be able to also replace the rest of the MWC scoped components. Once we remove both of these packages and rely just on the design system the bundle size should drop dramatically.
Much of our code is currently using the @scoped-elements/shoelace project, but it doesn't really do much for us since there are some issues with it. However, it can work as a general template of how to use each Shoelace component in the context of a scoped lit-element.
Keep in mind, it uses a different mix-in than the one from lit labs that we should be using, so the interface is different.
However, to see why this could be problematic see the code in https://github.com/scoped-elements/shoelace/blob/main/src/sl-icon-button.ts, look at how it inherits things, and look at how it includes the themes from shoelace https://github.com/scoped-elements/shoelace/blob/main/src/index.ts which could potentially overwrite our theme each time we import a component.