bpmn-io / bpmn-js

A BPMN 2.0 rendering toolkit and web modeler.
https://bpmn.io/toolkit/bpmn-js/
Other
8.55k stars 1.32k forks source link

fix: show delete action for labels #2200

Closed jarekdanielak closed 3 months ago

jarekdanielak commented 3 months ago

Closes #2163

Proposed Changes

Show delete action for element's label.

image

### Checklist To ensure you provided everything we need to look at your PR: * [X] **Brief textual description** of the changes present * [X] **Visual demo** attached * [ ] **Steps to try out** present, i.e. [using the `@bpmn-io/sr` tool](https://github.com/bpmn-io/sr) * [X] Related issue linked via `Closes {LINK_TO_ISSUE}` or `Related to {LINK_TO_ISSUE}`
CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

lmbateman commented 3 months ago

Just to clarify, does the icon only show up when the label is in edit mode? And does it show up on all elements? Thanks!

nikku commented 3 months ago

It now consistently shows up for all elements, in the editor ("edit mode"). We could decide to (1) hide it for all elements, (2) show it for all elements or (3) keep the (perceived as broken by @barmac) state of not showing it for labels.

barmac commented 3 months ago

The reasoning: I can remove the label via keyboard shortcut (backspace/delete), I can remove it via direct editing, so I should be able to remove it with mouse via context pad. If a modeler implementor disallows label removal via rules, the icon won't show up.

Just to clarify, does the icon only show up when the label is in edit mode? And does it show up on all elements? Thanks!

The bug report comes from the notion that I can delete the element from the context pad, but I cannot delete the label. However, if I remove the element, its label is removed as well.