Conversation
Cap the function-hint popup to the editor width and keep the signature on a single scrollable line, so a long TS signature can no longer run off-screen underneath the central control bar. Clamp it into the editor area and raise its z-index above the CCB. Theme the surface to match the other LSP popups, use a monospace font, and highlight the active parameter clearly. When the signature overflows, scroll the active parameter into view and fade the clipped edge(s). Stop the popup flickering on every caret move: cursorActivity no longer dismisses (hides) the popup before firing the async request. It now updates in place - skipping the redraw entirely when the same signature and active parameter are already shown, and keeping the popup anchored while only the highlight moves. A monotonic request id drops stale responses and prevents a late response from re-showing a dismissed popup.
…apping The documentation popup was positioned once, when a hint was highlighted, from the list's rect at that instant. The hint list keeps reflowing afterward - it flips above/below near a screen edge, shifts as the caret moves, and moves on scroll - so the popup drifted on top of the list and its position looked random. Track the list's live position with a requestAnimationFrame loop while the popup is visible, re-deriving placement from the list's current rect every frame: to the right, flipping to the left when there's no room, clamped to stay on screen. The css is only rewritten when the position actually changes, the loop stops on hide/close, and it self-terminates if the hint menu is torn down.
|
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.



Cap the function-hint popup to the editor width and keep the signature on a single scrollable line, so a long TS signature can no longer run off-screen underneath the central control bar. Clamp it into the editor area and raise its z-index above the CCB. Theme the surface to match the other LSP popups, use a monospace font, and highlight the active parameter clearly. When the signature overflows, scroll the active parameter into view and fade the clipped edge(s).
Stop the popup flickering on every caret move: cursorActivity no longer dismisses (hides) the popup before firing the async request. It now updates in place - skipping the redraw entirely when the same signature and active parameter are already shown, and keeping the popup anchored while only the highlight moves. A monotonic request id drops stale responses and prevents a late response from re-showing a dismissed popup.