-
Notifications
You must be signed in to change notification settings - Fork 185
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
kie-issues#1463: Test Scenario Editor: Manage @kie-tools/scesim-editor
's state with Zustand + Immer
#2628
Conversation
@tiagobento Ready for another round :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yesamer hi, is there a way how to figure out what is currently and what is currently not supported by the scesim-editor?
I was about to do some manual checks, but I think it is not ready for such checks?
packages/scesim-editor/src/creation/TestScenarioCreationPanel.tsx
Outdated
Show resolved
Hide resolved
@jomarko The table UX should be considered completed (and well covered by e2e test provided by @kbowers-ibm). There are some KI identified here apache/incubator-kie-issues#453. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for the changes @Yeser. I put some comments inline.
import { InsertRowColumnsDirection } from "@kie-tools/boxed-expression-component/dist/api/BeeTable"; | ||
|
||
export function addColumn({ | ||
beforeIndex, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beforeIndex
sounds to me we as we will always add a column after the selected one, however as we have also insertDirection
it is probably not true. could you please explain it little bit more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
The BEE table UI allows you to add a column both on the right or on the left.
insertDirection
gives you exactly that information, in detail, the possible values are AboveOrRight
,
BelowOrLeft
The addColumn mutation function requires both information to correctly persist the new column in the scesim file.
packages/scesim-editor/src/store/computed/computeTestScenarioDataObjects.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last comment to code
const settings = state.scesim.model.ScenarioSimulationModel.settings; | ||
settings.dmnFilePath = assetType === "DMN" ? { __$$text: "./MockedDMNName.dmn" } : undefined; | ||
settings.dmnName = assetType === "DMN" ? { __$$text: "MockedDMNName.dmn" } : undefined; | ||
settings.dmnNamespace = assetType === "DMN" ? { __$$text: "https:\\kiegroup" } : undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this is not correct, once I create new DMN, I see namespace value as "https:\kiegroup"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jomarko It's a temporary mockup, in a PR will be correctly managed (like all the above parameters)
@jomarko Yeah, let me explain. |
I still see some occurrences of |
Co-authored-by: Jozef Marko <[email protected]>
Finally green!! |
Closes apache/incubator-kie-issues#1463
Screen.Recording.2024-10-01.at.16.06.47.mov
In this PR, the whole test scenario editor state management has been refactored to rely on Zustand + Immer framework, following the same methodology applied in DMN and BPMN editors.
That enabled the Undo / Redo mechanism.