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

Test Scenario Editor: Manage @kie-tools/scesim-editor's state with Zustand + Immer #1463

Open
Tracked by #453
yesamer opened this issue Sep 3, 2024 · 0 comments · May be fixed by apache/incubator-kie-tools#2628
Open
Tracked by #453
Assignees
Labels
area:test-scenario Related to Test Scenario (scesim) area:tools Issues affecting Apache KIE tooling projects type:new-feature Something is missing, we need to build it!

Comments

@yesamer
Copy link

yesamer commented Sep 3, 2024

The current Test Scenario Editor prototype relies on a plain useState() to hold the editor state.
In the same way we managed DMN and BPMN editors, To store ’s state, we’ll follow ReactFlow’s recommendation and use Zustand + Immer. Zustand provides a global, very capable store mechanism to centralize the component’s state, while Immer makes it much easier to update deeply nested objects. The ’s internal state will be held in a single, Immer-enabled Zustand store, with a debouncing mechanism to batch onModelChange callbacks, making the component behave like a Controlled Component, while still having control over when to notify that its state changed.

@yesamer yesamer self-assigned this Sep 3, 2024
@yesamer yesamer added area:test-scenario Related to Test Scenario (scesim) type:new-feature Something is missing, we need to build it! area:tools Issues affecting Apache KIE tooling projects labels Sep 3, 2024
@yesamer yesamer changed the title Test Scenario Editor: Undo/Redo management (1w) Test Scenario Editor: Model state and Undo/Redo management Sep 3, 2024
@yesamer yesamer changed the title Test Scenario Editor: Model state and Undo/Redo management Manage @kie-tools/scesim-editor's state with Zustand + Immer Sep 10, 2024
@yesamer yesamer changed the title Manage @kie-tools/scesim-editor's state with Zustand + Immer Test Scenario Editor: Manage @kie-tools/scesim-editor's state with Zustand + Immer Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:test-scenario Related to Test Scenario (scesim) area:tools Issues affecting Apache KIE tooling projects type:new-feature Something is missing, we need to build it!
Projects
Status: ⏳ In Progress
1 participant