Skip to content
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

fix(ts/routeLadder): show dropdown on mobile breakpoint #2934

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/src/components/routeLadder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const Header = ({
>
<Dropdown className="border-box inherit-box">
<Dropdown.Toggle
className="c-route-ladder__dropdown-button d-none d-sm-flex"
className="c-route-ladder__dropdown-button d-flex"
aria-labelledby={joinTruthy([routePillId, routeOptionsToggleId])}
>
<ThreeDotsVertical />
Expand Down
14 changes: 7 additions & 7 deletions assets/tests/components/__snapshots__/ladderPage.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ exports[`LadderPage renders with alerts 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r17: route-options-toggle:r18:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r19:"
type="button"
>
Expand Down Expand Up @@ -377,7 +377,7 @@ exports[`LadderPage renders with alerts 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r1a: route-options-toggle:r1b:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r1c:"
type="button"
>
Expand Down Expand Up @@ -677,7 +677,7 @@ exports[`LadderPage renders with route tabs 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r0: route-options-toggle:r1:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r2:"
type="button"
>
Expand Down Expand Up @@ -929,7 +929,7 @@ exports[`LadderPage renders with selectedRoutes in different order than routes d
<button
aria-expanded="false"
aria-labelledby="route-pill:rr: route-options-toggle:rs:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:rt:"
type="button"
>
Expand Down Expand Up @@ -1002,7 +1002,7 @@ exports[`LadderPage renders with selectedRoutes in different order than routes d
<button
aria-expanded="false"
aria-labelledby="route-pill:ru: route-options-toggle:rv:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r10:"
type="button"
>
Expand Down Expand Up @@ -1254,7 +1254,7 @@ exports[`LadderPage renders with timepoints 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r11: route-options-toggle:r12:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r13:"
type="button"
>
Expand Down Expand Up @@ -1445,7 +1445,7 @@ exports[`LadderPage renders with timepoints 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r14: route-options-toggle:r15:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r16:"
type="button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`MinimalLadders renders route ladders 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r0: route-options-toggle:r1:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r2:"
type="button"
>
Expand Down Expand Up @@ -215,7 +215,7 @@ exports[`MinimalLadders renders route ladders 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r3: route-options-toggle:r4:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r5:"
type="button"
>
Expand Down
22 changes: 11 additions & 11 deletions assets/tests/components/__snapshots__/routeLadder.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`routeLadder displays loading if we are fetching the timepoints 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r1a: route-options-toggle:r1b:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r1c:"
type="button"
>
Expand Down Expand Up @@ -95,7 +95,7 @@ exports[`routeLadder displays no crowding data for a bus coming off a route with
<button
aria-expanded="false"
aria-labelledby="route-pill:r14: route-options-toggle:r15:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r16:"
type="button"
>
Expand Down Expand Up @@ -396,7 +396,7 @@ exports[`routeLadder doesn't display crowding data for a vehicle coming off a ro
<button
aria-expanded="false"
aria-labelledby="route-pill:r17: route-options-toggle:r18:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r19:"
type="button"
>
Expand Down Expand Up @@ -640,7 +640,7 @@ exports[`routeLadder doesn't render a bus that's off-course but nonrevenue 1`] =
<button
aria-expanded="false"
aria-labelledby="route-pill:r11: route-options-toggle:r12:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r13:"
type="button"
>
Expand Down Expand Up @@ -851,7 +851,7 @@ exports[`routeLadder renders a route ladder 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r0: route-options-toggle:r1:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r2:"
type="button"
>
Expand Down Expand Up @@ -1020,7 +1020,7 @@ exports[`routeLadder renders a route ladder with crowding instead of vehicles 1`
<button
aria-expanded="false"
aria-labelledby="route-pill:ru: route-options-toggle:rv:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r10:"
type="button"
>
Expand Down Expand Up @@ -1325,7 +1325,7 @@ exports[`routeLadder renders a route ladder with laying over vehicles 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:rr: route-options-toggle:rs:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:rt:"
type="button"
>
Expand Down Expand Up @@ -1569,7 +1569,7 @@ exports[`routeLadder renders a route ladder with the new header and detour dropd
<button
aria-expanded="false"
aria-labelledby="route-pill:r6: route-options-toggle:r7:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r8:"
type="button"
>
Expand Down Expand Up @@ -1738,7 +1738,7 @@ exports[`routeLadder renders a route ladder with the new header format 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r3: route-options-toggle:r4:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r5:"
type="button"
>
Expand Down Expand Up @@ -1907,7 +1907,7 @@ exports[`routeLadder renders a route ladder with vehicles 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:rl: route-options-toggle:rm:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:rn:"
type="button"
>
Expand Down Expand Up @@ -2243,7 +2243,7 @@ exports[`routeLadder renders a route ladder with vehicles in the incoming box 1`
<button
aria-expanded="false"
aria-labelledby="route-pill:ro: route-options-toggle:rp:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:rq:"
type="button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`RouteLadders renders a route ladder 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r0: route-options-toggle:r1:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r2:"
type="button"
>
Expand Down Expand Up @@ -212,7 +212,7 @@ exports[`RouteLadders renders a route ladder 1`] = `
<button
aria-expanded="false"
aria-labelledby="route-pill:r3: route-options-toggle:r4:"
class="c-route-ladder__dropdown-button d-none d-sm-flex dropdown-toggle btn btn-primary"
class="c-route-ladder__dropdown-button d-flex dropdown-toggle btn btn-primary"
id="react-aria-:r5:"
type="button"
>
Expand Down
Loading