Repository navigation
Keep panel drags smooth while the terminal is open - #427
Merged
Merged
Conversation
Dragging the terminal dock, a sidebar or a split pane refit xterm and reallocated the data grid's canvas on every frame, which dropped the drag well below the display rate on Linux, Windows and macOS. beginPanelResize/endPanelResize in panel-motion.js ref-count an active drag, set data-resizing on <html> and fire stroke:panel-resize-end on release. ResizeHandle and PaneLayout call them and use pointer capture with pointercancel and lostpointercapture, so a drag always ends. TerminalPage holds its grid while a drag runs and refits once on release. Its fit() works from xterm's cell size instead of FitAddon.fit(), which forced style recalcs and cleared the renderer before each resize. Window resizes fit at once for a single change and debounce 100ms while the size keeps changing. The PTY hears the final size once. DataTable grows its canvas backing store in 256px steps during a drag and skips the repaint when the viewport only shrank. The terminal dock uses ResizeHandle (wider grab area, double-click resets to 260px) and its height is clamped and persisted in layout.js.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Dragging the terminal dock, a sidebar or a split pane refit the terminal and reallocated the data grid's canvas every frame. Drags dropped well below the display rate on every OS.
panel-motion.js(beginPanelResize/endPanelResize, ref-counted,data-resizingon<html>, astroke:panel-resize-endevent on release).fit()uses xterm's cell size instead ofFitAddon.fit(), so no forced style recalc and no blank frame. The PTY gets the final size once.ResizeHandlewith a wider grab area. Double-click resets it to 260px, and the height persists inlayout.js.#426 carries a copy of this PR's StudioShell dock hunks (they were swept into its commit) and imports
layout.jsexports that only exist here, so this PR merges first. The hunks are identical, so #426 merges cleanly after it.Checked: design lint, both vitest suites (2014 + 20),
npm run build.