ljmotta commented on code in PR #2760: URL: https://github.com/apache/incubator-kie-tools/pull/2760#discussion_r1899804034
########## packages/dmn-feel-antlr4-parser/src/Uuid.ts: ########## @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { v4 as uuid } from "uuid"; + +export {}; Review Comment: Why this is necessary? ########## packages/boxed-expression-component/src/expressionVariable/ExpressionVariableCell.tsx: ########## @@ -50,21 +62,44 @@ export const ExpressionVariableCell: React.FunctionComponent< const onVariableUpdated = useCallback<OnExpressionVariableUpdated>( ({ name = DEFAULT_EXPRESSION_VARIABLE_NAME, typeRef = undefined }) => { - onExpressionWithVariableUpdated(index, { - // `expression` and `variable` must always have the same `typeRef` and `name/label`, as those are dictated by `variable`. - expression: expression - ? { - ...expression, - "@_label": name, - "@_typeRef": typeRef, - } - : undefined!, // SPEC DISCREPANCY - variable: { - ...variable, - "@_name": name, - "@_typeRef": typeRef, + const variableChangedArgs: ExpressionChangedArgs = { Review Comment: On other files is used `expressionChangedArgs`. ########## packages/dmn-editor/stories/misc/empty/Empty.stories.tsx: ########## @@ -23,7 +23,7 @@ import { ns as dmn15ns } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { DmnEditorWrapper, StorybookDmnEditorProps } from "../../dmnEditorStoriesWrapper"; -import { DmnEditor, DmnEditorProps } from "../../../src/DmnEditor"; +import { DmnEditor, DmnEditorProps } from "@kie-tools/dmn-editor/dist/DmnEditor"; Review Comment: Nice! ########## packages/boxed-expression-component/src/expressionVariable/ExpressionVariableMenu.tsx: ########## @@ -100,17 +108,36 @@ export function ExpressionVariableMenu({ }, [beeGwtService]); const saveExpression = useCallback(() => { - if (expressionName !== selectedExpressionName || dataType !== selectedDataType) { - onVariableUpdated({ name: expressionName, typeRef: dataType }); + const changes: ExpressionChangedArgs = { Review Comment: On other files is used `expressionChangedArgs`. ########## packages/dmn-language-service/src/refactor/IdentifiersRefactor.ts: ########## Review Comment: It's not necessary to create a `refactor` folder for this file as the name already tells what the file is about. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
