-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add a nicer summary view for trip planner output #2204
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to do some refactoring as it makes sense for you! Left a few comments.
I don't think any of those badge or icon components are necessary. |
Can definitely use metro now to put thos SVGs into a directory and turn them into metro icons. Then put that icon into a circle badge. |
514b6e3
to
8f83729
Compare
2532d67
to
dba9d1c
Compare
467b27b
to
8e71c85
Compare
e9643c8
to
0b0cafe
Compare
end | ||
|
||
# Group of commuter rail routes are summarized to one symbol. | ||
defp leg_icon(%{routes: [%Routes.Route{type: 2} | _]} = assigns) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking, partly because I think my ideal outcome here might be a fairly large restructuring of how routes and modes are represented in dotcom (which is definitely too much scope for this PR), but I feel like there are a lot of places where I have to memorize what type: 2
/type: 4
/etc mean in order to understand our code.
|> assign( | ||
:grouped_classes, | ||
if(slashed?, | ||
do: "[&:not(:first-child)]:rounded-l-none [&:not(:last-child)]:rounded-r-none !px-3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![Screenshot 2024-11-15 at 5 06 22 PM](https://private-user-images.githubusercontent.com/912020/386780174-b467454e-9622-4459-8d3c-6b13e8ee647f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3NjIwODAsIm5iZiI6MTczOTc2MTc4MCwicGF0aCI6Ii85MTIwMjAvMzg2NzgwMTc0LWI0Njc0NTRlLTk2M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RmYzE3OGIxOGQwMDg1NWFiMzZkNWJlYTg1Y2VmOGU2YzI2ODhhOGZkMTI3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Mg5EMvJdvQeRMCu-g4Mjj7qMwMGsV5hZODAj4qamMhk)
Something is going wonky with respect to the spacing. It looks like for whatever reason, the wrapping div
thinks that each bus pill is a bit larger than it is (hence the fact that the weird empty space to the right is bigger when there are three routes versus when there are two).
What's especially weird is that it looks like this is only happening in Firefox. It looks great in Chrome.
Before
After
Parent Ticket: Trip Planner Preview | Output summary view
Subtask Ticket: Add mode icons (not worrying about the smushed icons for now) to the summary view
General checks
New UI, or substantial UI changes
New endpoints, or non-trivial changes to current endpoints
Assorted Implementation Notes
ItineraryGroups
algorithm to group the legs within itineraries as well as grouping similar itineraries themselves.