docs: Clarify that anchor is the Popover's origin, not the display side#2537
Merged
Conversation
huacnlee
force-pushed
the
clarify-anchor-docs
branch
3 times, most recently
from
July 6, 2026 08:42
cf0f13b to
90c2370
Compare
huacnlee
enabled auto-merge (squash)
July 6, 2026 08:44
huacnlee
disabled auto-merge
July 6, 2026 08:45
huacnlee
force-pushed
the
clarify-anchor-docs
branch
from
July 6, 2026 08:47
90c2370 to
b3b2be1
Compare
Users read the `anchor` option as "which side of the trigger the popover shows on" and reported it as inverted (#2534). It actually uses GPUI's corner-anchoring model. Explain it with a concrete image instead: the anchor is where the popover's pointer tip (like a speech bubble's tail) sits relative to the trigger, and the popover hangs off that point. Applied to the `anchor()` comments on `Popover`/`HoverCard` and their docs (en + zh-CN), added a small `TopLeft` example diagram, and dropped stale wording that implied two separate `Anchor` types. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
huacnlee
force-pushed
the
clarify-anchor-docs
branch
from
July 6, 2026 08:59
b3b2be1 to
2081606
Compare
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.
Description
Closes #2534.
Users read the
anchoroption as "which side of the trigger the popover shows on" and reported it as inverted. It actually uses GPUI's corner-anchoring model, and the docs described it in a way that reinforced the wrong mental model.This PR only clarifies documentation, no behavior change. Instead of explaining the mechanics, it uses a concrete image: imagine the popover has a pointer tip (like a speech bubble's tail) — the anchor is where that tip sits relative to the trigger (
Anchor::TopLeft→ the trigger's top-left corner,Anchor::BottomRight→ the bottom-right, and so on), and the popover hangs off that point.anchor()doc comments onPopoverandHoverCard.Anchortypes.