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

Is WebComponent a Container for other Elements (low prio) #62

Open
jogibear9988 opened this issue Jun 1, 2021 · 7 comments
Open

Is WebComponent a Container for other Elements (low prio) #62

jogibear9988 opened this issue Jun 1, 2021 · 7 comments

Comments

@jogibear9988
Copy link
Contributor

We should also have a configuration to tell if a WebComponent is a container for other elements (maybe a array of querySelectors wich define possible elements)

@jogibear9988
Copy link
Contributor Author

This is needed for a good designer experience, so I know if I could drag other components into

@thepassle
Copy link
Collaborator

How is this different from slots?

@jogibear9988
Copy link
Contributor Author

Not every custom element uses slots

@thepassle
Copy link
Collaborator

Then im not sure what you mean. Can you provide some more information/context and some code examples, and a proposal of what you'd like to happen in the schema?

@jogibear9988
Copy link
Contributor Author

jogibear9988 commented Jun 2, 2021

Okay, maybe we also could use the the empty slot.
But then the empty slot is mandatory, means if it is not there the element is not allowed to have children

@jogibear9988
Copy link
Contributor Author

jogibear9988 commented Jun 2, 2021

or we do something like this
uses #46

   {
        name: "",
        allowedChildren: [":not(*)"]
    }

@jogibear9988 jogibear9988 changed the title Is WebComponent a Container for other Elements Is WebComponent a Container for other Elements (low prio) Feb 16, 2022
@break-stuff
Copy link

We use this plugin to create a custom related property to our manifest, but it would be really nice (especially for documentation purposes) to have this be part of the official schema. We use it to associate components like tabs, tab, and tab-panel or combobox and option.

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

No branches or pull requests

3 participants