feat(modeler): add input type dropdown#989
Open
djoysilva wants to merge 2 commits intobpmn-io:developfrom
Open
feat(modeler): add input type dropdown#989djoysilva wants to merge 2 commits intobpmn-io:developfrom
djoysilva wants to merge 2 commits intobpmn-io:developfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Include on canvas a select type reference dropdown for Input Data.
A select control (TypeRefDropdown) is rendered as an overlay on Input Data element on the canvas. The overlay is managed by TypeRefBehavior which shows the dropdown on element click/created.
Purpose
Let users changes the element's typeRef variable directly on the canvas without the need for using the properties panel
Component changes:
[NEW] TypeRefDropdown: renders the select control and calls
[NEW] TypeRefBehavior: manages the overlay UI, build options (via dataTypes + translate) and updates the model (via modeling) when the dropdown changes.
dmn-js-drd lib: Imports and registers TypeRefBehavior in index.js
dmn-js-drd tests: DRD tests were updated to import overlays and dataTypes modules required by the new behavior.
Step by step for manual test:
1- Drag and drop the InputData element on the canvas
2 - You should see the dropdown with type reference options
3 - Select a type reference
4 - Click in a different element on the canvas, you shouldn't see the dropdown on InputData anymore
5 - Click on InputData element again and it should show the dropdown with the same selected type reference
6 - Any changes on the type reference for a specific InputData, should be reflected on it's variable.typeRef element in the xml file
Checklist
Ensure you provide everything we need to review your contribution:
Closes {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}@bpmn-io/srtool