fix(ui): make watch path remove (X) button clickable#4878
Closed
Siumauricio wants to merge 1 commit into
Closed
Conversation
The X button to remove a watch path (and domain middlewares) is a lucide <X> rendered as a direct SVG child of <Badge>. The Badge base class includes [&>svg]:pointer-events-none (added in the Tailwind v4 / shadcn update), so the click never reached the icon and its onClick never ran — adding a path worked but removing did nothing. Add pointer-events-auto to each remove X so it stays clickable. Applies to all 5 application git providers, all 5 compose git providers, the preview-deployment filters, and the domain middlewares list. Fixes #4780
Contributor
Author
|
Closing in favor of #4827, which fixes the same bug (#4780) more correctly. My approach here added |
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.
Problem
On an application's git provider config, clicking the X on a watch path badge does nothing — the path can be added but never removed.
Closes #4780
Cause
The remove X is a lucide
<X>rendered as a direct SVG child of<Badge>. The Badge base class includes[&>svg]:pointer-events-none(introduced in the Tailwind v4 / shadcn update, commit3ca5afd49). That rule setspointer-events: noneon the icon, so the click lands on the Badge instead of the X and theonClick(which splices the item out) never runs. The removal logic itself is correct — it just never fires.Fix
Add
pointer-events-autoto each remove X so it stays clickable despite the Badge rule. The same broken pattern exists across all git provider components, so this covers:handle-domain.tsx)Verification
Reproduced and verified in the browser: with
pointer-events: none,elementFromPointover the X returns the Badge (not the SVG) and the badge intercepts the click; after the fix the SVG receives the click and the path badge is removed on click.