Skip to content

Fix/2817 [tag-list] fix flickering of elements inside when zooming#3112

Open
michal-sanoma wants to merge 39 commits intomainfrom
fix/2817_combobox_unstable_appearnace
Open

Fix/2817 [tag-list] fix flickering of elements inside when zooming#3112
michal-sanoma wants to merge 39 commits intomainfrom
fix/2817_combobox_unstable_appearnace

Conversation

@michal-sanoma
Copy link
Copy Markdown
Collaborator

BEFORE

before.mov

AFTER

after.mov

@michal-sanoma michal-sanoma self-assigned this Mar 19, 2026
Copilot AI review requested due to automatic review settings March 19, 2026 07:36
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 19, 2026

🦋 Changeset detected

Latest commit: 856ee89

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package "@sl-design-system/grid" depends on the ignored package "@sl-design-system/example-data", but "@sl-design-system/grid" is not being ignored. Please add "@sl-design-system/grid" to the `ignore` option.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2026

🕸 Website preview

You can view a preview here (commit 856ee898587e99a43861f5b3be62c1a67e853be4).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts sl-tag-list overflow/stack visibility logic to avoid flickering (“layout oscillation”) caused by sub-pixel rounding at certain browser zoom levels.

Changes:

  • Added a 0.5px buffer to the tag visibility calculation threshold to prevent oscillation.
  • Added tests covering the buffer threshold behavior.
  • Added a changeset for a patch release of @sl-design-system/tag.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/components/tag/src/tag-list.ts Adds a sub-pixel buffer to the overflow detection condition to reduce flicker at certain zoom levels.
packages/components/tag/src/tag-list-buffer.spec.ts Adds new spec cases validating behavior on either side of the 0.5px threshold.
.changeset/better-eels-hang.md Documents the patch change for release notes/versioning.

You can also share your feedback on Copilot code review. Take the survey.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2026

🕸 Storybook preview

You can view a preview here (commit 862f65ff50e74e463ab95ef3de862e9fcf3c1926).

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 19, 2026 07:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses flickering in sl-tag-list at certain browser zoom levels by stabilizing the “collapse to stack” visibility calculation in the TagList component.

Changes:

  • Add a small (0.5px) sub-pixel buffer to the TagList width comparison to prevent layout oscillation.
  • Add a new spec covering the buffer threshold behavior.
  • Add a changeset for a patch release of @sl-design-system/tag.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/components/tag/src/tag-list.ts Adds a SUBPIXEL_BUFFER_PX buffer to the “not enough space” check to reduce zoom-related oscillation.
packages/components/tag/src/tag-list-buffer.spec.ts Introduces tests for the new sub-pixel buffer threshold behavior.
.changeset/better-eels-hang.md Declares a patch changeset describing the flicker fix.

You can also share your feedback on Copilot code review. Take the survey.

@michal-sanoma michal-sanoma linked an issue Mar 19, 2026 that may be closed by this pull request
Copilot AI review requested due to automatic review settings March 19, 2026 09:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes visual flickering/oscillation in sl-tag-list at certain zoom levels and stabilizes sl-combobox multiple-selection tag layout to prevent overlap/click issues.

Changes:

  • Add a small sub-pixel buffer to sl-tag-list width calculations to avoid layout oscillation.
  • Stabilize sl-combobox tag list sizing/stacking via CSS adjustments.
  • Add/update unit tests and changesets covering the new behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/components/tag/src/tag-list.ts Adds a 0.5px buffer to the overflow threshold to reduce zoom-level flicker.
packages/components/tag/src/tag-list.spec.ts Adds tests intended to verify sub-pixel-buffer behavior.
packages/components/combobox/src/combobox.spec.ts Adds tests to guard against tag-list flicker and updates stacking expectations.
packages/components/combobox/src/combobox.scss Adjusts tag-list flex sizing + stacking context to prevent overlap and layout instability.
.changeset/lazy-dodos-hide.md Combobox patch note for overlap + flicker fixes.
.changeset/better-eels-hang.md Tag patch note for sub-pixel buffer behavior.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 19, 2026 09:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces flickering/oscillation in stacked sl-tag-list (notably when zooming) and stabilizes sl-combobox multiple-selection tag layout so tags remain clickable and layout doesn’t jitter.

Changes:

  • Add a 0.5px sub-pixel buffer to sl-tag-list width comparison to prevent visibility toggling at certain zoom levels.
  • Stabilize sl-combobox tag list layout via CSS (flex, min-inline-size, position, z-index) and adjust expectations accordingly.
  • Add/extend tests and ship patch changesets for @sl-design-system/tag and @sl-design-system/combobox.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/components/tag/src/tag-list.ts Adds a sub-pixel buffer to visibility threshold to prevent oscillation.
packages/components/tag/src/tag-list.spec.ts Adds tests covering the buffer behavior by stubbing widths.
packages/components/combobox/src/combobox.spec.ts Adds layout stability + anti-flicker tests; updates stacking expectations.
packages/components/combobox/src/combobox.scss Stabilizes tag list layout and stacking/clickability via flex sizing + z-index.
.changeset/lazy-dodos-hide.md Patch note for combobox (clickability + flicker).
.changeset/better-eels-hang.md Patch note for tag-list buffer fix.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 19, 2026 09:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes layout flickering/oscillation for sl-tag-list (notably at certain zoom levels) and stabilizes sl-combobox multi-select tag layout so tags and remove icons behave consistently.

Changes:

  • Add a small (0.5px) buffer to sl-tag-list overflow detection to prevent sub-pixel rounding oscillations.
  • Stabilize sl-combobox tag list layout via CSS (flex, min-inline-size, stacking context) and adjust related expectations.
  • Add/extend tests to cover the sub-pixel buffer behavior and combobox tag list stability.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/components/tag/src/tag-list.ts Adds sub-pixel width buffer to visibility calculation to prevent oscillation.
packages/components/tag/src/tag-list.spec.ts Adds tests for the sub-pixel buffer behavior.
packages/components/combobox/src/combobox.spec.ts Adds stability/flicker regression tests and updates stacking expectations.
packages/components/combobox/src/combobox.scss Adjusts sl-tag-list layout/styling inside combobox to prevent overlap/flicker.
.changeset/lazy-dodos-hide.md Patch changeset for combobox fixes (clickability + layout stability).
.changeset/better-eels-hang.md Patch changeset for tag-list sub-pixel buffer fix.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 19, 2026 09:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

@michal-sanoma michal-sanoma linked an issue Apr 2, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings April 8, 2026 16:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings April 9, 2026 13:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

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

Labels

None yet

Projects

None yet

5 participants