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

[PR] [DRAFT] DMN Edito Read Only flag [incubator-kie-tools]

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

   (no comment)


-- 
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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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

   Some manual tests in Storybook. I didn't test every expression because of the size of the video. *Notice that I'm checking some not-readonly expressions too just in case to be if it is not broken (our E2E tests do that too)*:
   
   https://github.com/user-attachments/assets/bd25bbb3-78cf-459f-b67e-b4f0a9fc0eb4
   
   


-- 
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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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

   @jomarko Just for clarity, the overlays panel works 'non-destructively'. They're options that modify what/how the user sees the model, but not what is stored in the DMN XML.


-- 
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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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

   @jomarko Regarding the two points you've raised, they don't change the XML, so I don't think it's a bad thing to give the user the option to tweak them.


-- 
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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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

   > 3. It's still possible to resize Boxed Expressions while in read-only mode.
   > 4. It's not possible to select some cells of the Boxed Expression Editor while in read-only mode. This impossibility the checking ofmakes it impossible to check some expression properties using the properties panel.
   
   Checking those. I edited your comment by mistake, @ljmotta . Sorry
   
   


-- 
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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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

   - Bug: The Hit policy can be changed while on Read Only mode
   <img width="1590" alt="image" src="https://github.com/user-attachments/assets/7bdfb80d-dad8-4f2b-acd8-fd75a89e82ae">
   
   


-- 
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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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


##########
packages/dmn-editor/tests-e2e/readOnly/readOnlyDiagram.spec.ts:
##########
@@ -0,0 +1,59 @@
+/*
+ * 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 { expect, test } from "../__fixtures__/base";
+
+test.beforeEach(async ({ editor, nodes }) => {
+  await editor.openLoanPreQualification();
+  await expect(nodes.get({ name: "Loan Pre-Qualification" })).toBeVisible();
+  await editor.setIsReadOnly(true);
+});
+
+test.describe("Read Only mode - Diagram", () => {

Review Comment:
   Could we maybe unify the naming convention, for the boxed expression component test we described the root of the test as `Readonly` while here we use `Read Only Mode - Diagram`



##########
packages/dmn-editor-standalone/src/DmnEditorStandaloneEnvelopeServer.ts:
##########
@@ -41,7 +41,7 @@ export const createEnvelopeServer = (iframe: HTMLIFrameElement, readOnly?: boole
           resourcesPathPrefix: "",
           fileExtension: "dmn",
           initialLocale: "en-US",
-          isReadOnly: readOnly ?? true,
+          isReadOnly: readOnly ?? false,

Review Comment:
   Could we please confirm this change has no effect for the:
   - Embed feature of the online-editor [1]
   - Opening a dmn diagram using a chrome-extension?
   
   [1]
   ![Screenshot 2024-08-21 092555](https://github.com/user-attachments/assets/2e8a9452-59d4-4124-b4bb-8c0c0570fceb)
   



-- 
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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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


-- 
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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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

   @jomarko Thanks for the review!
   
   The overlay options don't change the XML; it was a choice to leave them enabled. But the color pickers should be disabled. That was a nice catch!
   I've fixed that in the last commit and the test 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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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

   > * Bug: The Hit policy can be changed while on Read Only mode
   > 
   > <img alt="image" width="1539" src="https://private-user-images.githubusercontent.com/10515135/359619300-ef83fa8d-3113-4ac4-b93e-a5a5b912e422.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxODQwNTAsIm5iZiI6MTcyNDE4Mzc1MCwicGF0aCI6Ii8xMDUxNTEzNS8zNTk2MTkzMDAtZWY4M2ZhOGQtMzExMy00YWM0LWI5M2UtYTVhNWI5MTJlNDIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDE5NTU1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBmODE2NjgyMDc5NGFkYzQ4YWMzNmZhODljY2VmOTFjM2QzZWE5MmQxYWZlNmFkYjcwZWUyNDZiMTY1NDU3YzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.swl4fBZCNhCeFuTh4gs6vVIYzN_tashMt_w2_00R-jw">
   
   This is already fixed in the PR I opened for you.


-- 
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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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

   @danielzhe ^


-- 
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#1445: New DMN Editor: Support read-only mode [incubator-kie-tools]

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


##########
packages/dmn-editor-standalone/src/DmnEditorStandaloneEnvelopeServer.ts:
##########
@@ -41,7 +41,7 @@ export const createEnvelopeServer = (iframe: HTMLIFrameElement, readOnly?: boole
           resourcesPathPrefix: "",
           fileExtension: "dmn",
           initialLocale: "en-US",
-          isReadOnly: readOnly ?? true,
+          isReadOnly: readOnly ?? false,

Review Comment:
   The embed editor is still the classic one, so this change won't affect it. The same goes for the chrome-extension.
   
   But, once the new one becomes the default, we just need to set the readOnly flag to true when required.



-- 
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