-
Notifications
You must be signed in to change notification settings - Fork 9
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: Suppress "Add detour" dropdown on mobile #2716
feat: Suppress "Add detour" dropdown on mobile #2716
Conversation
Coverage of commit
|
@@ -213,6 +214,11 @@ const RouteLadder = ({ | |||
|
|||
const displayCrowding = someVehicleHasCrowding(vehiclesAndGhosts, route.id) | |||
|
|||
const screenSize = useScreenSize() |
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.
can we do this within CSS instead?
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.
We could - I think that would make it a bit more difficult to test, but perhaps that's okay?
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.
Yeah I'm not really sure we'd be able to test it until we have CSS in Jest tests, but that's fine with me. We could assert a certain class is on it, I think we just need to change it to d-none d-sm-block
(replace block
with whatever it's supposed to be), or something like that https://getbootstrap.com/docs/5.3/utilities/display/ (see the Hidden only on xs
text)
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.
@firestack I updated to match ☝️, but I'm not sure that I love the lack of testability. I'll let it sit with me over the evening.
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.
@firestack I've let it sit with me, and while I don't love relying on snapshot tests, they will solve this issue.
Ready for re-review!
Coverage of commit
|
Asana Ticket: https://app.asana.com/0/1148853526253420/1207448960080664/f