-
Notifications
You must be signed in to change notification settings - Fork 53
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
Route renderer a11y #904
Route renderer a11y #904
Conversation
… if both are same.
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.
Thanks for all this cleanup! New structure makes sense, just one quick potential rename
@@ -25,21 +25,26 @@ const Block = styled.span<{ color: string; isOnColoredBackground?: boolean }>` | |||
`} | |||
` | |||
|
|||
type RouteRendererProps = { | |||
export type RouteRendererProps = { | |||
fullRender?: boolean |
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.
Should we rename this to expandedRender
or renderName
?
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 dropped fullRender
in acc109a. For immediate purposes the custom route renderer uses leg.onColoredBackground
.
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 would be tempted to refactor that leg.onColoredBackground
TBH.
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.
Variable font size is looking a bit funky, otherwise this all looks good thank you for the cleanup
<RouteRenderer | ||
isOnColoredBackground={route.operator?.colorMode?.includes('gtfs')} | ||
// All GTFS bg colors look strange with the top border | ||
leg={generateFakeLegForRouteRenderer(route, true)} | ||
style={{ | ||
fontSize: routeNameFontSize(routeName) |
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.
The variable font size might be causing problems...
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.
Working for me thanks for the changes!
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.
This route name layout looks really nice! LGTM
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.
This route name layout looks really nice! LGTM
Description:
Improves visual accessibility by requesting custom route renderers to fully render route names if needed (especially in the pattern viewer and stop viewer).
PR Checklist: