Skip to content

flags: export persistFlagsFromURL for bundle-specific flag keys - #326

Open
etiennelatendresse-optable wants to merge 1 commit into
masterfrom
migrate-flag-from-url-from-solution
Open

flags: export persistFlagsFromURL for bundle-specific flag keys#326
etiennelatendresse-optable wants to merge 1 commit into
masterfrom
migrate-flag-from-url-from-solution

Conversation

@etiennelatendresse-optable

@etiennelatendresse-optable etiennelatendresse-optable commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Why

The setOptableFlagsFromURLQuery allows reading debug flag from the url and persist them in the sessionStorage for the rest of the tab session.

What Changed

  • Add the setOptableFlagsFromURLQuery
  • Add tests to verify it functions properly
  • Update flags.md

How to Test

  • Tested
  • Docs updated

Notes

  • Breaking change
  • Requires release

Comment thread lib/core/flags.ts Outdated
@etiennelatendresse-optable
etiennelatendresse-optable force-pushed the migrate-flag-from-url-from-solution branch from 1404a5b to e2ba4c1 Compare August 25, 2026 17:03
@etiennelatendresse-optable etiennelatendresse-optable changed the title flags: export setOptableFlagsFromURLQuery with custom-key support flags: export persistFlagsFromURL for bundle-specific flag keys Aug 25, 2026
@etiennelatendresse-optable
etiennelatendresse-optable force-pushed the migrate-flag-from-url-from-solution branch from e2ba4c1 to 2602e27 Compare August 25, 2026 17:09
@etiennelatendresse-optable
etiennelatendresse-optable force-pushed the migrate-flag-from-url-from-solution branch from 2602e27 to 0f4619b Compare August 25, 2026 17:13
Comment thread lib/core/flags.ts
* export is for wrapper bundles with flags of their own that don't belong in
* the shared key list. Those keys never enter the typed Flags object; the
* bundle reads them back from sessionStorage and must treat "0" and empty
* values as disabled, like flagEnabled() does.

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.

Remove this comment IMO. Just describe the function

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.

2 participants