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

fix: Scoping issues corrected #4573

Merged
merged 1 commit into from
Jan 13, 2022
Merged

fix: Scoping issues corrected #4573

merged 1 commit into from
Jan 13, 2022

Conversation

vladitasev
Copy link
Contributor

@vladitasev vladitasev commented Jan 13, 2022

⚠️ Important for component developers:

UI5 Web Components tag names may vary. Users can take advantage of the "scoping" feature (#2091), so for example ui5-button could be used as ui5-button-demo. However, it will always have a ui5-button attribute set, no matter what its name is.

Example

<ui5-button-demo ui5-button>Click me</ui5-button-demo>

This attribute will always be there, even if the scoping feature is not used:

Example

<ui5-button ui5-button>Click me</ui5-button>

You must only use this attribute in your code, never the tag name.

The following are not allowed:

  • using the tag name in CSS
  • comparing localName of a component
  • querying the shadow root with a hard-coded local name.

Also, it is important to set dependencies for all components, otherwise the .hbs preprocessor will not scope some of the components used in the shadow root, and the scoping feature will break.

closes: #4528

@vladitasev vladitasev merged commit 4e430d3 into master Jan 13, 2022
@vladitasev vladitasev deleted the fix-scoping-issues branch January 13, 2022 09:06
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 this pull request may close these issues.

ColorPalettePopover doesn't work with setCustomElementsScopingSuffix
2 participants