[FLI-708] Warn user when trying to delete a segment this is in use
Problem
There is no indication to the user trying to delete a segment how the operation will affect the flags.
Ideal Solution
A message in the delete modal that highlights for the user that the segment being deleted is currently in use.
Something like "This flag is currently being used in 3 flags"
Search
- [X] I searched for other open and closed issues before opening this
Additional Context
No response
Very reasonable.
I think (since we addressed some feedback) that with the declarative backends you now get an error when validating your config when this referential constraint is violated. So this should only effect the relational backends. Just noting for the future given we implement fixing this.
We plan to move segments to use Redux, much like @GeorgeMac did in #2301. I think doing that for segments and rules/rollouts might make fixing this much easier, as we could then cross reference each segment with flags/rules/rollouts at deletion time to do the check.
will create issues for moving these resources to redux incase anyone is able to help there