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

Add webcomponent/shadowdom support #7717

Closed
2 of 6 tasks
jogibear9988 opened this issue Dec 15, 2023 · 5 comments · May be fixed by #7718
Closed
2 of 6 tasks

Add webcomponent/shadowdom support #7717

jogibear9988 opened this issue Dec 15, 2023 · 5 comments · May be fixed by #7718
Labels
issue: feature request Describes a new feature and why it should be added

Comments

@jogibear9988
Copy link

jogibear9988 commented Dec 15, 2023

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

At the moment blockly is not usable in webcomponents, this issue should track work to support them

Request

Add support for webcomponents

  • Add a sample wich uses blockly in webcomponents
  • Add an API to include the styles in shadowDom
  • Fix issues with Tooltips shown at the wrong position/Dom Node
  • Fix issue with Text inputs shown at the wrong position dom node
  • Styles for Poppuout nodes (like tooltip etc), need to be seperated from the others. Cause the Tooltips for example could be placed in normal dom, and Blockly inside of shadow dom

Alternatives considered

No response

Additional context

No response

@jogibear9988 jogibear9988 added issue: feature request Describes a new feature and why it should be added issue: triage Issues awaiting triage by a Blockly team member labels Dec 15, 2023
@jogibear9988
Copy link
Author

I'll try to work on those open points for WC support

@jogibear9988
Copy link
Author

refs issue: #1114

@jogibear9988 jogibear9988 changed the title Add webcomponnet support Add webcomponent support Dec 15, 2023
@jogibear9988
Copy link
Author

jogibear9988 commented Dec 15, 2023

Blockly.setParentContainer could be used for setting the Parent for Blockly, but this works only once, and with webcomponents you could have multiple blockly components on the page.
So the parentContainer needs to be stored per workspace

But the tooltip could also be shown outside of shadow dom (wich maybe often is also preferable cause of maybe cliping of the tooltip inside the shadowroot), but at first, the position calculation needs to be fixed

@jogibear9988 jogibear9988 changed the title Add webcomponent support Add webcomponent/shadowdom support Dec 15, 2023
@jogibear9988
Copy link
Author

jogibear9988 commented Dec 15, 2023

Question:

I'd like to work on official webcomponent support. But there will be refactorings needed, cause you could have multiple blockly instance with different containers for example for tooltips, ....)

Is this something wich will be accepted later? What are the opinions about this?

Maybe look at my draft with already some changes : #7718

@BeksOmega
Copy link
Collaborator

Hello! I'm going to close this in favor of #1114

Will repost your question on the other thread.

@cpcallen cpcallen removed the issue: triage Issues awaiting triage by a Blockly team member label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: feature request Describes a new feature and why it should be added
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants