8000 Add Tab for direct departures search by HerrLevin · Pull Request #831 · motis-project/motis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Tab for direct departures search #831

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

Merged
merged 6 commits into from
Apr 25, 2025

Conversation

HerrLevin
Copy link
Contributor

I've added a simple layout to search for departures at a single station instead of clicking through the planner.

test.mp4

@felixguendling
Copy link
Member

Thank you! This looks like a useful feature!
The CI isn't green. Can you please check with npm run check and npm run lint locally?
Regarding readability, I would prefer to have more contrast than dark blue on black.
Is there a particular reason you didn't use the shadcn tabs component? Until now it has saved us some lines of code and styling work to just use shadcn.

@HerrLevin
Copy link
Contributor Author

Fixed the ci issues. :)

I'll look into the shadcn tabs!

@HerrLevin
Copy link
Contributor Author
HerrLevin commented Apr 24, 2025

Screenshot 2025-04-24 at 19 30 42

I've added the shadcn tabs! Also the ci should work now (hopefully can't fix CI / docker)

Copy link
Contributor
@traines-source traines-source left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good in general, but

  • I can't switch to arrivals anymore (error 500, see comment)
  • mobile view is slightly destroyed due to fixed width
  • on mobile, this further decreases the remaining space for the itinerary results, but I think this is something out of scope of this PR that needs to be improved/changed regardless
  • I'm not 100% convinced of the tab name "Fahrplan/Timetable/Horaire". Maybe rather "Verbindungen/Connections/Itinéraires"? But that's just a suggestion.

And yes Docker build always fails on foreign branches. We should fix this but that's not your fault :)

@HerrLevin
Copy link
Contributor Author

Thanks for pointing this out! I thought I fixed the departures/arrivals bug already but apparently not. :D

  • fixed will only be applied after md breakpoint (Tried it with fractions but tailwind 3 is a bit limited here & this will give weird results. The fixed width seems to be the best solution above md. Below that w-full seems to do the tric 8000 k)
  • fixed the departures/arrival thing
  • Changed the text to Connections (I like it!)

Copy link
Contributor
@traines-source traines-source left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why responsiveness wouldn't work similar to before, but it's good like that as well. Thanks 🙌

@traines-source traines-source merged commit ecab7ba into motis-project:master Apr 25, 2025
11 of 12 checks passed
@HerrLevin
Copy link
Contributor Author

If I understand it correctly the problem seems to be that the size was defined through the width of the buttons below the input. Without a fixed width for the card, the departures tab was about 100px wide.

@@ -338,28 +291,41 @@
<LevelSelect {bounds} {zoom} bind:level />

<div class="maplibregl-control-container">
<div class="maplibregl-ctrl-top-left">
<div class="maplibregl-ctrl-top-left w-full">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this change causes the map to become non-interactive for the whole width of the page for any height range elements are visible on the left:

image

image

Hovering anywhere over the highlighted area changes the cursor to default instead of grab and the map cannot be interacted with.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing, I've fixed it in #837

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.

4 participants
0