Home

dev / tinycast

publicthedavidweng/tinycast· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

Keep palette lists stationary while the selection moves (#109)

2 months ago

bc633f6
Authored
Abue Ammar7/30/2026, 1:45:17 PM
* Keep palette lists stationary while the selection moves

Arrow keys recentered every list on `scrollToken`, so the viewport jumped
even when the selected row was already visible (#100). The emoji grid
already solved this with a reset/follow scroll intent — generalise that
one type to all four modes instead of a second parallel mechanism.

- `ScrollIntent` (`Core/ScrollIntent.swift`) replaces `scrollToken` and
  `EmojiScrollIntent`. `.follow` is a minimal scroll-to-visible, so the
  list only advances a row at the viewport edges; `.top` restores the
  content origin. Modes never coexist, so one intent state serves all.
- `scrollOriginAnchor()` marks content offset 0 with a zero-height
  overlay, making `.top` exact: scrolling to the first row instead left
  the content's top padding hidden under the header.
- Landing on flat index 0 restores the origin so that row's section
  header comes back into view.
- The clipboard follow-the-moved-row reset now follows the selection
  rather than recentering it.

The edge dissolve is deliberately untouched.

* Make the edge dissolve and thin scrollbar off-limits

* Fix the origin-anchor name in the UI docs

Parent31f17e6

9 files changed
  • AGENTS.md+5−0
  • Tinycast.xcodeproj/project.pbxproj+4−0
  • Tinycast/Core/ScrollIntent.swift+40−0
  • Tinycast/Features/Calculator/CalculatorHistoryView.swift+24−7
  • Tinycast/Features/Clipboard/ClipboardView.swift+20−4
  • Tinycast/Features/Emoji/EmojiGridView.swift+8−22
  • Tinycast/Features/Launcher/LauncherView.swift+22−7
  • Tinycast/Features/RootPaletteView.swift
+13
−19
  • docs/ui.md+1−1