Skip to content

Fix annotation hover interaction when card has a target link#4274

Merged
gregberge merged 1 commit into
mainfrom
greg/rnd-11133-fix-annotation-hover-interaction-when-card-has-target-link
May 27, 2026
Merged

Fix annotation hover interaction when card has a target link#4274
gregberge merged 1 commit into
mainfrom
greg/rnd-11133-fix-annotation-hover-interaction-when-card-has-target-link

Conversation

@gregberge
Copy link
Copy Markdown
Contributor

@gregberge gregberge commented May 27, 2026

CleanShot.2026-05-27.at.09.51.11.mp4

Copilot AI review requested due to automatic review settings May 27, 2026 07:51
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 27, 2026

RND-11133

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 27, 2026

⚠️ No Changeset found

Latest commit: 3c678d4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 fixes annotation hover/click interactions when annotations are rendered inside a clickable card (via a link overlay), by ensuring annotation triggers are stacked above the overlay.

Changes:

  • Extend the elevate-link utility so annotation triggers are given a higher stacking context (z-index) alongside non-overlay links.
  • Add a data-annotation marker attribute to the annotation trigger element (<dfn>) for styling/targeting.
  • Update the E2E selector to use the new data-annotation attribute.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/gitbook/src/components/RootLayout/globals.css Elevates [data-annotation] elements above link overlays within LinkBox contexts.
packages/gitbook/src/components/DocumentView/Annotation/AnnotationPopover.tsx Marks the annotation trigger with data-annotation so it can be elevated by CSS.
packages/gitbook/e2e/internal.spec.ts Adjusts the annotations E2E test to target the new attribute.

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

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented May 27, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2-cloudflare (Inspect) 👍 Changes approved 15 changed May 27, 2026, 7:58 AM
customers-v2-vercel (Inspect) 👍 Changes approved 2 changed May 27, 2026, 7:59 AM
v2-cloudflare (Inspect) 👍 Changes approved 5 changed May 27, 2026, 8:04 AM
v2-vercel (Inspect) 👍 Changes approved 4 changed May 27, 2026, 8:04 AM

@gregberge gregberge enabled auto-merge (squash) May 27, 2026 09:49
@gregberge gregberge merged commit 526a928 into main May 27, 2026
18 checks passed
@gregberge gregberge deleted the greg/rnd-11133-fix-annotation-hover-interaction-when-card-has-target-link branch May 27, 2026 10:02
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.

3 participants