feat(chat): chat-launcher-button emits (clicked) output#354
Open
blove wants to merge 1 commit into
Open
Conversation
The inner <button> now directly emits a `clicked` output, replacing the previous pattern where consumers bound `(click)` to the host element and relied on event bubbling. The bubbling approach worked visually but was fragile under hit-testing — Playwright (and potentially screen readers / pointer-event detection in higher stacking contexts) could mis-target the wrapping host element when a higher-z-index sibling overlapped the launcher's bounding box. Migrated internal consumers (chat-sidebar, chat-popup) to (clicked). Back-compat: native (click) bindings on the host still work — the click event still bubbles unchanged. External consumers don't need to migrate, but should prefer (clicked) for new code. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a `clicked` output to `ChatLauncherButtonComponent`, bound directly to the inner ``'s native click. Replaces the host-bubbled `(click)` pattern with an explicit, unambiguous click target.
Why
The previous pattern bound `(click)` on the `` host element and relied on click events bubbling up from the inner `
`. This worked for real users but was fragile under hit-testing:Moving the click handler to the inner `
` (where the button visually IS) eliminates the ambiguity.Back-compat
Native `(click)` bindings on `` still work — the click event still bubbles through. External consumers don't need to migrate. The migration is opt-in for explicitness.
Internal consumers migrated
Test plan
🤖 Generated with Claude Code