Skip to content

fix(tags): focus kbqTagInput on click/focus (#DS-4345)#1102

Merged
lskramarov merged 3 commits into
mainfrom
feat/DS-4345
Nov 10, 2025
Merged

fix(tags): focus kbqTagInput on click/focus (#DS-4345)#1102
lskramarov merged 3 commits into
mainfrom
feat/DS-4345

Conversation

@artembelik

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings November 6, 2025 13:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors the tag component's click handling behavior by changing from mousedown to click events and simplifying the focus management logic. The main goal is to improve the user experience by ensuring the tag input receives focus when clicking anywhere in the tag list or on tags (unless using modifier keys for selection).

  • Changed event binding from mousedown to click for tag interaction
  • Simplified handleClick method to only handle selection with modifier keys, allowing click events to bubble up to the tag list
  • Removed originatesFromTag helper method and simplified onContainerClick to always focus the input
  • Updated focus() method to prioritize tag input over tags

Reviewed Changes

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

Show a summary per file
File Description
tools/public_api_guard/components/tags.api.md Updated public API signatures to reflect handleClick replacing handleMousedown and onContainerClick parameter removal
packages/components/tags/tag.component.ts Changed event handler from mousedown to click and simplified logic to only handle modifier key selections
packages/components/tags/tag.component.spec.ts Updated all tests to use click events instead of mousedown events
packages/components/tags/tag-list.component.ts Simplified onContainerClick to always focus, removed originatesFromTag method, and refactored focus() method to prioritize input
packages/components/tags/tag-list.component.spec.ts Added new tests for focus behavior and updated imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/components/tags/tag.component.ts Outdated
Comment thread packages/components/tags/tag-list.component.ts
@github-actions

github-actions Bot commented Nov 6, 2025

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 32a79c3):

https://koobiq-next--prs-1102-rz94n8xd.web.app

(expires Wed, 12 Nov 2025 12:51:24 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c

@artembelik artembelik requested a review from rmnturov November 6, 2025 13:33
@artembelik artembelik self-assigned this Nov 6, 2025
Comment thread packages/components/tags/tag-list.component.spec.ts Outdated
@artembelik artembelik changed the title feat(tags): focus kbqTagInput on KbqTagList click or focus (#DS-4345) fix(tags): focus kbqTagInput on click/focus (#DS-4345) Nov 10, 2025
@artembelik artembelik added the bug Something isn't working label Nov 10, 2025
@lskramarov lskramarov merged commit 683d6eb into main Nov 10, 2025
8 checks passed
@lskramarov lskramarov deleted the feat/DS-4345 branch November 10, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants