Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task(settings,react): Add feature flag component that supports list of oauth client ids #15637

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

dschom
Copy link
Contributor

@dschom dschom commented Aug 1, 2023

Because

  • We want to feature flag certain features for certain oauth clients
  • We want to be able to wrap this component around a view to feature flag it

This pull request

  • Adds config oauth.reactClientIdsEnabled to flag oauth client that
  • Adds oauth client feature flag component to settings, which uses the config setting above and a 'wrapper' pattern.
  • Adds a general feature flag wrapper component to fxa-react.

Issue that this pull request solves

Closes: FXA-7126

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

…f oauth client ids

Because:
- We want to feature flag certain features for certain oauth clients
- We want to be able to wrap this component around a view to feature flag it

This Commit:
- Adds config `oauth.reactClientIdsEnabled` to flag oauth client that
- Adds oauth client feature flag component to settings, which uses the config setting above and a 'wrapper' pattern.
- Adds a general feature flag wrapper component to fxa-react.
@dschom dschom requested a review from a team as a code owner August 1, 2023 18:03
@chenba
Copy link
Contributor

chenba commented Aug 1, 2023

Approved since the code looks fine. But it's not immediately obvious where the component gets teh client id for the feature prop value?

@dschom
Copy link
Contributor Author

dschom commented Aug 1, 2023

it's not immediately obvious where the component gets teh client id for the feature prop value?

@chenba I guess this was left open ended on purpose, and I think it should be up to the calling code. I am under the impression that we are trying not to access hooks (or url params) directly in the components themselves. This keeps them functionally pure. It's my understanding, that resolving something like client id will be a responsibility of the page, or in the future a responsibility of the page's 'container' once that pattern is place.

@dschom dschom merged commit 1b91289 into main Aug 1, 2023
6 checks passed
@dschom dschom deleted the react-ff-view branch August 1, 2023 22:23
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