1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-15 17:50:48 +02:00
unleash.unleash/frontend/src/component
Fredrik Strand Oseberg 59a6ef46e8
fix: separate concerns for ConstraintAccordionList (#5701)
## Problem

The ConstraintAccordionList component was used in multiple places: 
* Playground
* Segment form
* StrategyExecution
* Change requests
* Create strategy
* Edit strategy

This is problematic because some of the views are just pure visual
representations, and other views allow you to interact with and edit the
constraints. This causes a situation where the visual representation
needs to be aware of the implementation details of editing and mutating
constraints. In addition the ConstraintAccordionList is not just a pure
rendering of the list, it also keeps internal state on when to show the
create button and optional headers. This is makes it hard to make
changes when stylings need to be subtly different across components.

## Solution

Taking on the full refactor for this is out of scope, but it's
unfortunate that the ConstraintAccordionList needs all this internal
state. For now I split out the list into it's own component called
ConstraintList. I gathered the functions needed for editing and mutating
the constraints in a reusable hook and isolated the version of the list
used in the new feature strategy edit / create components into it's own
component so that the changes in layout will not affect anything else.

Ideally we should try to move towards a future where the components
don't keep internal state like this but clear boundaries and purposes
for the use.
2023-12-20 15:36:23 +01:00
..
accessOverview feat: add a button to download user access information (#4746) 2023-09-15 11:51:29 +02:00
admin feat: add reset password to user manager (#5580) 2023-12-18 13:54:04 +01:00
application feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
archive fix: delete archived feature toggles in the UI (#5411) 2023-11-24 09:35:13 +00:00
banners fix: prevent banner from crashing with invalid variant (#5686) 2023-12-19 13:09:40 +00:00
changeRequest chore: upgrading vite to newer version (#5703) 2023-12-20 14:48:18 +01:00
common fix: separate concerns for ConstraintAccordionList (#5701) 2023-12-20 15:36:23 +01:00
context chore(deps): update dependency @biomejs/biome to v1.4.0 (#5288) 2023-11-28 09:32:00 +00:00
demo chore(deps): update dependency @biomejs/biome to v1.4.0 (#5288) 2023-11-28 09:32:00 +00:00
environments feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
events chore(deps): update dependency @biomejs/biome to v1.4.0 (#5288) 2023-11-28 09:32:00 +00:00
feature fix: separate concerns for ConstraintAccordionList (#5701) 2023-12-20 15:36:23 +01:00
featureTypes feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
feedback feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
filter feat: keep filter order (#5688) 2023-12-19 15:35:39 +01:00
integrations feat: remove feature flag for datadog json template (#5105) 2023-10-26 09:09:26 +02:00
layout chore: remove segments oss splash (#5359) 2023-11-17 13:39:43 +00:00
loginHistory fix: date should sort asc/desc properly (#5335) 2023-11-14 14:47:28 +02:00
maintenance feat: add new sticky component to handle stacked stickies (#5088) 2023-10-19 15:50:37 +01:00
menu feat: rebrand feature toggle list as search (#5675) 2023-12-19 13:42:14 +02:00
playground/Playground feat: add tags filter (#5584) 2023-12-11 14:10:03 +02:00
project fix: empty paginated table state (#5685) 2023-12-20 14:11:21 +00:00
providers feat: add CREATE_TAG_TYPE permission (#5386) 2023-11-22 10:20:19 +00:00
segments Feat: show change request data on segment project usage page (#5410) 2023-11-28 10:01:56 +01:00
splash chore(deps): update dependency @biomejs/biome to v1.4.0 (#5288) 2023-11-28 09:32:00 +00:00
strategies feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
tags feat: add CREATE_TAG_TYPE permission (#5386) 2023-11-22 10:20:19 +00:00
user chore(update): Updates biome config to 1.3 format (#5421) 2023-11-27 13:42:58 +01:00
App.tsx refactor: rename message banners to banners (#5098) 2023-10-19 13:18:25 +01:00
InitialRedirect.tsx