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

DROOLS-3243: [DMN Designer] Move the Data Type dialog to a tab in the DMN editor #2314

Merged
merged 7 commits into from
Nov 30, 2018

Conversation

karreiro
Copy link
Contributor

@karreiro karreiro commented Nov 27, 2018

See:


DROOLS-3243:
tab

DROOLS-3056:
The core of the performance enhancement in this PR lives in the DataTypeListItemView. All @DataFields are lazy now, this decision makes the code more prolix but considerably increases the performance.

Before this improvement, the instantiation of a DataTypeListItem in the DataTypeList was taking ~29ms*, and now it takes less than ~9ms, it has a significant impact when the DMN file has a lot a Data Types.

For the scenario that Jozef raised here, the remove operation still holds a small delay but a considerable improvement can be noticed.

The next (and final improvement) will be an enhancement in the algorithm that elects the dependent Data Types in the ItemDefinitionRecordEngine. However, for now, I do think that the current optimisations are good enough.

* The title of the JIRA says 100ms, but I could make some optimisations before starting the real work in the JIRA.

Copy link

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

Some comments to code

@jomarko
Copy link

jomarko commented Nov 28, 2018

I see two vertical scrollbars on right site is it expected?
screenshot from 2018-11-28 12-44-13

@jomarko
Copy link

jomarko commented Nov 28, 2018

It seems we have again issue that not all data type definitions are visible:
screenshot from 2018-11-28 12-45-14

@jomarko
Copy link

jomarko commented Nov 28, 2018

If user navigates to Data Types tab from Boxed expression, the NameAndDataType popup remains shown.

@jomarko @karreiro See my comment here.

screenshot from 2018-11-28 12-44-03

@jomarko
Copy link

jomarko commented Nov 28, 2018

Save of whole diagram doesn't shown FlashMessages. Please follow my steps.

  • Open Data Types tab
  • Add tNum:number Item Definition, save it inline
  • Add new Item Definition, put tNum into name input field
  • Try to save inline - Flash message will be thrown
  • Try to save globally - whole diagram - no message will be thrown

@jomarko
Copy link

jomarko commented Nov 28, 2018

Global save doesn't cancel edit operation of particular item definitions, please follow my steps:

  • Click data types tab
  • Add item definition
  • Fill name and type, don't click save inline - keep edit mode active
  • Click global asset save
  • Edit mode of item definition remains active, however if you reopen diagram, previously defined item definition will be stored

I think we should cancel edit mode of item definitions if global save was clicked

@jomarko
Copy link

jomarko commented Nov 28, 2018

@karreiro thanks for PR, really nice coverage and performance seems to be really better! However I would like to ask you to check comments above before approval.

@karreiro
Copy link
Contributor Author

karreiro commented Nov 28, 2018

@jomarko Thank you for the review. I'm already working in your comments. :-)

@karreiro karreiro force-pushed the DROOLS-3243 branch 3 times, most recently from 960e744 to 77b47e7 Compare November 29, 2018 16:25
@karreiro
Copy link
Contributor Author

karreiro commented Nov 29, 2018

Thank you for the review @manstis @jomarko. Changes applied.

@jomarko,

Regarding the issues, you mentioned above.

1) Scroll bars issue
explanation
Fixed:
screen shot 2018-11-29 at 2 27 03 pm


2) Some data type definitions are not visible
Fixed:
screen shot 2018-11-29 at 2 13 23 pm


3) The NameAndDataType popup is not closed when the user navigates to the Data Types tab
Fixed:
2018-11-29 2 26 00 pm


4) About these two topics:
a) Save of the whole diagram doesn't show FlashMessages
b) Global save doesn't cancel edit operation of particular item definitions

I don't see both as issues. They look like the expected behavior. I think we could raise a JIRA (involving Liz) to discuss more them, and eventually, implement the discussed approach in a future PR. Wdyt?

@jomarko
Copy link

jomarko commented Nov 30, 2018

@karreiro thank you, I am going to re-review quickly today, could you please add point 4) to our weekly meeting agenda?

Copy link

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

Manual check pending

Copy link

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

@karreiro I can confirm 1) 2) and 3) works great now. Approving regardless of answers on my questions.

@karreiro
Copy link
Contributor Author

@jomarko Thank you. I've extracted the constants for the page indexes as suggested.

Copy link
Member

@manstis manstis left a comment

Choose a reason for hiding this comment

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

Just a couple of follow up questions.

Liking what you did to DataTypeListItemView -- I guess the Errai binding takes a ton of time!

@karreiro
Copy link
Contributor Author

@manstis Changes applied.

Copy link
Member

@manstis manstis left a comment

Choose a reason for hiding this comment

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

Thanks @karreiro :-)

@karreiro karreiro merged commit f6fd0f1 into kiegroup:master Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants