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
JBPM 8915 : Stunner - Properties panel is being closed when switching assets or views #3129
Conversation
Jenkins execute full downstream build |
War can be downloaded from https://drive.google.com/file/d/1LpSAYuPDwoL6Gzkm1xLEyMm7oSS1nmji/view?usp=sharing |
Hi @romartin war was uploaded, can you review it? |
@@ -59,6 +65,9 @@ | |||
private final SessionManager clientSessionManager; | |||
private final Event<ChangeTitleWidgetEvent> changeTitleNotificationEvent; | |||
private final DiagramEditorScreenView view; | |||
private final Event<ScreenPreMaximizedStateEvent> screenStateEvent; | |||
private final Event<ScreenDiagramModelUnSelectedEvent> screenDiagramModelUnSelectedEventEvent; |
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.
Does this need to be called ...EventEvent
?
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.
My bad @manstis will change it
@@ -59,6 +65,9 @@ | |||
private final SessionManager clientSessionManager; | |||
private final Event<ChangeTitleWidgetEvent> changeTitleNotificationEvent; | |||
private final DiagramEditorScreenView view; | |||
private final Event<ScreenPreMaximizedStateEvent> screenStateEvent; | |||
private final Event<ScreenDiagramModelUnSelectedEvent> screenDiagramModelUnSelectedEventEvent; | |||
private final Event<ScreenDiagramPropertiesSwitchingSessionsEvent> screenDiagramPropertiesSwitchingSessionsEventEvent; |
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.
Does this need to be called ...EventEvent
?
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.
My bad @manstis will change it
@@ -81,6 +88,10 @@ | |||
|
|||
private Consumer<Boolean> saveCallback; | |||
private boolean isMigrating = false; | |||
private boolean useTimer = true; |
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.
Instead of adding test support with a flag it might be better to do:-
protected void deferOpenPropertiesDocks(final Command command) {
new Timer() {
@Override
public void run() {
command.execute();
}
}.schedule(10);
}
...
@OnFocus
public void onFocus() {
final boolean shouldOpen = isPropertiesOpenedBeforeSwitchingSessions;
super.doFocus();
if (shouldOpen) {
deferOpenPropertiesDocks( ()-> openPropertiesDocks());
}
}
Then in the test you can do:-
//I think this is the correct syntax!
doAnswer(i-> ((Command) i.getParameters[0]).execute()).when(diagramEditor).deferOpenPropertiesDocks(any(Command.class)));
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 @manstis thanks for the tip, will change it
Jenkins execute full downstream build |
1 similar comment
Jenkins execute full downstream build |
Hi @LuboTerifaj I added the changes from the other PR about minimize panel, Explore panel should also work now on this PR |
Jenkins execute full downstream build |
1 similar comment
Jenkins execute full downstream build |
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.
Hello @inodeman ,
the issue is not fixed for every case.
-
If you have two assets with opened Properties or Explore diagram panel and you are switching between them, the panel is being closed.
You can switch between them either by using dropdown menu or using breadcrumb navigation panel.
Steps to reproduce:- Create process (or Case Definition or Case Management) "A"
- Navigate to project using breadcrumbs.
- Create process (or CD or CM) "B"
- Open Explore diagram panel (it also applies to Properties panel in CM).
- Open process "A" (using drop-down menu or breadcrumbs).
Explore diagram panel should be open here (it also applies to Properties panel in CM). - Open back process "B".
Explore diagram panel should be open here (it also applies to Properties panel in CM).
-
The issue when switching between Model, Overview and Documentation is not fixed either.
Steps to reproduce:
The first issue:- Ensure that Explore diagram panel is open.
- Click on Overview or Documentation panel.
- Click on Model
Explore diagram should be open.
The second issue:
- Ensure that Properties panel is open.
- Click on Overview or Documentation panel.
- Open Explore diagram panel.
- Click on Model
Explore diagram should be open.
-
There is also the issue with DMN editor. The Properties or Explore diagram panel is always closed when switching between assets. However, this is probably out of scope of this jira.
One more thing, can you please change the commit message since the https://issues.redhat.com/browse/JBPM-8997 is duplicate issue of https://issues.redhat.com/browse/JBPM-8915? I've already closed the former.
Thank you!
Please @inodeman this need rebase and rebuilds, otherwise we cannot proceed with the testing. thansk! |
Hi @romartin as requested by @LuboTerifaj I am making changes so that Case Definition Diagrams are also supported, the changes I initially made are for BPMN Diagrams only, also requested DMN Diagrams, so I need to add those 2 scenarios |
ok thanks @inodeman , in fact it makes sense all editors behave the same way. But in case issues appears on other editors (CM/DMN) I would suggest creating a new ticket and merging this one, at least, which fixes the concrete issue requested. |
Jenkins execute full downstream build |
Hi @romartin rebased and resolved conflicts now |
Jenkins execute full downstream build |
Hi @LuboTerifaj artifacts generated, can you check this PR? |
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.
Neither of the issues mentioned in my previous review is fixed.
See the summary below.
If you have two assets with opened Properties or Explore diagram panel and you are switching between them, the panel is being closed.
- You can switch between them either by using dropdown menu or using breadcrumb navigation panel.
Steps to reproduce:- Create process (or Case Definition or Case Management) "A"
- [Optional] Open Explore diagram panel.
- Navigate to project using breadcrumbs.
- Create process (or CD, CM) "B".
- [Optional] Open Explore diagram panel.
- Open process "A" (using drop-down menu or breadcrumbs).
Neither Properties nor Explore diagram panel is open. - Open back process "B".
Neither Properties nor Explore diagram panel is open.
The issues when switching between Model, Overview and Documentation are still not fixed.
Steps to reproduce:
-
The first issue:
- Ensure that Explore diagram panel is open.
- Click on Overview or Documentation panel.
- Click on Model.
Explore diagram is not open.
-
The second issue:
- Ensure that Properties panel is open.
- Click on Overview or Documentation panel.
- Open Explore diagram panel.
- Click on Model.
Explore diagram is not open. Properties panel is open instead.
The commit message is not changed.
Kie code style is not applied in every file. See my comments inline.
import org.kie.workbench.common.stunner.core.client.session.event.BaseSessionEvent; | ||
|
||
public class ScreenDiagramModelUnSelectedEvent extends BaseSessionEvent { | ||
public ScreenDiagramModelUnSelectedEvent(final ClientSession session) { |
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.
public ScreenDiagramModelUnSelectedEvent(final ClientSession session) { | |
public ScreenDiagramModelUnSelectedEvent(final ClientSession session) { |
import org.kie.workbench.common.stunner.core.client.session.event.BaseSessionEvent; | ||
|
||
public class ScreenDiagramPropertiesSwitchingSessionsEvent extends BaseSessionEvent { | ||
public ScreenDiagramPropertiesSwitchingSessionsEvent(final ClientSession session) { |
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.
public ScreenDiagramPropertiesSwitchingSessionsEvent(final ClientSession session) { | |
public ScreenDiagramPropertiesSwitchingSessionsEvent(final ClientSession session) { |
|
||
private final boolean isExplorerScreen; | ||
|
||
public ScreenPreMaximizedStateEvent(final boolean isExplorerScreen ) { |
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.
public ScreenPreMaximizedStateEvent(final boolean isExplorerScreen ) { | |
public ScreenPreMaximizedStateEvent(final boolean isExplorerScreen) { |
@@ -172,7 +172,7 @@ public void checkDestructionReleasesResources() { | |||
|
|||
@Test | |||
public void checkOnScreenMaximisedDiagramEditor() { | |||
final ScreenMaximizedEvent event = new ScreenMaximizedEvent(true); | |||
final ScreenMaximizedEvent event = new ScreenMaximizedEvent(true ); |
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.
final ScreenMaximizedEvent event = new ScreenMaximizedEvent(true ); | |
final ScreenMaximizedEvent event = new ScreenMaximizedEvent(true); |
Jenkins execute full downstream build |
Jenkins retest please |
Hi @LuboTerifaj right now on the ticket fix works for BPMN files (Explore Panel not included, as it was not mentioned on ticket, will need additional time), for DMN and Case Management will need more time, you can check the issues with BPMN file and I can create jiras for Case and DMN or I can send the fix in a couple of days, let me know what you think? The code style, for some reason was not aplying, I rechecked it now, should be ok, also the commit message |
Hi @LuboTerifaj no problem, I will add Case Management and DMN, should be done early next week |
@inodeman please do not forget this one. I know we're focused on kogito, but that was expected for the previous release and it's a customer request as well, so we shoud complete it anyway. |
no problem @romartin I can start on this tomorrow, just finished the quickstart examples its updates and the error issues creation |
Jenkins execute full downstream build |
Hi @LuboTerifaj , @romartin can you review this PR? @LuboTerifaj note this change only applies to bpmn models, you can test the cases when the user 1) maximizes and minimizes with both explore and properties panel, 2) switches views (Documentation, Overview and back to Diagram) for both the properties and explore, 3) Switching Sessions (Properties and Explore Panels), after you can verify how it is supposed to behave, I will go ahead and include DMN and Case Management models, I think this way, I can code it faster after I get your approval on desired behaviour, let me know |
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
Jenkins execute full downstream build |
1 similar comment
Jenkins execute full downstream build |
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.
Hello @inodeman ,
switching between panels behaviour is not unified. The state of Properties/Explore diagram panel is not remembered for every case. There are two issues:
Steps to reproduce:
- Ensure Properties (Explore diagram) panel is open in Model view.
- Switch to Overview or Documentation.
- Open Explore diagram (Properties) panel and close it back.
- Open Model back.
Actual result: Explore diagram (Properties) panel is open.
Expected result: Properties (Explore diagram) panel is open.
Steps to reproduce:
- Ensure Properties (Explore diagram) panel is closed in Model view.
- Switch to Overview or Documentation.
- Open Explore diagram (Properties) panel and close it back.
- Open Model back.
Actual result: Explore diagram (Properties) panel is open.
Expected result: No panel is open.
Switching between assets is still not fixed. For more information see my review above.
Thanks!
Hi @LuboTerifaj @romartin this PR is ready for review again. This will apply to BPMN process and Case Definition Only, since as commented by @romartin there is no case in doing it for Case Management featture. I fixed some issues in changing tabs, now it should behave as expected. Made a change, where you open Overview or Documentation and Open Properties or Explorer and you change to Documentation or Overview, they will remain open. War can be found here https://drive.google.com/file/d/1i9Q_J8QxTODQ2c1Nj8z4Xt74U15Q3uFG/view?usp=sharing |
… assets or views JBPM-8915 : Stunner - Properties panel is being closed when switching assets or views Added Logs JBPM-8915 : Stunner - Properties panel is being closed when switching assets or views Fixed Maximize / Switching Assets Views
Jenkins retest this |
jenkins do fdb |
SonarCloud Quality Gate failed. |
Jenkins retest this |
jenkins do fdb |
Jenkins retest this |
jenkins do fdb |
Closing - out of date and issue closed |
Hi @romartin can you review this PR? Will upload War in next comment