-
Notifications
You must be signed in to change notification settings - Fork 8
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
cleanup: Remove detour-route-selection and route-ladder-header-update test groups #2697
Changes from all commits
a769efe
1766383
c3e70a6
5f54a0a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
import React, { useId } from "react" | ||
import { | ||
AlertIcon, | ||
CrowdingIcon, | ||
ReverseIcon, | ||
ReverseIconReversed, | ||
} from "../helpers/icon" | ||
import { CrowdingIcon, ReverseIcon, ReverseIconReversed } from "../helpers/icon" | ||
import { | ||
getLadderCrowdingToggleForRoute, | ||
LadderCrowdingToggle, | ||
|
@@ -25,7 +20,6 @@ import { LoadableTimepoints, Route, RouteId } from "../schedule.d" | |
import IncomingBox from "./incomingBox" | ||
import Ladder from "./ladder" | ||
import Loading from "./loading" | ||
import { CloseButton as OldCloseButton } from "./closeButton" | ||
import Tippy from "@tippyjs/react" | ||
import { tagManagerEvent } from "../helpers/googleTagManager" | ||
import inTestGroup, { TestGroups } from "../userInTestGroup" | ||
|
@@ -48,39 +42,6 @@ interface Props { | |
onAddDetour?: (route: Route) => void | ||
} | ||
|
||
export const Header = ({ | ||
routeName, | ||
onClose, | ||
hasAlert, | ||
}: { | ||
routeName: string | ||
onClose: () => void | ||
hasAlert: boolean | ||
}) => { | ||
return ( | ||
<div className="c-route-ladder__header"> | ||
{hasAlert && ( | ||
<Tippy | ||
content="Active detour" | ||
trigger="click" | ||
onShow={() => tagManagerEvent("alert_tooltip_clicked")} | ||
> | ||
<AlertIcon | ||
className="c-route-ladder__alert-icon" | ||
aria-label="Route Alert" | ||
/> | ||
</Tippy> | ||
)} | ||
<div className="c-route-ladder__close-button-container"> | ||
<OldCloseButton closeButtonType="l_darker" onClick={onClose} /> | ||
</div> | ||
|
||
<div className="c-route-ladder__route-name">{routeName}</div> | ||
</div> | ||
) | ||
} | ||
|
||
// TODO: delete old header after roll-out | ||
export const NewHeader = ({ | ||
routeName, | ||
onClose, | ||
|
@@ -130,8 +91,11 @@ export const NewHeader = ({ | |
trigger="click" | ||
onShow={() => tagManagerEvent("alert_tooltip_clicked")} | ||
> | ||
<div className="c-route-ladder__alert-icon"> | ||
<ExclamationTriangleFill aria-label="Route Alert" /> | ||
<div | ||
className="c-route-ladder__alert-icon" | ||
aria-label="Route Alert" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you teach me why the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test uses a selector that tries to find the route alert icon using I think this means that the new route ladder header route alert icon isn't doing accessibility quite right. (FWIW - on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You could try setting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But also, as I understand it, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could attempt to make things smarter, where if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Want to either:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm good either way! Since it was old code, I'm also fine with how it is for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried I also tried
PR (into this branch for now) below |
||
> | ||
<ExclamationTriangleFill /> | ||
</div> | ||
</Tippy> | ||
)} | ||
|
@@ -251,30 +215,17 @@ const RouteLadder = ({ | |
|
||
return ( | ||
<> | ||
{inTestGroup(TestGroups.RouteLadderHeaderUpdate) ? ( | ||
<NewHeader | ||
routeName={route.name} | ||
hasAlert={hasAlert} | ||
onClose={() => { | ||
deselectRoute(route.id) | ||
}} | ||
showDropdown={ | ||
inTestGroup(TestGroups.DetoursPilot) && | ||
inTestGroup(TestGroups.DetourRouteSelection) | ||
} | ||
onClickAddDetour={() => { | ||
onAddDetour?.(route) | ||
}} | ||
/> | ||
) : ( | ||
<Header | ||
routeName={route.name} | ||
hasAlert={hasAlert} | ||
onClose={() => { | ||
deselectRoute(route.id) | ||
}} | ||
/> | ||
)} | ||
<NewHeader | ||
routeName={route.name} | ||
hasAlert={hasAlert} | ||
onClose={() => { | ||
deselectRoute(route.id) | ||
}} | ||
showDropdown={inTestGroup(TestGroups.DetoursPilot)} | ||
onClickAddDetour={() => { | ||
onAddDetour?.(route) | ||
}} | ||
/> | ||
<Controls | ||
displayCrowdingToggleIcon={displayCrowding} | ||
ladderDirection={ladderDirection} | ||
|
This file was deleted.
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.
What do you think about renaming
NewHeader
toHeader
in this PR? I think it should be renamed with this work, but understand if you'd want it in a new PRThere 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.
Oooh additionally, beyond just changing the component name, the "new" label on the classnames will need changing. In hindsight, this should have been done in my work! I should have used the term "oldHeader" instead of going with "newHeader"
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.
I created a follow-up subtask for this in order to keep the diff for this smaller and easier to review. I could lump them together if you'd prefer.