Skip to content

Leave a click on a Tooltip trigger to the page without closeOnClick - #11463

Open
PepijnSenders wants to merge 1 commit into
Effect-TS:mainfrom
PepijnSenders:ui-kit-tooltip-click-reaches-ancestor
Open

PepijnSenders wants to merge 1 commit into
Effect-TS:mainfrom
PepijnSenders:ui-kit-tooltip-click-reaches-ancestor

Conversation

@PepijnSenders

Copy link
Copy Markdown

The Tooltip trigger always registered a click handler, even when closeOnClick was false and the handler did nothing. The browser host sends an event only to the innermost element with a handler for it, so a click on a trigger inside a clickable element (a truncated file name with a tooltip, in a table row that opens the file) never reached that element: the row did not open.

With React and Radix the click on the trigger bubbles to the row, so porting such a table changes behaviour, and a consumer cannot work around it because the trigger part owns click.

Without closeOnClick the trigger now registers no click handler, so a click reaches the trigger element's own handler or a clickable ancestor. With closeOnClick (the default) nothing changes: the trigger still takes the click to close the tooltip. A consumer that wants both can turn closeOnClick off and close on press.

  • ui/kit/Tooltip.ts: the click handler is added only when closeOnClick is not false; the closeOnClick documentation says what false now means.
  • TooltipDocument.test.ts: a row with a click handler around a trigger; a click on the trigger reaches the row only with closeOnClick: false.
  • Tooltip.test.ts: the existing activation test now expects no click handler on the trigger with closeOnClick: false.
  • A patch changeset.

Checked: the kit's tooltip tests (the new document test fails without the change), pnpm check in packages/effect, oxlint and dprint check on the changed files.

🤖 Generated with Claude Code

The trigger always registered a click handler, even when closeOnClick
was false and the handler did nothing. The host sends an event only to
the innermost element with a handler for it, so a click on a trigger
inside a clickable row never reached the row. Without closeOnClick the
trigger now takes no click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Dec 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c68b772

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

This PR includes changesets to release 43 packages
Name Type
effect Patch
@effect/opentelemetry Patch
@effect/vitest Patch
@effect/ai-amazon-bedrock Patch
@effect/ai-anthropic Patch
@effect/ai-cloudflare Patch
@effect/ai-openai-compat Patch
@effect/ai-openai Patch
@effect/ai-openrouter Patch
@effect/ai-typesafe Patch
@effect/atom-react Patch
@effect/atom-solid Patch
@effect/atom-vue Patch
@effect/chat-discord Patch
@effect/chat-slack Patch
@effect/chat-teams Patch
@effect/chat-telegram Patch
@effect/chat-whatsapp Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-cloudflare Patch
@effect/platform-deno Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-pglite Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/docgen Patch
@effect/doctest Patch
@effect/graphql-generator Patch
@effect/openapi-generator Patch
@effect/ui-devtools Patch
@effect/ui-native Patch
@effect/ui-opentui Patch

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

@effect-janitor effect-janitor Bot added the 4.0 label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 40.55 KB 40.55 KB 0.00 KB (0.00%)
basic.ts 6.80 KB 6.80 KB 0.00 KB (0.00%)
batching.ts 12.03 KB 12.03 KB 0.00 KB (0.00%)
brand.ts 7.03 KB 7.03 KB 0.00 KB (0.00%)
cache.ts 12.30 KB 12.30 KB 0.00 KB (0.00%)
config.ts 24.02 KB 24.02 KB 0.00 KB (0.00%)
differ.ts 22.88 KB 22.88 KB 0.00 KB (0.00%)
http-client.ts 29.03 KB 29.03 KB 0.00 KB (0.00%)
http-router.ts 39.70 KB 39.70 KB 0.00 KB (0.00%)
logger.ts 12.46 KB 12.46 KB 0.00 KB (0.00%)
metric.ts 10.29 KB 10.29 KB 0.00 KB (0.00%)
optic.ts 7.26 KB 7.26 KB 0.00 KB (0.00%)
pubsub.ts 17.02 KB 17.02 KB 0.00 KB (0.00%)
queue.ts 13.83 KB 13.83 KB 0.00 KB (0.00%)
schedule.ts 12.59 KB 12.59 KB 0.00 KB (0.00%)
schema-bigdecimal.ts 14.62 KB 14.62 KB 0.00 KB (0.00%)
schema-binary.ts 43.61 KB 43.61 KB 0.00 KB (0.00%)
schema-class.ts 22.61 KB 22.61 KB 0.00 KB (0.00%)
schema-codegen.ts 33.98 KB 33.98 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 31.06 KB 31.06 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 28.80 KB 28.80 KB 0.00 KB (0.00%)
schema-string-transformation.ts 16.39 KB 16.39 KB 0.00 KB (0.00%)
schema-string.ts 12.89 KB 12.89 KB 0.00 KB (0.00%)
schema-template-literal.ts 16.99 KB 16.99 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 40.12 KB 40.12 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 21.77 KB 21.77 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 21.93 KB 21.93 KB 0.00 KB (0.00%)
schema-toFormatter.ts 22.04 KB 22.04 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 27.05 KB 27.05 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 22.08 KB 22.08 KB 0.00 KB (0.00%)
schema.ts 21.73 KB 21.73 KB 0.00 KB (0.00%)
stm.ts 15.08 KB 15.08 KB 0.00 KB (0.00%)
stream.ts 10.83 KB 10.83 KB 0.00 KB (0.00%)
supervisor.ts 12.27 KB 12.27 KB 0.00 KB (0.00%)

UI Bundle Size

Vite 8.4.0/Rolldown, production, default Oxc minification, es2023, ES modules, gzip level 9 per chunk. effect 4.2.0, Node v26.12.1. Effect-only client: 27528 B gzip (Δ 0 B vs base).

App Chunks Raw bytes Gzip bytes Added gzip B Δ raw bytes Δ gzip bytes
counter 1 176280 60862 33334 0 0
features 1 185934 64361 36833 0 0
menu 1 290721 99073 71545 0 0

This branch is waiting to be deployed

1 waiting deployment
fork — c68b7723 Waiting Dec 3, 2026 by PepijnSenders via approval-gate #29463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant