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

kie-issues#1376: The width information are not being deleted from DMN when the expression is deleted in the new Boxed Expression Editor #2602

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

danielzhe
Copy link
Contributor

…rom DMN when the expression is deleted in the new Boxed Expression Editor
@danielzhe danielzhe added pr: DO NOT MERGE Draft PR, not ready for merging area:dmn labels Sep 19, 2024
@@ -89,7 +89,6 @@ export function BoxedExpressionScreen({ container }: { container: React.RefObjec
const dmnEditorStoreApi = useDmnEditorStoreApi();

const thisDmn = useDmnEditorStore((s) => s.dmn);
const diagram = useDmnEditorStore((s) => s.diagram);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaning. This constant wast not being used.

@@ -30,20 +30,9 @@ export function updateExpressionWidths({
drdIndex: number;
widthsById: Map<string, number[]>;
}): void {
const { widthsExtension, widths } = addOrGetDrd({ definitions, drdIndex });
const componentWidthsMap = widths.reduce(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue was that we were always reloading all the widths from the definitions into the widthsById.

They are loaded the first time here:

And then the Boxed Expression Editor is who changes the widthsById.

The updateExpressionWidth should only update the definitions from widthsById, not fill the widthsById.

@danielzhe danielzhe marked this pull request as ready for review September 19, 2024 12:38
@danielzhe danielzhe added pr: waiting-for-review Waiting for peer reviews and removed pr: DO NOT MERGE Draft PR, not ready for merging labels Sep 19, 2024
@tiagobento
Copy link
Contributor

ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with packages/dmn-editor/package.json

Copy link
Contributor

@jomarko jomarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seem to work properly to me. Thank you @danielzhe

@tiagobento tiagobento merged commit 683be53 into apache:main Sep 23, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dmn pr: waiting-for-review Waiting for peer reviews
Projects
Status: 🎯 Done
3 participants