Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

cspath1
Copy link
Contributor

@cspath1 cspath1 commented Oct 7, 2025

@launchdarkly-upra launchdarkly-upra bot changed the title Cspath/rel 9841 toolbar revamp [REL-9841] Cspath/rel 9841 toolbar revamp Oct 7, 2025
@cspath1 cspath1 changed the title [REL-9841] Cspath/rel 9841 toolbar revamp fix: [REL-9841] Cspath/rel 9841 toolbar revamp Oct 7, 2025
cspath1 and others added 2 commits October 7, 2025 14:22
Add @react-stately/flags package and enable shadow DOM in LocalFlagControls
e2e/playwright.config.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
cspath1 and others added 7 commits October 8, 2025 09:56
* 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>
@sub-ld sub-ld changed the title fix: [REL-9841] Cspath/rel 9841 toolbar revamp feat: modify toolbar to be framework-agnostic using shadow DOM Oct 15, 2025
@launchdarkly-upra launchdarkly-upra bot changed the title feat: modify toolbar to be framework-agnostic using shadow DOM feat: [REL-9841] modify toolbar to be framework-agnostic using shadow DOM Oct 15, 2025
@sub-ld sub-ld marked this pull request as ready for review October 15, 2025 03:25
@cspath1 cspath1 changed the title feat: [REL-9841] modify toolbar to be framework-agnostic using shadow DOM feat!: [REL-9841] modify toolbar to be framework-agnostic using shadow DOM Oct 15, 2025
@pranjal-jately-ld pranjal-jately-ld force-pushed the cspath/REL-9841-toolbar-revamp branch from edb6afc to 2bafe31 Compare October 15, 2025 21:20
Copy link
Contributor

@pranjal-jately-ld pranjal-jately-ld left a 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
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.