fix: restore Prevent Flag Defaults UI enforcement in create feature modal#6931
Open
talissoncosta wants to merge 1 commit intomainfrom
Open
fix: restore Prevent Flag Defaults UI enforcement in create feature modal#6931talissoncosta wants to merge 1 commit intomainfrom
talissoncosta wants to merge 1 commit intomainfrom
Conversation
…odal The prevent_flag_defaults project setting was no longer hiding the value and enabled fields when creating a feature. This was introduced in #6356 where hideValue was hardcoded to false and the prevent_flag_defaults check was dropped. Fetches prevent_flag_defaults via RTK Query (useGetProjectQuery) instead of the stale Flux ProjectStore, ensuring the setting is always fresh without requiring a page reload. Closes #6930 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Docker builds report
|
Contributor
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
docs/if required so people know about the feature.Changes
Closes #6930
The
prevent_flag_defaultsproject setting was no longer hiding the value and enabled fields when creating a feature flag. This regression was introduced in #6356 wherehideValuewas hardcoded tofalseand theprevent_flag_defaultscheck was dropped.What changed
CreateFeature.tsx: Fetchesprevent_flag_defaultsvia RTK Query (useGetProjectQuery) and conditionally hides the enabled toggle and value editor, showing an info message instead.FeatureUpdateSummary.tsx: Also fetches via RTK Query to conditionally hide the duplicate info message whenprevent_flag_defaultsis active.index.js: PassesprojectIdtoFeatureUpdateSummary(no longer uses stale FluxProjectStore.model).Why RTK Query instead of Flux
The previous
ProjectStore.modeldata was stale — toggling the setting in Project Settings didn't update the create feature modal without a full page reload. UsinguseGetProjectQueryensures the data is always fresh via RTK Query's cache invalidation.How did you test this code?