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

Follow html pattern for icon loading #1918

Closed
smbea opened this issue May 26, 2023 · 3 comments · Fixed by #1920
Closed

Follow html pattern for icon loading #1918

smbea opened this issue May 26, 2023 · 3 comments · Fixed by #1920
Assignees

Comments

@smbea
Copy link
Contributor

smbea commented May 26, 2023

What should we do?

Replace instances where we use "embedded icons" and replace it with html, like bpmn-io/bpmn-js-create-append-anything#7

Why should we do it?

To establish a single pattern and be consistent across our stack

@smbea smbea added the ready Ready to be worked on label May 26, 2023
@smbea smbea self-assigned this May 26, 2023
@smbea
Copy link
Contributor Author

smbea commented Jun 1, 2023

The instances of "embedded icons" in bpmn-js are the align and distribute icons. The icons that are rendered with the popup menu can't be changed as easily.

Firstly we need to allow html in diagram-js popup menu component, which we currently don't.

Then there is challenge with using htm's html`...` utility. In previous cases, we would pass html: "<div>some html string</div>", and we would domify it and add it to the tree. With popup menu, I'm having trouble rendering this in the htm context.

What I can imagine works is using the html`...` utility in bpmn-js but that would introduce differ from non-popup menu places.

@nikku
Copy link
Member

nikku commented Jun 1, 2023

What keeps us from using dangerouslySetInnerHTML? I believe it should work with htm, too?

smbea added a commit to bpmn-io/diagram-js that referenced this issue Jun 2, 2023
smbea added a commit to bpmn-io/diagram-js that referenced this issue Jun 2, 2023
@smbea
Copy link
Contributor Author

smbea commented Jun 2, 2023

Nothing. That did the trick, thanks!

smbea added a commit to bpmn-io/diagram-js that referenced this issue Jun 2, 2023
nikku pushed a commit to bpmn-io/diagram-js that referenced this issue Jun 2, 2023
smbea added a commit that referenced this issue Jun 5, 2023
@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed ready Ready to be worked on labels Jun 5, 2023
smbea added a commit that referenced this issue Jun 5, 2023
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Jun 5, 2023
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jun 5, 2023
smbea added a commit that referenced this issue Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants