Skip to content

gpui: Add item_is_above_viewport and item_is_below_viewport APIs to ListState#58061

Merged
smitbarmase merged 1 commit into
mainfrom
add-item-above-below-viewport-apis
May 29, 2026
Merged

gpui: Add item_is_above_viewport and item_is_below_viewport APIs to ListState#58061
smitbarmase merged 1 commit into
mainfrom
add-item-above-below-viewport-apis

Conversation

@smitbarmase

@smitbarmase smitbarmase commented May 29, 2026

Copy link
Copy Markdown
Member

In prep for handling the above-viewport case in #57632, which currently only handles below case.

This PR adds ListState::item_is_above_viewport and ListState::item_is_below_viewport methods, which report whether a given list item is entirely outside the current viewport. Both return None when the list has not measured enough layout to answer.

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 29, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label May 29, 2026
@smitbarmase smitbarmase requested a review from danilo-leal May 29, 2026 10:23
@smitbarmase smitbarmase added this pull request to the merge queue May 29, 2026
Merged via the queue into main with commit a1d2ef6 May 29, 2026
46 checks passed
@smitbarmase smitbarmase deleted the add-item-above-below-viewport-apis branch May 29, 2026 13:28
loczek pushed a commit to loczek/zed that referenced this pull request May 29, 2026
…wport (zed-industries#58081)

Follow up to zed-industries#57632, uses
changes from zed-industries#58061

Previously the floating permission popover only appeared when the inline
permission prompt was scrolled below the viewport. It now also appears
when the prompt is scrolled above the viewport, with the scroll button
pointing in the right direction.

Release Notes:

- Fixed the agent permission popover not appearing when the inline
prompt was scrolled above the viewport.
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 2, 2026
…istState (zed-industries#58061)

In prep for handling the above-viewport case in
zed-industries#57632, which currently only
handles below case.

This PR adds `ListState::item_is_above_viewport` and
`ListState::item_is_below_viewport` methods, which report whether a
given list item is entirely outside the current viewport. Both return
`None` when the list has not measured enough layout to answer.

Release Notes:

- N/A
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 2, 2026
…wport (zed-industries#58081)

Follow up to zed-industries#57632, uses
changes from zed-industries#58061

Previously the floating permission popover only appeared when the inline
permission prompt was scrolled below the viewport. It now also appears
when the prompt is scrolled above the viewport, with the scroll button
pointing in the right direction.

Release Notes:

- Fixed the agent permission popover not appearing when the inline
prompt was scrolled above the viewport.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants