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

[FEAT] Add API to search elements by BPMN Kinds #954

Merged
merged 4 commits into from
Dec 18, 2020

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Dec 16, 2020

Let pass one or several BPMN Kinds to get BpmnElements.
This implementation relies on CSS selectors for searching elements. It will be
possible to avoid this when the BpmnModel will be available and will provide
search capabilities (see #953).

closes #927

@tbouffard tbouffard added enhancement New feature or request WIP 🚧 Pull request in progress and/or not ready for review. Used in addition to marking it as draft BPMN diagram usability Something about the way we can interact with BPMN diagrams labels Dec 16, 2020
@@ -35,8 +37,37 @@ export class BpmnElementsRegistry {
.filter(e => e)
.map(bpmnSemantic => ({ bpmnSemantic: bpmnSemantic, htmlElement: this.htmlElementRegistry.getBpmnHtmlElement(bpmnSemantic.id) }));
}

getElementsByKinds(bpmnKinds: BpmnKind | BpmnKind[]): BpmnElement[] {
Copy link
Member

Choose a reason for hiding this comment

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

👍

Comment on lines 68 to 61
// TODO rename into BpmnElementKind (for consistency with argument of computeBpmnBaseClassName otherwise, rename the argt)
export type BpmnKind = FlowKind | ShapeBpmnElementKind;
Copy link
Member Author

Choose a reason for hiding this comment

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

@aibcmars @csouchet what do you think about this naming?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have decided to name it BpmnElementKind for consistency

@tbouffard tbouffard force-pushed the 927-get_bpmn_elements_by_bpmn_kinds branch from 7c749cf to 3614bb8 Compare December 18, 2020 09:27
@tbouffard tbouffard changed the title [FEAT] Select elements by BPMN kinds [FEAT] Add API to search elements by BPMN Kinds Dec 18, 2020
@tbouffard tbouffard removed the WIP 🚧 Pull request in progress and/or not ready for review. Used in addition to marking it as draft label Dec 18, 2020
@tbouffard tbouffard marked this pull request as ready for review December 18, 2020 09:31
@tbouffard tbouffard requested review from a team, csouchet and aibcmars and removed request for a team December 18, 2020 09:31
@tbouffard tbouffard added depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first WIP 🚧 Pull request in progress and/or not ready for review. Used in addition to marking it as draft labels Dec 18, 2020
Let pass one or several BPMN Kinds to get BpmnElements.
This implementation relies on CSS selectors for searching elements. It will be
possible to avoid this when the BpmnModel will be available and will provide
search capabilities.

# Conflicts:
#	src/component/registry/bpmn-elements-registry.ts

# Conflicts:
#	src/component/registry/bpmn-elements-registry.ts
Better exclude the label instead of using the hacky style attribute
@tbouffard tbouffard force-pushed the 927-get_bpmn_elements_by_bpmn_kinds branch from 3614bb8 to e5b1bd9 Compare December 18, 2020 14:12
@sonarcloud
Copy link

sonarcloud bot commented Dec 18, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@tbouffard tbouffard removed WIP 🚧 Pull request in progress and/or not ready for review. Used in addition to marking it as draft depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first labels Dec 18, 2020
@aibcmars
Copy link
Contributor

LGTM
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BPMN diagram usability Something about the way we can interact with BPMN diagrams enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Allow to select several BPMN Html Elements for interaction
3 participants