feat: Add a new timetable implementation behind a feature flag - #3366
Merged
Conversation
…ld in timetable rendering
… that don't need it
thecristen
approved these changes
Jul 29, 2026
thecristen
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for all the detailed notes, including about the followup work! Great progress here!
…metable (#3369) * Translations delivered for PR#3366 on es-LA locale * Translations delivered for PR#3366 on ht-HT locale * Translations delivered for PR#3366 on zh-TW locale * Translations delivered for PR#3366 on pt-BR locale * Translations delivered for PR#3366 on fr-FR locale * Translations delivered for PR#3366 on vi-VN locale * Translations delivered for PR#3366 on zh-CN locale --------- Co-authored-by: smartling-github-connector[bot] <165276057+smartling-github-connector[bot]@users.noreply.github.com>
joshlarson
force-pushed
the
jdl/feat/new-timetable
branch
from
July 29, 2026 18:52
ebba677 to
3ba2fc3
Compare
joshlarson
enabled auto-merge (squash)
July 29, 2026 18:53
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
One of the blockers to the new Harbor Loop ferry layout (which puts both timetables on the same page) is that the original timetable implementation has controls that assume that there's only one timetable on the page (if there are multiple, then the
Earlier Boats/Later Boatsbuttons cause all timetables to scroll). I spent some time digging through the existing Javascript code, and decided to try my hand at rebuilding some of it in a more "Phoenix-forward" way, using Phoenix hooks, and relying more on tailwind, rather than having styling attached to parts of the timetable on load. At the time, I figured that would be easier than trying to fiddle with the existing JS code / timetable DOM and trying to guess what each bit was doing.This was the result.
Asana Ticket: ⛴️ Tie "Earlier Trips"/"Later Trips" controls directly to the timetable component
Implementation
new_timetables, and uses it to decide what timetable logic to run.scroll-to.js: Used to make the timetables scroll to the right trip automatically on page-load.timetable-scroll.js: This is the code that runs when theEarlier Boats/Later Boatsbuttons are clicked.timetable-stick.js: This is what causes the trip-name headers to look like they stick to the top of the screen on CR timetables.timetable-style.js: This does a bunch of things, including setting some of the styling that makes the stop header column sticky.Screenshots
☝️ is what the new timetable looks like (with a little disclaimer banner that indicates the new-ness of the new timetable).
This timetable should mostly look the same as the existing one, but it does resolve a few visual quirks. The screenshots below are from the old timetable, showing visual bugs that I wasn't able to produce on this branch:
👇 While we don't officially support a no-JS version of the site, the Javascript on this page sometimes takes long enough to load that this flashes on the screen... or even lingers (when I took this screenshot, it was like this for about ten seconds). 👇

👇 Some exciting quirks at certain screen widths where the shadow extends a bit too far up or down, making it look randomly darker in a few spots. 👇


👇 At some screen widths, the above-the-headers fake-table isn't aligned exactly with the table below, leading to an awkward jog 👇

👇 This wasn't a quirk exactly, but I thought it would be nice to keep the earlier/later train/boat buttons at narrow screen widths, so instead of fully hiding those buttons at narrow screen widths, I decided to just hide the words.
How to test
Go to the flags dashboard and set
New timetablesto true. Then navigate to any timetable page you're interested in, and have fun!Notes
This is not a complete feature. I think this component is mostly, but not entirely, ready to go to production for the loopy ferry routes, but it still needs a few things. If we decide to roll forward with this PR, then I'll make follow-up tickets for those:
Once ☝️ issues are resolved, then we can roll this out by having
Boat-F6,Boat-F7, andBoat-F10use the new timetable component whether or not the feature flag is enabled, and continue to serve the old component for other routes when the flag is disabled.... and there are other issues that are CR-specific that need to be resolved before this component can be used for CR timetables:
(to be fair, the old "new timetable" component also doesn't support the various icons, although it does support sticky headers)
As well as a few issues around the timetable algorithm and data (both issues are only visible with
New timetablesenabled - the timetables render correctly in production):All of these are known, and fortunately don't affect the Harbor Loop Ferry, which is the one that needs this component the most!