Repository navigation
feat!: Refactor content script UI functions and add helper for "integrated" UIs - #333
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #333 +/- ##
==========================================
- Coverage 78.31% 78.08% -0.23%
==========================================
Files 103 102 -1
Lines 7087 7115 +28
Branches 624 620 -4
==========================================
+ Hits 5550 5556 +6
- Misses 1520 1542 +22
Partials 17 17 ☔ View full report in Codecov by Sentry. |
|
Main problem with this override approach, the type-hints and type error messages suck. small.mp4Overrides are great because the different types have different return values, but I'm gonna try something else... |
|
I tried merging the options into one object, and that worked well for input options, but I also had to combine the output types, and now the return type isn't inferred correctly... I also tried adding the type as an additional parameter before the options in the overrides, but it still sucks at providing type hints. Instead, I'm gonna keep the fucntions as separate functions, but remove the "ContentScript" from them. |
This closes #273
Breaking changes:
type: "inline" | "overlay" | "modal"has been changed toposition: "inline" | "overlay" | "modal"createContentScriptUi({ ... })→createShadowRootUi({ ... })createContentScriptIframe({ ... })→createIframeUi({ ... })onRemoveis now called before the UI is removed from the DOM, previously it was called after the UI was removed