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

modeling#setColor sets color on BPMNPlane #1734

Closed
barmac opened this issue Sep 2, 2022 · 4 comments · Fixed by #1735
Closed

modeling#setColor sets color on BPMNPlane #1734

barmac opened this issue Sep 2, 2022 · 4 comments · Fixed by #1735
Assignees
Labels
bug Something isn't working spring cleaning Could be cleaned up one day

Comments

@barmac
Copy link
Member

barmac commented Sep 2, 2022

Describe the Bug

bpmn-in-color extensions can be used only on BPMNShapes, BPMNEdges, and BPMNLabels. The modeling#setColor allows to set color on any DI element though.

Cf. https://github.com/bpmn-io/bpmn-js-integration/runs/8151588491?check_suite_focus=true#step:6:350

Steps to Reproduce

At https://demo.bpmn.io/s/start, open the devtools, and paste the following commands:

const { modeler } = bpmnio
const elements = modeler.get('elementRegistry').getAll()
modeler.get('modeling').setColor(elements, { fill: 'black', stroke: 'white' })
elements[0].di.$attr
{background-color: '#000000', border-color: '#ffffff', stroke: '#ffffff', fill: '#000000'}

Notice that process' DI contains invalid attributes.

Expected Behavior

The handler should ignore DI elements which cannot have colors.

Environment

  • Browser: [e.g. IE 11, Chrome 69]
  • OS: [e.g. Windows 7]
  • Library version: [e.g. 2.0.0]
@barmac barmac added the bug Something isn't working label Sep 2, 2022
@nikku
Copy link
Member

nikku commented Sep 2, 2022

Good one. You'd like to fix it right away? Otherwise let's move it to backlog and mark as spring cleaning.

@barmac
Copy link
Member Author

barmac commented Sep 2, 2022

Not sure. Let's move it to the backlog for now.

@barmac barmac added backlog Queued in backlog spring cleaning Could be cleaned up one day labels Sep 2, 2022
@barmac barmac self-assigned this Sep 2, 2022
barmac added a commit to bpmn-io/bpmn-js-integration that referenced this issue Sep 2, 2022
The issue was not detected before the migration.
Revert this commit as soon as bpmn-io/bpmn-js#1734
is fixed.
barmac added a commit to bpmn-io/bpmn-js-integration that referenced this issue Sep 2, 2022
The issue was not detected before the migration.
Revert this commit as soon as bpmn-io/bpmn-js#1734
is fixed.
barmac added a commit to bpmn-io/bpmn-js-integration that referenced this issue Sep 2, 2022
The issue was not detected before the migration.
Revert this commit as soon as bpmn-io/bpmn-js#1734
is fixed.
fake-join bot pushed a commit to bpmn-io/bpmn-js-integration that referenced this issue Sep 2, 2022
The issue was not detected before the migration.
Revert this commit as soon as bpmn-io/bpmn-js#1734
is fixed.
@barmac
Copy link
Member Author

barmac commented Sep 2, 2022

I am actually looking into this right now and should follow up with a PR soon.

@barmac barmac added in progress Currently worked on and removed backlog Queued in backlog labels Sep 2, 2022
barmac added a commit that referenced this issue Sep 2, 2022
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Sep 2, 2022
fake-join bot pushed a commit that referenced this issue Sep 2, 2022
barmac added a commit to bpmn-io/bpmn-js-integration that referenced this issue Sep 5, 2022
fake-join bot pushed a commit to bpmn-io/bpmn-js-integration that referenced this issue Sep 5, 2022
@smbea
Copy link
Contributor

smbea commented Sep 5, 2022

Closed via #1735

@smbea smbea closed this as completed Sep 5, 2022
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Sep 5, 2022
philippfromme added a commit to bpmn-io/bpmn-js-token-simulation that referenced this issue Jan 31, 2023
nikku pushed a commit to bpmn-io/bpmn-js-token-simulation that referenced this issue Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working spring cleaning Could be cleaned up one day
Development

Successfully merging a pull request may close this issue.

3 participants