flagsmith
flagsmith copied to clipboard
List of features associated with a segment shows 1 feature per version
How are you running Flagsmith
- [ ] Self Hosted with Docker
- [ ] Self Hosted with Kubernetes
- [X] SaaS at flagsmith.com
- [ ] Some other way (add details in description below)
Describe the bug
On an environment with feature versioning enabled, the Features tab for a given Segment shows 1 feature per version for that feature, instead of just the latest version.
Additionally, when editing a segment and browsing to the features tab, this UI makes at least 1 request per feature which can be borderline unusable on high-latency connections and/or when having a large amount of features associated with a single segment. See video below.
High-latency connections are common for anyone far away from London in SaaS, or Enterprise customers requiring slow VPNs to access their self-hosted Flagsmith instances.
Steps To Reproduce
- Create a feature in an environment with feature versioning enabled
- Create a segment override for that feature
- Save a new version for that feature
- Browse to the segment with the override, and click on the Feature tab
The feature will be shown twice - one per version. Each version will load individually, causing jank and layout shift as each request completes.
Expected behavior
Only the latest version for each feature should be shown in the Features tab when viewing a segment.
If feasible, loading the list of features associated for a feature should not cause layout shift or show partially complete data.
Screenshots
https://github.com/Flagsmith/flagsmith/assets/829698/a53b08df-5d09-4677-8431-5863c8dbebdd