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

refactor!: update avatar group to not use Polymer splices API #8145

Merged
merged 4 commits into from
Nov 15, 2024

Conversation

web-padawan
Copy link
Member

Description

Removed usage of .splice() API from vaadin-avatar-group and removed calculateSplices() usage.

From now one, mutating items property is no longer supported, instead it needs to be re-assigned.
Marked as a behavior altering change because of that (but Flow counterpart shouldn't be affected).

Also updated observers syntax which is a pre-requisite for creating LitElement based version.

Type of change

  • Refactor

},

/** @private */
__items: {
Copy link
Member Author

Choose a reason for hiding this comment

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

The __items property was unused so I removed it.

@web-padawan web-padawan force-pushed the refactor/avatar-group-items-change branch from a6847ef to d061382 Compare November 14, 2024 11:02
@@ -231,17 +231,6 @@ class AvatarGroup extends ResizeMixin(OverlayClassMixin(ElementMixin(ThemableMix
value: () => [],
},

/** @private */
__maxReached: {
Copy link
Member Author

Choose a reason for hiding this comment

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

This property was only used in one observer so I decided to inline it there, so that we only have one observer for updating overflow avatar instead of two different ones.

@web-padawan web-padawan force-pushed the refactor/avatar-group-items-change branch from 8467944 to f459ecb Compare November 14, 2024 13:55
@web-padawan web-padawan merged commit 72e1293 into main Nov 15, 2024
9 checks passed
@web-padawan web-padawan deleted the refactor/avatar-group-items-change branch November 15, 2024 08:00
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.6.0.alpha4 and is also targeting the upcoming stable 24.6.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants