gpui: Add item_is_above_viewport and item_is_below_viewport APIs to ListState#58061
Merged
Conversation
danilo-leal
approved these changes
May 29, 2026
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.
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.
In prep for handling the above-viewport case in #57632, which currently only handles below case.
This PR adds
ListState::item_is_above_viewportandListState::item_is_below_viewportmethods, which report whether a given list item is entirely outside the current viewport. Both returnNonewhen the list has not measured enough layout to answer.Release Notes: