Skip to content

fix(hover-card): don't open an empty card (Solid 2) - #154

Merged
riccardoperra merged 1 commit into
feat/upgrade-solid2-kobaltefrom
fix/hovercard-controlled-closed
Nov 28, 2026
Merged

riccardoperra merged 1 commit into
feat/upgrade-solid2-kobaltefrom
fix/hovercard-controlled-closed

Conversation

@riccardoperra

Copy link
Copy Markdown
Owner

In CodeLoom, hovering an editor tab a second time opened an empty round hover card. DetailCard passes open={false} when there is nothing to show.

Cause

show() read the internal state flag. The first hover set that flag to true (through setOpen(true)) even though the controlled open prop stayed false. On the next hover, focus or click, show() took the host.show(entry) branch and put the shared surface on screen with no content.

Fix

Tests

  • Added 2 tests in test/hover-card.test.tsx: one for open={false} across repeated hover, focus and click, one for a card with no content. Both fail without the fix.
  • All kit browser tests pass (682) and tsc passes.

🤖 Generated with Claude Code

With open={false}, the first hover marked the card open internally, so the
next hover, focus or click showed the shared surface with nothing in it.
show() now reads the wanted state, and a card without HoverCardContent
does not open.

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

changeset-bot Bot commented Nov 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6d52312

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

This PR includes changesets to release 1 package
Name Type
@codeui/kit 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

@github-actions

Copy link
Copy Markdown
Contributor

CodeUI package preview

Built from 6d52312.

npm install https://pkg.pr.new/riccardoperra/codeui/@codeui/kit@6d523125af7b5e7b612bdda66c44a24501b6bd1c

The kit installs matching previews of @codeui/styles and @codeui/inkstone.

@github-actions

Copy link
Copy Markdown
Contributor

Docs preview deployed to Cloudflare Pages.

Built from 6d52312.

@riccardoperra
riccardoperra merged commit f8305a1 into feat/upgrade-solid2-kobalte Nov 28, 2026
5 of 6 checks passed

This branch was successfully deployed

1 active deployment
docs-preview — 6d523125 Deployed Nov 28, 2026 by riccardoperra via Deploy to Cloudflare Pages #169
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.

1 participant