react icon indicating copy to clipboard operation
react copied to clipboard

feat: add feature flags exploration

Open joshblack opened this issue 1 year ago • 3 comments

Closes #

Changelog

New

Changed

Removed

Rollout strategy

  • [ ] Patch release
  • [ ] Minor release
  • [ ] Major release; if selected, include a written rollout or migration plan
  • [ ] None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

  • [ ] Added/updated tests
  • [ ] Added/updated documentation
  • [ ] Added/updated previews (Storybook)
  • [ ] Changes are SSR compatible
  • [ ] Tested in Chrome
  • [ ] Tested in Firefox
  • [ ] Tested in Safari
  • [ ] Tested in Edge
  • [ ] (GitHub staff only) Integration tests pass at github/github (Learn more about how to run integration tests)

joshblack avatar Feb 15 '24 15:02 joshblack

🦋 Changeset detected

Latest commit: 154d575594d1b97608fb2dcd761f2849fb7ed639

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Feb 15 '24 15:02 changeset-bot[bot]

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 88 KB (0%)
packages/react/dist/browser.umd.js 88.25 KB (0%)

github-actions[bot] avatar Feb 15 '24 16:02 github-actions[bot]

Note from UI mob pairing: add support for providing a (sync) function to check if something is enabled

joshblack avatar Feb 15 '24 16:02 joshblack

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

github-actions[bot] avatar Apr 15 '24 17:04 github-actions[bot]

Great idea! Love to see it.

Short feedback on usage: I think we should make the first iteration a little simpler for ourselves. I'm a little hesitant to support nested scopes right off the bat because usage in gh/gh can quickly get really hard to debug. (I'm thinking inconsistencies between pages, untested combination of feature flags, single instances of a component used with feature flag or the opposite)

Ideally, I'd like to start with a broad boundary (adjacent to ThemeProvider) and once we have some experience with it (and related tooling), make it more advanced.

Note for future: It would be nice if we had a common ThemeProvider across gh/gh and it was called something like PrimerProvider / PrimerContainer / PrimerBoundary (with exceptions for charting etc.)

siddharthkp avatar Apr 16 '24 13:04 siddharthkp

@siddharthkp would love to do something like PrimerApp or some kind of "App-level" component like what you described 👍 it would make it simple to add in things as "defaults" to projects that use Primer as a result.

And happy to defer on nesting if that would be helpful 👍 I think the only thing that felt critical is that we want a set of "default" feature flags (in this case the global ones) and that this should be merged in with what is given at the FeatureFlags level. This seemed important because otherwise call sites to FeatureFlags need to manage all flags and their default value, even if it's unrelated to what is being authored.

joshblack avatar Apr 17 '24 16:04 joshblack