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

fix: Edit identity override with prevent flag defaults enabled #4809

Merged

Conversation

dougfabris
Copy link
Contributor

@dougfabris dougfabris commented Nov 5, 2024

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

It adds the identity verification in hideValue param on the Value component in order to render the input fields, where wasn't possible to edit under identity override

Closes: #4771

How did you test this code?

  • Go to project settings
  • Enable the prevent flag defaults
  • Create a feature
  • Go to identities
  • Clicking on the feature you created you should be able to edit it

Note to the reviewer: I was looking into it and indeed removing the parameter mentioned to the Value component seems to solve the issue. But I'm afraid I'm missing something because the verification using prevent_flag_defaults was added 2 years ago here #1453

Copy link

vercel bot commented Nov 5, 2024

@dougfabris is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Nov 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 5:56pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Nov 8, 2024 5:56pm

@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Nov 5, 2024
@dougfabris dougfabris changed the title fix: remove hideValue param from Value fix: Edit identity override with prevent flag defaults enabled Nov 5, 2024
@dougfabris dougfabris marked this pull request as ready for review November 5, 2024 21:36
@dougfabris dougfabris requested a review from a team as a code owner November 5, 2024 21:36
@dougfabris dougfabris requested review from kyle-ssg and removed request for a team November 5, 2024 21:36
Copy link
Contributor

github-actions bot commented Nov 5, 2024

Uffizzi Preview deployment-57991 was deleted.

@kyle-ssg
Copy link
Member

kyle-ssg commented Nov 6, 2024

Hey @dougfabris, thanks for the PR!

Prevent_flag_defaults aims to stop from defining a default remote configuration when creating a flag (which sets a default for all environments), forcing people to set it later per environment. Although your PR does fix an issue where it prevents user overrides, it also stops prevent_flag_defaults from working - we can define on a remote config value on flag creation with this change.

Instead this should do something along the lines of project.prevent_flag_defaults && !identity

@dougfabris
Copy link
Contributor Author

dougfabris commented Nov 6, 2024

So in fact I was missing something then. I didn't knew about the remote config you mentioned!
I've applied your suggestion. Thanks for reviewing it @kyle-ssg

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dougfabris !

@matthewelwell matthewelwell merged commit 0f9b24b into Flagsmith:main Nov 8, 2024
26 of 27 checks passed
@dougfabris dougfabris deleted the fix/identity-overrides-flag-defaults branch November 11, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent Flag Defaults settings makes identity flags unusable
3 participants