Improve Task Strip edge clicks and panel switching behavior#183
Conversation
- Replace manual parentElement walk with el.closest('[data-tiling-strip]').
- Drop redundant taskOrder parameter from scrollTaskToEdge; read store.taskOrder internally.
- Update call sites and tests accordingly.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Add optional behavior parameter to scroll helpers so callers can request smooth scrolling. Use smooth behavior when focusing a panel and when TilingLayout reacts to active task changes.
Replace scrollTaskToEdge and scrollTaskWithClickablePreview with a single computeTaskStripScrollLeft helper that handles both edge snapping and clickable-preview scrolling. Removes now-unused exports from store.ts. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Avoid smooth scrolling when aligning the active task on first render. The first scroll uses 'instant' behavior; subsequent navigations keep 'smooth'.
|
Reviewed the diff + tests. The implementation is correct (I traced each test's arithmetic against Worth discussing: could the platform do this for us?The core behavior — keep a 64px clickable preview of neighbors and snap first/last tasks flush to the edge so the chevron affordance disappears — looks reproducible with native scrolling: .tiling-layout-strip { scroll-padding-inline: 64px; }el.scrollIntoView({ inline: 'nearest', behavior });Tracing the cases:
The natural scroll clamping reproduces the edge-snap requirement for free, which would remove most of the ~90 lines of math + ~150 lines of tests. Two fair reasons you might keep the explicit version:
Not a blocker — just worth a deliberate "we chose explicit Minor
Nice touchesThe |
- Replace manual edge/preview scroll math with native scrollIntoView and CSS scroll-padding-inline for preview margins. - Remove createInitialTaskScrollBehavior closure factory; use a plain component-local boolean in TilingLayout instead. - Update tests and remove the now-unused re-exports. Co-Authored-By: Claude <[email protected]>
…TODO - Explain why TASK_CLICKABLE_PREVIEW_PX (64px) is intentionally larger than the 26px visual scroll affordance. - Add a TODO noting that scrollTaskIntoView should move from the store layer to the view layer (TilingLayout.tsx) in the future. Co-Authored-By: Claude <[email protected]>
…lper - Snap the last task panel flush to the right edge of the strip to avoid a sliver of overflow from scroll-padding-inline. - Extract maxScrollLeft helper and flatten the nullable scroller fallback in scrollTaskElementIntoView. Co-Authored-By: Claude <[email protected]>
|
Using the native approach is fine, but I ended up combining native Regarding the concern that For the three minor points:
One extra note on the trade-off: normal tasks still use native |
|
Thank you very much! <3 |
Description
This PR improves the interaction experience for the Task Strip / Task Panel in three areas:
Impact
Verification