Skip to content

feat: Enable/Disable the Earlier/Later buttons on scroll/resize - #3409

Merged
joshlarson merged 2 commits into
mainfrom
jdl/feat/timetable-buttons
Aug 10, 2026
Merged

feat: Enable/Disable the Earlier/Later buttons on scroll/resize#3409
joshlarson merged 2 commits into
mainfrom
jdl/feat/timetable-buttons

Conversation

@joshlarson

Copy link
Copy Markdown
Contributor

Scope

Asana Ticket: ⛴️ Disable Earlier/Later Boats buttons at the right scroll positions

Implementation

Yet another Phoenix hook.

Note

This is my first real foray into Phoenix hooks, and I'm not sure that I put them in the right place. We've now got two different hooks attached to different parts of the timetable... maybe that's the way to do it? Maybe not?

Screenshots

Screen.Recording.2026-08-07.at.9.08.29.PM.mov

How to test

Enable new timetables, and then visit any timetable page and play around with the buttons. Try shrinking the window when scrolled all the way to the right - that nudges some of the trips off the edge of the screen, which re-enables the Later Trips button.

Given special attention to the Lynn ferry page (which has few enough trips that it doesn't need the buttons at typical desktop browser widths). Try resizing the window so that it's too narrow for its five trips and note that the buttons reappear.

Try other things I didn't think of - have fun!

@joshlarson
joshlarson requested a review from a team as a code owner August 8, 2026 01:21
@joshlarson
joshlarson requested a review from thecristen August 8, 2026 01:21
@joshlarson
joshlarson enabled auto-merge (squash) August 8, 2026 01:45

@lvachon1 lvachon1 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.

Looks great, I tried breaking it with window and font shenanigans, but it wasn't fooled.

@joshlarson
joshlarson merged commit 74120eb into main Aug 10, 2026
50 of 52 checks passed
@joshlarson
joshlarson deleted the jdl/feat/timetable-buttons branch August 10, 2026 15:42
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