Skip to content
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#1636: DMN Editor throw an error opening Included Models tab #2846

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Kusuma04-dev
Copy link
Contributor

closes apache/incubator-kie-issues#1636 DMN Editor throw an error opening Included Models tab

@yesamer
Copy link
Contributor

yesamer commented Jan 10, 2025

@Kusuma04-dev thank you for your PR!
Can you please share a screenshot of the change?
I mean, what is the impact of changing that Button to a div?

@Kusuma04-dev
Copy link
Contributor Author

Kusuma04-dev commented Jan 10, 2025

@Kusuma04-dev thank you for your PR! Can you please share a screenshot of the change? I mean, what is the impact of changing that Button to a div?

Before fix: There is a console error when we open included models which is telling button inside button shouldn't be there .
Screenshot 2025-01-10 at 1 58 39 PM

After fix:
Screenshot 2025-01-10 at 2 27 43 PM

Copy link
Contributor

@yesamer yesamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Kusuma04-dev .
I suspect that Button element was added just for styling purposes.
If you notice, in the UI the Kebab Element has a different style with your changes.

Said so, your changes are correct from my point of view. if my above suspect is true, you can even totally remove that element, and not replace it with a div, unless we need that to stop the event propagation to the Kebab element. (to be checked)

My only doubt is about the element's style. Should we preserve it?

@jomarko
Copy link
Contributor

jomarko commented Jan 10, 2025

I postpone my review until there is an answer for @yesamer comment.

@Kusuma04-dev
Copy link
Contributor Author

Thank you @Kusuma04-dev . I suspect that Button element was added just for styling purposes. If you notice, in the UI the Kebab Element has a different style with your changes.

Said so, your changes are correct from my point of view. if my above suspect is true, you can even totally remove that element, and not replace it with a div, unless we need that to stop the event propagation to the Kebab element. (to be checked)

My only doubt is about the element's style. Should we preserve it?

Hi Yeser, Yeah i have kept div tag to stop event propogation ,also i don't see difference in the style ,as i have attached one ss with full screen and another with half screen , it might be looking different .

@Kusuma04-dev Kusuma04-dev requested a review from yesamer January 10, 2025 10:53
Copy link
Contributor

@yesamer yesamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kusuma04-dev Thank you for the clarification. The little difference I see in the style is on the Kebab component color: in the first screenshot it looks darker than the second one. However, it's just a minor difference, LGTM.

@ljmotta
Copy link
Contributor

ljmotta commented Jan 10, 2025

@Kusuma04-dev As @yesamer pointed it out, previously, the buttom was gray (not black) and changed color on hover. I don't think it's a problem to remove the hover if we don't have another solution for it.

previous-kebab.mp4

@Kusuma04-dev
Copy link
Contributor Author

@Kusuma04-dev As @yesamer pointed it out, previously, the buttom was gray (not black) and changed color on hover. I don't think it's a problem to remove the hover if we don't have another solution for it.

previous-kebab.mp4

Hi Luiz, i have added css styles to make it look like before.

Copy link
Contributor

@jomarko jomarko left a 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. I can confirm there is no error in the browser console log 🥳 .

The only suggestion I have is to keep kie-tools css classes naming. We prefix custom classes in a way kie-[something like package]-- and then the new class is kie-[something like package]--[actual new name]. Maybe other colleagues will have better suggestion for new css names.

Good job!

packages/dmn-editor/src/includedModels/IncludedModels.css Outdated Show resolved Hide resolved
packages/dmn-editor/src/includedModels/IncludedModels.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@jomarko jomarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tiagobento tiagobento changed the title kie-issues#1636:DMN Editor throw an error opening Included Models tab kie-issues#1636: DMN Editor throw an error opening Included Models tab Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DMN Editor throw an error opening Included Models tab
4 participants