Skip to content

feat(toolbar): filter deprecated and archived flag types#629

Open
james-gough-op wants to merge 9 commits intolaunchdarkly:mainfrom
james-gough-op:feature/ignore-deprecated-archived
Open

feat(toolbar): filter deprecated and archived flag types#629
james-gough-op wants to merge 9 commits intolaunchdarkly:mainfrom
james-gough-op:feature/ignore-deprecated-archived

Conversation

@james-gough-op
Copy link
Copy Markdown

@james-gough-op james-gough-op commented Mar 27, 2026

What does this PR do?

  • Adds flag lifecycle filtering for the new toolbar flags experience: by default the list shows only live flags (not archived, not deprecated).
  • Lets users include deprecated and/or archived flags via persisted toolbar settings (includeDeprecatedFlags, includeArchivedFlags in ld-toolbar-settings localStorage).
  • Plumbs archived and deprecated from API / SDK flag metadata into normalized flag state and list rendering.
  • Adds Filter overlay controls for lifecycle options, updates the Filter button badge when lifecycle filters are active, and emits analytics for lifecycle toggle changes.
  • Adds unit tests for passesFlagLifecycleFilter and extends FilterButton tests for lifecycle badge behavior.

NOTE: e2e tests were failing for me in the main branch. I have therefore NOT changed any in this fork.
NOTE: also happy for these to live in the main settings panel if that's preferred.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation (changes to documentation only)
  • 🔧 Refactor (code change that neither fixes a bug nor adds a feature)
  • 🎨 Style (formatting, missing semicolons, etc; no production code change)
  • Performance (code change that improves performance)
  • Test (adding missing tests, refactoring tests; no production code change)
  • 🔨 Chore (updating grunt tasks, build process, etc; no production code change)

Screenshots/Videos

Screenshot_2026-03-27_at_16_38_07 Screenshot_2026-03-27_at_16_38_02 Screenshot_2026-03-27_at_16_37_58

…tate

- Extend API/local flag shapes with optional deprecated metadata
- Set archived and deprecated in FlagStateManager and SDK override provider
- Add toolbar settings keys with defaults in localStorage helpers
- Expose lifecycle toggles and reset from ToolbarStateProvider
- Treat only explicit boolean true as archived/deprecated for filtering
- Filter dev and SDK flag lists using toolbar lifecycle preferences
- Align stats copy with in-scope lifecycle counts; avoid stale memo on toggle
- Filter UI for deprecated/archived visibility with Filter button badge context
- Extend analytics for lifecycle filter events
- Extend FilterButton tests for lifecycle badge counts
@james-gough-op james-gough-op requested a review from a team as a code owner March 27, 2026 15:12
@nhironaka nhironaka requested a review from a team March 27, 2026 15:33
@cspath1
Copy link
Copy Markdown
Contributor

cspath1 commented Apr 2, 2026

@james-gough-op thanks for submitting this! We will be taking a look shortly!

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