Skip to content

Conversation

Vonahz
Copy link
Contributor

@Vonahz Vonahz commented Sep 2, 2025

Fixes: #12104

Fix the visual issue when add/remove items through suggestions to tokenizer by scrolling tokenizer to the end.

@Vonahz Vonahz changed the title fix(ui-tokenizer): scroll to end when tokenizer is expanded fix(ui5-tokenizer): scroll to end when tokenizer is expanded Sep 2, 2025
@Vonahz Vonahz requested a review from ndeshev September 3, 2025 08:21
Copy link
Contributor

@ndeshev ndeshev left a comment

Choose a reason for hiding this comment

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

You could adjust the PR title and description, the scroll to end improvement is specifically for the case when the items are being currently selected from the open suggestion popover

@Vonahz Vonahz changed the title fix(ui5-tokenizer): scroll to end when tokenizer is expanded fix(ui5-tokenizer): scroll to end when adding tokens from suggestions Sep 5, 2025
Copy link

cla-assistant bot commented Sep 9, 2025

CLA assistant check
All committers have signed the CLA.

@ndeshev ndeshev requested a review from Copilot September 11, 2025 14:22
Copy link
Contributor

@Copilot 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 fixes a visual issue where the tokenizer was not scrolling to show the end of long tokens when adding/removing items through suggestions. The solution introduces intelligent scrolling behavior that automatically scrolls to the end when no specific token is focused, while preserving focused token visibility.

  • Introduces a focused token tracking system (_focusedToken) to manage scroll behavior
  • Adds automatic scroll-to-end functionality when tokenizer is expanded without a focused token
  • Refactors token navigation and scroll logic for better user experience

Reviewed Changes

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

File Description
packages/main/src/Tokenizer.ts Implements the core scrolling fix with focused token tracking and intelligent scroll behavior
packages/main/src/MultiInput.ts Removes redundant scroll calls that are now handled by the tokenizer automatically
packages/main/src/MultiComboBox.ts Removes redundant scroll calls that are now handled by the tokenizer automatically
packages/main/cypress/specs/Tokenizer.cy.tsx Adds comprehensive test coverage for the new scrolling behaviors

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.

[ui5-multi-combobox]: Filter display breaks with multiple selections
2 participants