Skip to content

Replace Scroll dropdown with an Auto Scroll toggle in the scrollbar corner - #244

Open
todi1856 wants to merge 4 commits into
masterfrom
auto-scroll-toggle
Open

todi1856 wants to merge 4 commits into
masterfrom
auto-scroll-toggle

Conversation

@todi1856

@todi1856 todi1856 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Yamato CI Docs preview

Purpose of PR

Type of change:

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Description
20261120-1514-19.5275706.mp4

Addresses feedback that the Scroll dropdown below the message log (Disabled / Scroll To End / Auto) was confusing. Scroll To End only differed from Auto by locking the scrollbar, and there was no quick way to jump to the last message during heavy log activity.

The dropdown is replaced by a single Auto Scroll toggle button in the corner between the message log's horizontal and vertical scrollbars:

  • Turning it on scrolls to the last message and keeps following new ones.
  • Scrolling up, or selecting messages with the Up and Down keys, turns it off.
  • Scrolling back to the last message turns it back on.
  • The icon (Editor/Textures/DownArrowToLine.png) is a flat arrow over a line, like the scrollbar's own arrow. It's tinted for the current skin and faded while off.

Other changes:

  • The vertical scrollbar is always shown, so the corner for the toggle is always there.
  • The saved setting is now a bool, m_AutoScrollEnabled, replacing the AutoScroll enum. It has a new name so values saved by earlier versions aren't misread. Everyone starts with Auto Scroll on after upgrading.
  • Checking whether the last message is visible now uses the height above the horizontal scrollbar. The column borders use the scrollbar's real height instead of a hardcoded 15px.
  • Links to Jira/Fogbugz cases

    PLAT-23901

  • Halo effect

    Only the message log: scrolling, keyboard navigation, the scrollbars and the column borders. The status bar row no longer contains the Scroll dropdown.

Checklist for PR maker

  • Have you updated the Changelog?
  • Have you added or updated the Documentation? Not needed, the docs didn't describe the Scroll option

Testing status

  • Manual: checked in the Editor while iterating on the toggle's placement, icon size and off state.
  • Automation: existing AndroidLogcatAutoScrollTests cover IsLastEntryVisible, which is unchanged. Not run on this branch yet.

🤖 Generated with Claude Code

todi1856 and others added 4 commits November 20, 2026 16:58
The Disabled / Scroll To End / Auto dropdown was confusing, since Scroll To End
only differed from Auto by locking the scrollbar. It's now a single toggle button
which shows whether new messages are followed: scrolling up or keyboard selection
turns it off, scrolling to the last message or clicking it turns it back on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The vertical scrollbar is always shown so the corner is always there, and both
scrollbars are slightly thicker to give the toggle more room. The icon is redrawn
as a flat arrow like the scrollbar's own, tinted for the current skin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Ship it

The change replaces the scroll-mode dropdown with a corner toggle and a saved boolean setting. I examined scrolling, keyboard navigation, settings compatibility, surrounding layout and update behavior, scrollbar styles, and the new icon; no actionable issues were substantiated.

Reviewed commit 3af8aa0

🤖 Helpful? 👍/👎

@todi1856
todi1856 requested review from a team and BorisShir November 20, 2026 15:16
@BorisShir

Copy link
Copy Markdown

I have some concern about user experience. Before when setting was "Auto", a user may scroll up to view some older messages which stopped scrolling but didn't change "Auto" logic. So next time the logcat window was opened messages were automatically scrolling again. Now if a user scrolls up, scrolling is being turned off completely. So next time the window is opened, there is no scroll and it can be not really obvious what the user should do to resume scrolling. What if you save this setting only when the user presses the icon explicitly?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude says that the icon might be too big, so it's being scaled down and it may look not really nice.

else if (e.type == EventType.ScrollWheel && e.delta.y < 0.0f)
m_ScrollData.PerformScrollWhileInAuto = false;
}
if (scrollChanged || (e.type == EventType.ScrollWheel && e.delta.y > 0.0f))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is scrollChanged true, when scrolling horizontally? If yes, there can be some unexpected effect when user turns scrolling off being at the end of the logcat messages, then scrolls horizontally and this turns scrolling back on.


int minVisible = (int)(m_ScrollPosition.y * scalar);
int maxVisible = minVisible + maxVisibleItems;
// Do the scrolling in repain event since maxVisibleItems depends on visibleWindowRect

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: repaint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants