Repository navigation
Closed Stops Indication on Boarding and Alighting - #1006
alec-georgoff wants to merge 4 commits into
Conversation
miles-grant-ibigroup
left a comment
There was a problem hiding this comment.
A few small improvements
| {canceled && ( | ||
| <CanceledTripMessage aria-hidden>{canceledText}</CanceledTripMessage> | ||
| )} | ||
| {closed && <ClosedStopMessage>{closedText}</ClosedStopMessage>} |
There was a problem hiding this comment.
Why not just use <FormattedMessage />?
There was a problem hiding this comment.
Unless we're trying to replicate the screen reader stuff in which case we should do that fully!
There was a problem hiding this comment.
Are you saying use FormattedMessage in place of the ClosedStopMessage styled component? Or in place of the closedText variable?
For the former case, I think we'd have to do inline styling on it, then? Which I'm okay with but was trying to avoid since we use styled components elsewhere.
For the latter case, that might mess with styling a little bit but I can probably accommodate it.
Just want to make sure I understand the ask before making the change!
| )} | ||
| {closed && <ClosedStopMessage>{closedText}</ClosedStopMessage>} | ||
| </S.PlaceHeader> | ||
| <S.TimeColumn strikethrough={canceled}> |
There was a problem hiding this comment.
Would we want to do this?
| <S.TimeColumn strikethrough={canceled}> | |
| <S.TimeColumn strikethrough={canceled || closed}> |
|
|
||
| export const PlaceName = styled.span<{ strikethrough?: boolean }>` | ||
| export const PlaceName = styled.span<{ | ||
| red?: boolean; |
There was a problem hiding this comment.
Why not use a styled PlaceName?
There was a problem hiding this comment.
How would that work? Would you have a base PlaceName and then an extended ClosedOrCanceledPlaceName? Then you'd have to conditionally render them in the place-row component. I feel like props is easier, but let me know if I'm misunderstanding.
The original implementation for the closed stops indication only added the annotation on intermediate stops in a trip. Since OTP allows you to plan a trip that boards/alights at a closed stop, we need to add the annotation there as well.