-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🪟 🔧 Handle LD feature flags besides featureService.overwrites
#19773
Merged
ambirdsall
merged 4 commits into
master
from
alex/handle-arbitrary-launchdarkly-feature-flags
Dec 10, 2022
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3d0c530
Handle LD feature flags besides `featureService.overwrites`
ambirdsall 5c6a173
Handle 3rd state (use app default) from feature flags
ambirdsall 89eb7b7
Remove feature toggling based on shared LD flag
ambirdsall d3d5441
s/overwrite/enabled/ in the new LD flag payloads
ambirdsall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought, not a necessary blocker for this PR: Would it maybe be nicer if we'd use a
string
for the tristate, that can either be empty,"true"
or"false"
? That would be easier to type in LD and would have the benefit, that the default value for string experiments already is the empty string, while using the JSON flag here, we'll require to type{}
for each of the new features to not break the code below that destructures the object?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it would save us a bit of typing, I found the slightly more verbose JSON definitions to be a bit more readable in the devtools network tab. To minimize the hassle of creating new flags, I made sure they can be copy-pasted verbatim from the new documentation in Notion.
That said,
"enabled" | "disabled" | ""
would have been a very clean type signature ¯\_(ツ)_/¯