-
Notifications
You must be signed in to change notification settings - Fork 203
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#1773: DMN Editor: Render badges with evaluation status on Decision nodes #2868
base: main
Are you sure you want to change the base?
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.
This looks good @jomarko, thanks for the PR!
Added a single comment regarding re-renders.
@@ -402,6 +403,13 @@ export const DecisionNode = React.memo( | |||
); | |||
}); | |||
|
|||
const isEvaluationHighlightsEnabled = useDmnEditorStore((s) => s.diagram.overlays.enableEvaluationHighlights); | |||
const { evaluationResults } = useDmnEditor(); | |||
const evaluationResultsClassName = |
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.
This should be a useMemo
to avoid unnecessary re-renders
@jomarko Would it be possible to make the badges not hide the border of the nodes? Also, how do they look like when they're hovered/selected? Another feedback I have it regarding the alignment. I think the |
Hi @tiagobento , 01 hoverThere is no behavior for hovering. We didn't define it in the feature definition phase. What is your suggestion for the 'hover' situation? 02 alignmentShould be fixed. I didn't record a video as it is enough to start playbook as 03 Borderthis is the most problematic as the current border of nodes has width I tried to margin my pseudo element with:
however there is some rounding and it is never correct result. 1px1.5px, 2pxfor both the same result, 1.5 is rounded to 2 What I could do is to change |
@jomarko Right... Hmmm... I think the 2px compromise is better? I'd go with the 2px :D |
Closes: apache/incubator-kie-issues#1773
TODO
evaluationResults
prop instead ofevaluationStatus
that was added in the draftSuccess badge - current proposal
Failure badge - current proposal