Skip to content

chore: Consolidate browser SDK examples into a single examples directory - #2178

Open
joker23 wants to merge 1 commit into
mainfrom
skz/sdk-3457/refactor-browser-examples
Open

joker23 wants to merge 1 commit into
mainfrom
skz/sdk-3457/refactor-browser-examples

Conversation

@joker23

@joker23 joker23 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moves the browser SDK example apps into one examples/ directory, so the layout matches the other packages in this repository (react, vue, electron, node-client, server-ai, openfeature).

New layout under packages/sdk/browser/examples/:

Path Was Workspace name
README.md (new) Index of the examples
getting-started/ example/ @launchdarkly/js-client-sdk-example-getting-started
features/data-saving-mode/ example-fdv2/ @launchdarkly/js-client-sdk-example-data-saving-mode
features/custom-eventsource/ (unchanged path) @launchdarkly/js-client-sdk-example-custom-eventsource

Other changes:

  • The workspaces now use the js-client-sdk-example-* naming, to match the react and vue examples (for example @launchdarkly/react-sdk-example-data-saving-mode).
  • The data saving mode example gets a new README that describes what it demonstrates and carries the EAP note. The "temporary app" comment is removed.
  • Root package.json workspaces, the homepage fields, and the custom EventSource README use the new paths and names.
  • release-please-config.json extra-files for packages/sdk/browser point at the new example package.json paths, so the release PR continues to bump the @launchdarkly/js-client-sdk pin in each example.
  • browser.yml and browser-nightly.yaml use the new workspace names.

After this merges, the next chore: release main PR must bump @launchdarkly/js-client-sdk in all three example package.json files.


Devin Review


Note

Overview
Consolidates the JavaScript Browser SDK sample apps under packages/sdk/browser/examples/, aligning layout with other packages (react, vue, etc.). Former example/ and example-fdv2/ become getting-started/ and features/data-saving-mode/; custom EventSource stays under features/custom-eventsource/.

Workspace packages are renamed to the @launchdarkly/js-client-sdk-example-* pattern (getting-started, data-saving-mode, custom-eventsource). Root package.json workspaces, release-please-config.json extra-files paths, and browser.yml / browser-nightly.yaml example jobs are updated to match.

Adds an examples/README.md index and a dedicated data-saving-mode README (including EAP note); drops the old top-level example README and a “temporary app” comment in the FDv2 demo source.

Reviewed by Cursor Bugbot for commit 65aaaef. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 32497 bytes
Compressed size limit: 32500
Uncompressed size: 153345 bytes

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 34573 bytes
Compressed size limit: 35000
Uncompressed size: 123262 bytes

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26346 bytes
Compressed size limit: 44000
Uncompressed size: 171286 bytes

@joker23
joker23 marked this pull request as ready for review November 6, 2026 15:00
@joker23
joker23 requested a review from a team as a code owner November 6, 2026 15:00

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 1 potential issue.

Devin Review

Comment on lines +15 to +17
- Evaluating a flag with `variation`, which updates live once you switch the
connection mode to `streaming` or `polling` (the browser default, `one-shot`,
fetches once at page load and does not update afterward).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Documented live updates need handler registration

Switching to streaming or polling does not update the displayed flag until the user registers change handlers. The new instructions omit that step.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@joker23
joker23 force-pushed the skz/sdk-3457/refactor-browser-examples branch from 9d48b38 to 65aaaef Compare November 9, 2026 14:04

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 0 new potential issues.

Devin Review

This branch has not been deployed

No deployments
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.

1 participant