Skip to content

Conversation

DiegoCardoso
Copy link
Contributor

Description

Reverts and adds a new check for the case where the <vaadin-icon> is attached to an element with shadow root.

Fixes vaadin/flow-components#8084

Type of change

  • Bugfix

@DiegoCardoso DiegoCardoso requested a review from vursen October 6, 2025 10:40
? superclass
: class extends ResizeMixin(superclass) {
static get observers() {
return ['__iconFontSizeMixinfontChanged(iconClass, char, ligature)'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use Lit lifecycle callback instead:

updated(props) {
  super.updated(props);

  if (props.has('iconClass') || props.has('char') || props.has('ligature')) {
    this.__updateFontIconSize();
  }
}

This should make it unnecessary to call method in ready(), as updated() runs synchronously ready(), unlike complex observers that run before, and therefore single invocation for method should be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done.

Copy link

sonarqubecloud bot commented Oct 7, 2025

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.

FontIcon overflows container when used directly in Button or Layout in IOS
2 participants