Conversation
…tor behavior (#57309) * Fix text selection jumping in logs pane to match text editor behavior When selecting text by clicking and dragging in the logs pane, the selection would jump unexpectedly when clicking in empty space at the end of lines or below the last log line. This was caused by the virtualized list rendering with absolutely positioned elements that didn't extend to fill available space. Changes: - Make log line containers full width to enable selection in empty areas - Add invisible filler element below last log line to prevent EOF jump - Ensure minimum height covers all empty space at bottom of container The logs pane now behaves like traditional text editors (e.g. Notepad) where users can click anywhere and drag to select multiple lines without the selection jumping. * Fix log view vanishing when text wrap is enabled When toggling text wrap on in the logs pane, all log content would disappear. This was caused by three issues: 1. CSS textWrap property was set to pre instead of pre-wrap, which preserves whitespace but does not wrap text 2. Virtualizer was not remeasuring items when wrap toggled, causing items to be positioned with cached single-line heights even when text became multi-line 3. Width constraints conflicted - items need to be constrained to 100% when wrapped (to force wrapping) but max-content when unwrapped (to allow horizontal scrolling) Changes: - Change textWrap from pre to pre-wrap when wrap is enabled - Add useLayoutEffect to force virtualizer remeasurement on wrap toggle - Add width=100% to VStack to provide proper width reference - Set item width conditionally: 100% when wrapped, max-content when not - Keep minWidth=100% always for text selection in empty areas (cherry picked from commit d6fa3b0) Co-authored-by: Dheeraj Turaga <dheerajturaga@gmail.com>
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.
Fix text selection jumping in logs pane to match text editor behavior
When selecting text by clicking and dragging in the logs pane, the
selection would jump unexpectedly when clicking in empty space at
the end of lines or below the last log line. This was caused by the
virtualized list rendering with absolutely positioned elements that
didn't extend to fill available space.
Changes:
The logs pane now behaves like traditional text editors (e.g. Notepad)
where users can click anywhere and drag to select multiple lines without
the selection jumping.
Fix log view vanishing when text wrap is enabled
When toggling text wrap on in the logs pane, all log content would
disappear. This was caused by three issues:
preserves whitespace but does not wrap text
items to be positioned with cached single-line heights even when
text became multi-line
when wrapped (to force wrapping) but max-content when unwrapped
(to allow horizontal scrolling)
Changes:
(cherry picked from commit d6fa3b0)
Co-authored-by: Dheeraj Turaga dheerajturaga@gmail.com