Warn user when removing an environment from a feature flag

Release notes

In this release, we added a warning that is presented to the user when an environment is removed from a feature flag that will in fact make the feature unavailable in the environment that was removed.

Problem to solve

As a user removing an environment from a feature flag, I want to know that doing this will in fact turn this flag off for this entire environment and will not leave in enabled for all users in that environment.

Intended users

User experience goal

Proposal

  • If a user removes an environment from a feature flag strategy's environment scope and saves the feature flag, we should present a warning message through a modal.
  • This feature will be behind a feature flag so it can be easily disabled if the fulfillment team gives us significant feedback this negatively impacts their workflows (We should in that case consider improving the feature by introducing different warnings for protected vs unprotected environments, see #285127 (comment 452906667))
### Are you sure you want to save this feature flag configuration?

Part of the changes made to this feature flag edit the environment scope. The following environments have been changed:

++env++
--env--

Do you want to save this feature flag configuration?

[Cancel](Default Button) [Save changes](Primary Warning Button]

Further details

Fulfilment use case:

FF basically always stays on and the enabling/disabling happens by adding/removing environments. I just want to let you know that (in case you didn’t already) ‘cause I find interesting that: Fulfillment uses FF with the assumption that even when enabled, removing the environment equals to disabling it

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by Dimitrie Hoekstra