-
Notifications
You must be signed in to change notification settings - Fork 219
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-2755: [DMN Designer] Error when the user switches between DMN files #2003
Conversation
}); | ||
} | ||
|
||
private void focusLastParameter(final HasParametersControl hasParameters) { |
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 was added in addition to the scope of the JIRA to ensure the text in the "Parameters" popup editor (for a Function
) was not selected (as a result of the double click on the canvas). It manifested itself while I was testing the fix in drools-wb-webapp
(I thought to fix now, rather than file a new JIRA).
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 :-)
@@ -71,6 +81,11 @@ public DMNEditorSession(final ManagedSession session, | |||
stunnerPreferencesRegistry); | |||
} | |||
|
|||
@Override | |||
public ManagedSession getSession() { |
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.
Changes access modifier to public
(from protected
).
@@ -43,14 +53,25 @@ public DMNViewerSession(final ManagedSession session, | |||
canvasCommandManager); | |||
} | |||
|
|||
@Override | |||
public ManagedSession getSession() { |
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.
Changes access modifier to public
(from protected
).
@@ -14,6 +14,6 @@ | |||
~ limitations under the License. | |||
--> | |||
|
|||
<div> | |||
<div class="uf-no-select"> |
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.
Prevents the text in the "popup" context menu ("insert row..", "insert column.." etc and the "Expression type" selector for an UndefinedExpressionGrid
) from being selected (again, this was found testing this PR in drools-wb-webapp
).
Jenkins please retest this. |
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.
Very good approach for the problem, @manstis :-)
(it tried locally, and it's working fine too)
Thank you.
}); | ||
} | ||
|
||
private void focusLastParameter(final HasParametersControl hasParameters) { |
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 :-)
@jomarko This is OK for review now thank-you. |
DOMUtil.removeAllChildren(parametersContainer); | ||
parameters.forEach(parameter -> parametersContainer.appendChild(makeParameterView(parameter).getElement())); | ||
parameterViewInstances.forEach(parameterView -> parametersContainer.appendChild(parameterView.getElement())); | ||
} |
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.
Missing coverage for this method.
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.
@jomarko Test in new commit.
return; | ||
} | ||
parameterViewInstances.get(index).focus(); | ||
} |
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.
Missing coverage for this method.
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.
@jomarko Test in new commit.
final Integer width = parentElement.getOffsetWidth(); | ||
final Integer height = parentElement.getOffsetHeight(); | ||
|
||
if (width > 0 && height > 0) { |
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.
In unit tests we don't have covered case when this if is 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.
@jomarko Test in new commit.
@jomarko This is ready for re-review. There was a nasty merge conflict that I've waved my magic wand at; however https://issues.jboss.org/browse/DROOLS-2564 could be affected (I tested locally and it appears OK however you might want to double check). |
@jomarko PS This PR also fixes https://issues.jboss.org/browse/DROOLS-2765 you might want to double check that too (at the moment a Stunner read-only session prevents the User from viewing the grid view of the graph nodes.. I propose a new JIRA for that). |
jenkins execute full downstream build |
Jenkins please execute full downstream build. |
…files. Updates following peer review.
…files. Changes following rebase.
Jenkins please execute full downstream build. |
Jenkins please execute full downstream build. |
…files (kiegroup#2003) * DROOLS-2755: [DMN Designer] Error when the user switches between DMN files * DROOLS-2755: [DMN Designer] Error when the user switches between DMN files. Updates following peer review. * DROOLS-2755: [DMN Designer] Error when the user switches between DMN files. Changes following rebase.
See https://issues.jboss.org/browse/DROOLS-2755
I moved all the
@ApplicationScoped
injection (that was making the editor unusable as "multi-instance") to use Stunner'sCanvasControls
andManagedSession
(that acts as a session scoped factory for different controls ). I've previously used this for a cache but now use the mechanism a bit more for the different objects I need at (Stunner) session scope (not to be confused with HTTP session).