feat: Enable/Disable the Earlier/Later buttons on scroll/resize - #3409
Merged
Conversation
joshlarson
enabled auto-merge (squash)
August 8, 2026 01:45
lvachon1
approved these changes
Aug 10, 2026
lvachon1
left a comment
Contributor
There was a problem hiding this comment.
Looks great, I tried breaking it with window and font shenanigans, but it wasn't fooled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 Tripsbutton.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!