-
Notifications
You must be signed in to change notification settings - Fork 0
feat!: [REL-9841] modify toolbar to be framework-agnostic using shadow DOM #157
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
base: main
Are you sure you want to change the base?
Conversation
Add @react-stately/flags package and enable shadow DOM in LocalFlagControls
* refactor: simplify initialization of useLaunchDarklyToolbar hook * refactor: consolidate packages into unified toolbar structure * chore: remove CDN files and update .gitignore to exclude cdn dir * chore: update dependencies (storybook and launchpad-ui) Update Storybook to 9.1.10, resolving peer dependency issues Update @launchpad-ui packages * docs: update README * doc: more README updates * doc: more README updates * doc: (hopefully) last README updates * doc: update CONTRIBUTING.md * refactor: only use local toolbar code in DEV mode * refactor: slight update to CONTRIBUTING.md * doc: clean up docs * docs: modify README and CONTRIBUTING setup examples --------- Co-authored-by: Cody Spath <cspath@launchdarkly.com>
* refactor: simplify initialization of useLaunchDarklyToolbar hook * refactor: consolidate packages into unified toolbar structure * feat: migrate from Vite to rslib for bundling - Replace Vite with rslib for both library and CDN builds - Add rslib.config.ts for NPM library build (ESM/CJS formats) - Add rslib.config.cdn.ts for CDN IIFE build with global exposure - Update package.json with rslib dependencies and new build scripts - Remove Vite-related dependencies and configurations - Implement Storybook integration with storybook-addon-rslib - Fix CSS injection for shadow DOM compatibility with rslib's injectStyles - Update mount.tsx to filter and copy toolbar styles to shadow DOM - Generate source maps for both library and CDN builds - Maintain backward compatibility for existing integrations * Delete toolbar.min.css file * fix * refactor: optimize rslib configs - remove unnecessary plugins from library build - Remove VanillaExtractPlugin from library config (only needed for CDN build) - Library consumers handle their own CSS processing - CDN build still includes VanillaExtractPlugin for style bundling - Both builds maintain React plugin for JSX/TSX transformation * Remove unnecessary comment in rslib.config.ts * chore: remove CDN files and update .gitignore to exclude cdn dir * chore: update dependencies (storybook and launchpad-ui) Update Storybook to 9.1.10, resolving peer dependency issues Update @launchpad-ui packages * docs: update README * doc: more README updates * doc: more README updates * doc: (hopefully) last README updates * doc: update CONTRIBUTING.md * refactor: only use local toolbar code in DEV mode * refactor: slight update to CONTRIBUTING.md * doc: clean up docs * refactor: delete generated license file * doc: slightly update README * Add "cdn" to list of files in package.json --------- Co-authored-by: Pranjal Jately <pjately@launchdarkly.com> Co-authored-by: Cody Spath <cspath@launchdarkly.com>
…kly/launchdarkly-toolbar into cspath/REL-9841-toolbar-revamp
edb6afc
to
2bafe31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh boy this was a biggie! 😌 Great work by everyone for getting this over the line and shoutout to @cspath1 for pushing for this change 🕺 🕺 🕺
VITE_LD_CLIENT_SIDE_ID: 68e6a6a8d57c6b098d135c94 | ||
VITE_LD_BASE_URL: https://app.launchdarkly.com | ||
VITE_LD_STREAM_URL: https://clientstream.launchdarkly.com | ||
VITE_LD_EVENTS_URL: https://events.launchdarkly.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix @pranjal-jately-ld!
I'm slightly confused on whether our E2E tests use mocks or not. There are a couple avenues we have opened up:
- Run demo app with MSW which mocks the requests and responses
- Run demo app as usual using real env values, but use Playwright
.route()
functionality to intercept and mock
I think we're doing the latter but we still need to define these environment variables since LD SDK needs to have something to initialize against. Without these values defined, SDK can't initialize and LD client stays undefined. Could you confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct 👌
Related Jira issue: REL-9841: Refactor toolbar so it is more host application agnostic