-
Notifications
You must be signed in to change notification settings - Fork 220
kie-issues#451: Implement autolayout on the new React-based DMN Editor for DMN files without Diagram information - Part 1 #2341
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
Conversation
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 PR, my only point for discussion is the terminology we use. In the new modal we inform user about some missing DRD in DRG, what is aligned with DMN standard terminology I think.
However, what is the actual problem in human language. IIUC, there is no information, about nodes placement, their shapes, sizes, is that correct? I do not have a clear answer but from my point of view it is a point that somehow should share opinion about it, if we should be closer to the standard terminology or closer to human language.
Recently I know there was requirement from Gabriele for the data types tab, to remove the term Structure
and start to use the term Complex
to be aligned with standard. There I think both are quite understandable for the human.
Here I am not sure if the term DRD is enough understandable for the user. I mean, Does user confirming this new modal understand what will happen in the diagram? Or, does the user understand what is consequence of clicking yes and what is a consequence of clicking no?
{ | ||
"@_id": generateUuid(), | ||
"@_name": getDefaultDrdName({ drdIndex: 0 }), | ||
"@_useAlternativeInputDataShape": false, |
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.
we invoke autoGenerateDrd
from the Diagram.tsx
. There on many places we dynamically check for this alternative shape setting like state.computed(state).isAlternativeInputDataShape()
. is it expected, here, in autoGenerateDrd.ts
we hard-code alternative shape to false?
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.
The modal will popup as soon as the user open the DMN model (e.g. first time opening the Editor). As false
is the default value for any new model, I've harded code this value. The user still can change this option on the DRD dropdown.
@jomarko Thanks for bringing this up. I agree, I will add more information to the user, like the node placement, sizes and consequences of the yes/no choice. Now, regarding the specific terminology, the editor is specific to DMN models so I think we can assume the user will know a few things at least. It's a gray area for me, and in this case I'd say it's not necessary to explain what is DRD and DRG as both are very important DMN concepts. What you guys think? @tiagobento @baldimir @yesamer @gitgabrio |
@ljmotta wdyt ? |
About the terminology: I guess it's fine to use the proposed sentence by Gabriele, but I'm not against using the DRG and DRD acronyms. Maybe, we can use the extended form as an alternative (eg. Decision Requirement Diagram / Graph), or use the info icon with a popup to better clarify it. About the current implementation, I like it, well done @ljmotta. In addition, I would consider just to manage this scenario:
Based on that, can we consider ALWAYS showing the modal, without a yes/no option, until the user explicitly wants to autogenerate it? Eg. ![]() In that way, the users:
WDYT? |
Hi, as discussed in the typeConstraint and allowedValues issue, I think the best would be to add clarifications in a hint (or the "i" icon). Similar approach should be applied everywhere throughout the application I think, so it starts to be self-documented to some extent. |
@yesamer @gitgabrio @jomarko I've updated the PR description with the new modal. I've used a piece of each idea, and I'm very happy with the result. WDYT? |
I love it. Nicely done! Looks great. +1 from me! |
Very nice, thanks @ljmotta ! 👍 |
I'm late for the discussion but I don't like the terms DRG and DRD and I agree with @gitgabrio In the old editor, I was the one who created the modal for this case. We had some discussion about at that time and the sentence we chose to use at the time was: "The diagram does not have layout information". We never used the terms "DRG" or "DRD". I saw you changed the message @ljmotta and I think the new terms are great and very clear to the user what is happening. |
It looks great!!! Thank you @ljmotta for listening to our feedback and implementing a nice solution! |
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.
Great work! I didn't find any issue with the DMN models without layout I had.
This PR is part of apache/incubator-kie-issues#451
Description
This PR adds a new empty modal for DMN models that have a DRG and doens't have a DRD.
Clicking in "Auto-generate Diagram" will auto-generate a DRD with the auto-layout applied. Clicking in "I'll create the Diagram myself" will keep the DRD empty. If the user wants to interact with the DRG nodes, it will need to use the "DRG Nodes" option from the palette.
This PR also:
AutoLayoutButton
to theautoLayouy.ts
andAutoLayoutHook.ts
.