You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "danielzhe (via GitHub)" <gi...@apache.org> on 2024/11/22 14:08:25 UTC

[PR] [WIP] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

danielzhe opened a new pull request, #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760

   Closes: https://github.com/apache/incubator-kie-issues/issues/208
   
   **Renaming Data Types**
   
   https://github.com/user-attachments/assets/865b600d-d15f-44c6-b870-f7e2172175b4
   
   **Renaming BKMs and parameters**
   
   https://github.com/user-attachments/assets/fb7bf2b6-58f9-4db4-ace6-a5d1e8e2ef0e
   
   
   **General rename**
   
   https://github.com/user-attachments/assets/e4485c5a-2285-4bac-9d1c-218edbe052a1
   
   
   
   **Renaming Included Models name**
   It does not show the confirmation dialog, because doesn't make sense to not update the references in this case, since this already was the default behavior before this PR (when we renamed a included model, we already updated all the references except the expressions, now we update the expressions).
   
   https://github.com/user-attachments/assets/9b44114d-e302-4a09-bd33-81fce5254736
   
   
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "ljmotta (via GitHub)" <gi...@apache.org>.
ljmotta commented on code in PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#discussion_r1928943677


##########
packages/dmn-language-service/src/refactor/IdentifiersRefactor.ts:
##########


Review Comment:
   I agree and the file name is perfect. My point is the `refactor` folder. After removing the `refactor` folder, we would have `src/IdentifiersRefactor.ts`



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2498553330

   @danielzhe Storybook is pointing to code using `../src` because it is used during development. The changes you introduced will make the development experience much worse, requiring us to rebuild stuff after a change, if I'm not mistaken... can you please check?


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2500143128

   ### 04
   Question, should this feature work for BKM node and Invocation expression. Imagine this model:
   ![Screenshot 2024-11-26 104246](https://github.com/user-attachments/assets/ef57bb46-8cde-465c-9afc-ac6cb1bf921f)
   Where internally the `Invocation` says it invokes `mybkm` node.
   
   However if user renames the `mybkm` to `mybkm renamed` the `Invocation` remains the same (notice `mybkm` in last screenshot):
   ![Screenshot 2024-11-26 104416](https://github.com/user-attachments/assets/ce3d7d09-4c62-4b18-9c3e-b39de224dc6d)
   ![Screenshot 2024-11-26 104422](https://github.com/user-attachments/assets/a9bc5b4d-5a4c-4b43-9c8f-5cac56e4bfa7)
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "kbowers-ibm (via GitHub)" <gi...@apache.org>.
kbowers-ibm commented on code in PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#discussion_r1863361877


##########
packages/dmn-editor/src/refactor/RefactorConfirmationDialog.tsx:
##########
@@ -0,0 +1,81 @@
+/*
+ * 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 { Modal, ModalVariant } from "@patternfly/react-core/dist/js/components/Modal";
+import { Button, ButtonVariant } from "@patternfly/react-core/dist/js/components/Button";
+import { Normalized } from "@kie-tools/dmn-marshaller/dist/normalization/normalize";
+import * as React from "react";
+import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types";
+import { IdentifiersRefactor } from "@kie-tools/dmn-language-service";
+import { DmnLatestModel } from "@kie-tools/dmn-marshaller/dist";
+
+export function RefactorConfirmationDialog({
+  onConfirmExpressionRefactor,
+  onConfirmRenameOnly,
+  onCancel,
+  isRefactorModalOpen,
+  fromName,
+  toName,
+}: {
+  onConfirmExpressionRefactor: () => void;
+  onConfirmRenameOnly: () => void;
+  onCancel: () => void;
+  isRefactorModalOpen: boolean;
+  fromName: string | undefined;
+  toName: string | undefined;
+}) {
+  return (
+    <Modal
+      aria-labelledby={"identifier-renamed"}
+      variant={ModalVariant.small}
+      isOpen={isRefactorModalOpen}
+      showClose={true}
+      onClose={onCancel}
+      actions={[
+        <Button key="confirm" variant={ButtonVariant.primary} onClick={onConfirmExpressionRefactor}>
+          Yes, rename and update the expressions
+        </Button>,
+        <Button key="rename" variant={ButtonVariant.secondary} onClick={onConfirmRenameOnly}>
+          No, just rename
+        </Button>,
+      ]}
+    >
+      The identifier `{fromName ?? "<undefined>"}` was renamed to `{toName ?? "<undefined>"}`.
+      <br />
+      <br />
+      This identifier is used in one or more expressions.
+      <br />
+      <br />
+      Do you want also automatically update the expressions to the new name?

Review Comment:
   ```suggestion
         Would you like to automatically replace all instances of `{fromName ?? "<undefined>"}` with `{toName ?? "<undefined>"}`?
   ```
   Or if you prefer the original:
         Do you want _to_ also automatically update the expressions to the new name?



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2494534714

   Thank you for the PR @danielzhe. It's going to take me a few days to go over everything with the care it deserves. Will keep you posted!


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "ljmotta (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2500023950

   ### 01
   ![image](https://github.com/user-attachments/assets/161b988f-7cf3-474c-b498-57ebca07e7fe)
   Using the feature, came to my mind, maybe we could have a third action button 'Cancel', like do nothing? During my testing I was in situation oh, I want to double-check what I will do, so I just wanted to cancel the operation.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2500173977

   ### 05
   We have an issue editor allows to define two function parameters with the same name, then renaming does  not work.
   ![Screenshot 2024-11-26 105859](https://github.com/user-attachments/assets/8db69efa-b8f9-42af-8f95-1d23a175cc1e)
   ![Screenshot 2024-11-26 105912](https://github.com/user-attachments/assets/034125ab-0b05-40c5-9f2e-2d1d25c20398)
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2500131035

   ### 03
   FYI, I didn't check this feature with the List expression because of https://github.com/apache/incubator-kie-issues/issues/1635


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2500192036

   ### 06
   Is there a way to disable this feature? Committing the rename action starts to be slower, so I expect some user may ask to disable this feature in their environment.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2507333451

   @danielzhe thank you for updates
   
   I think 1. and 2. works now pretty well.
   
   6. I used this file. Once I rename something there is ~1 second until new modal appears. Once I click rename in that modal, it also takes ~1. I am not saying it is a blocker, I understand that it may be complicated (long time) operation to compute indexes, find identifiers etc. Just want to avoid situation in past in 7.x or 8.x stream, where users working with large models (100+ nodes) were unable even open the model. That is why I asked about possibility to turn off the feature. However, my issue may be local, caused my by laptop, memory parameters and settings. I do not know.
   
   [Untitled (2).dmn.txt](https://github.com/user-attachments/files/17956578/Untitled.2.dmn.txt)
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "danielzhe (via GitHub)" <gi...@apache.org>.
danielzhe commented on code in PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#discussion_r1854491829


##########
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 = {
+      action: Action.VariableChanged,
+      variableUuid: variableUuid,
+      typeChange:
+        dataType !== selectedDataType
+          ? {
+              from: dataType,
+              to: selectedDataType,
+            }
+          : undefined,
+      nameChange:
+        expressionName !== selectedExpressionName
+          ? {
+              from: expressionName,
+              to: selectedExpressionName,
+            }
+          : undefined,
+    };
+
+    if (changes.nameChange || changes.typeChange) {
+      onVariableUpdated({ name: expressionName, typeRef: dataType, changes });
     }
-  }, [expressionName, selectedExpressionName, dataType, selectedDataType, onVariableUpdated]);
+  }, [expressionName, selectedExpressionName, dataType, selectedDataType, variableUuid, onVariableUpdated]);
 
   const resetFormData = useCallback(() => {
     setExpressionName(selectedExpressionName);
     setDataType(selectedDataType);
   }, [selectedExpressionName, selectedDataType]);
 
-  // onCancel doens't prevent the onHide call
+  // onCancel doesn't prevent the onHide call

Review Comment:
   Just a typo.



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "danielzhe (via GitHub)" <gi...@apache.org>.
danielzhe commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2507901380

   > Hi Daniel, Thanks for the PR - it looks great! Just a minor comment from my side regarding the message:
   
   Thank you for your suggestion! It's always good to have a native English speaker to improve our messages. I'll update the text of the buttons too to match the new message.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "danielzhe (via GitHub)" <gi...@apache.org>.
danielzhe commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2506723527

   Thank you for your review, @jomarko ! 
   About the points you commented:
   1. I made a new screen with a X in the top corner, where we can cancel the change, like discussed in the private chat. Here is the print:
   ![image](https://github.com/user-attachments/assets/7987a970-20d6-45b2-bf58-6c004bd312e5)
   2. Change applied. Decision tables should be working now
   3. ok
   4. That field is not "expression aware", it is just a text box. We have two tickets to address that, so it is not covered in this:
   a. https://github.com/apache/incubator-kie-issues/issues/205
   b. https://github.com/apache/incubator-kie-issues/issues/276
   5. As discussed in private chat, that is something that depends on user. We can't (shouldn't)  not allow the user to rename it if the name is duplicated. It is up to the user. Once the parameters have duplicated names, there is no way for us to know which one is which inside the expression.
   6. No, we don't have. We had a discussion about this and we come to idea to add the confirmation dialog instead an option to disable/enable it, remember? I didn't found out any slow down using the feature. If you can provide some reproducible steps, we can check it.
   7. ok
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "danielzhe (via GitHub)" <gi...@apache.org>.
danielzhe commented on code in PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#discussion_r1924318727


##########
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:
   🤔 
   It is a mystery. 
   Removed.



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento merged PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2500207595

   ### 07
   During included models review, I found this https://github.com/apache/incubator-kie-issues/issues/1636, however I think I didn't find issue related to changes of #2760.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2500038115

   ### 02
   The feature seems to not work in decision tables.
   ![image](https://github.com/user-attachments/assets/e7f160af-48d9-4004-9bb1-edf6386b4222)
   In the attached table there is input node `IDAnyStruct`. This node has a data type set to a custom structure with three fields: `A`, `B` and `C`. Once I renamed `A`, `B` or `C` on the `Data Types` tab, the occurrences in the decision table were not updated. 
   
   I think that at least the row 2 should be updated. I slightly think also decision table header row should be, however that may be very tricky and if we decide to implement, maybe in a separate ticket? I am not sure about the secodn point.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "danielzhe (via GitHub)" <gi...@apache.org>.
danielzhe commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2500989673

   > @danielzhe Storybook is pointing to code using `../src` because it is used during development. The changes you introduced will make the development experience much worse, requiring us to rebuild stuff after a change, if I'm not mistaken... can you please check?
   
   Where? I did the oposite: there was code pointing to `../src` and I fixed it. @tiagobento 


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "danielzhe (via GitHub)" <gi...@apache.org>.
danielzhe commented on code in PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#discussion_r1922845469


##########
packages/dmn-language-service/src/refactor/IdentifiersRefactor.ts:
##########


Review Comment:
   The problem is that outside, where the code is called, it would be only `Identifiers` and I think `IdentifiersRefactor` is a better name because only `Identifiers` can lead to think that there are more functions inside of it and not only functions related to Identifiers Refactor. Wdyt?



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on code in PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#discussion_r1923779453


##########
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:
   Actually I think we need to revert that. Storybook is a development webapp, so it's supposed to work even without having to build the package itself. By pointing to the `src` folder directly we make sure it works like that and also that it live-reloads when you change the contents of the file.



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#208: Renaming any "NamedElement" on the DMN Editor should update all references to the old name [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on PR #2760:
URL: https://github.com/apache/incubator-kie-tools/pull/2760#issuecomment-2628417637

   Conflicts :(


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org