Skip to content

ui: timeline rows carry an edge padding that scrolls with the content - #505

Merged
Tryanks merged 1 commit into
mainfrom
ui/timeline-edge-padding
Sep 22, 2026
Merged

Tryanks merged 1 commit into
mainfrom
ui/timeline-edge-padding

Conversation

@Tryanks

@Tryanks Tryanks commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • The first and last timeline rows get an 8px padding inside the list, on desktop and mobile alike. The outer inset (8px desktop, 0 on phones) is unchanged, so the header and composer still clip the list flush; only a reader resting at either end sees air between the edge turn and the chrome.
  • Padding sits on the rows rather than the List element, so scrollbar, wheel and tail-resume all measure the same extent.
  • Virtual-list geometry: a prepended history page moves the top padding together with the reservation (leading_space() drives the anchor compensation and the scroll-back), and an appended turn moves the bottom padding after the former last row is remeasured. History coverage subtracts the padding too.

Test plan

  • cargo test -p tcode-ui (308 passed)
  • cargo clippy -p tcode-ui --all-targets clean, cargo fmt --check clean
  • Updated tests: composer gap (status sits 8px above the row bottom), the two history-page anchor tests now scroll relative to the leading space.

…lls with the content

The header and composer still clip the list flush; the outer inset is
unchanged. Inside the list, the first turn gets 8px above and the last
turn 8px below, so a reader resting at either end sees air between the
edge turn and the chrome.

The padding lives on the rows, not the List element, so the scrollbar,
wheel and tail-resume measure the same extent. It moves with the edge
rows: a prepended history page takes the top padding along with the
reservation (the anchor compensation now works on their sum), and an
appended turn takes the bottom padding after the former last row is
remeasured. History coverage subtracts the padding as well.
@Tryanks
Tryanks merged commit f5129c9 into main Sep 22, 2026
7 checks passed
@Tryanks
Tryanks deleted the ui/timeline-edge-padding branch September 22, 2026 18:18
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.

1 participant