Skip to content

Closed Stops Indication on Boarding and Alighting - #1006

Open
alec-georgoff wants to merge 4 commits into
opentripplanner:masterfrom
ibi-group:closed-stops-two
Open

alec-georgoff wants to merge 4 commits into
opentripplanner:masterfrom
ibi-group:closed-stops-two

Conversation

@alec-georgoff

Copy link
Copy Markdown
Contributor

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.

@miles-grant-ibigroup miles-grant-ibigroup left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small improvements

{canceled && (
<CanceledTripMessage aria-hidden>{canceledText}</CanceledTripMessage>
)}
{closed && <ClosedStopMessage>{closedText}</ClosedStopMessage>}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use <FormattedMessage />?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless we're trying to replicate the screen reader stuff in which case we should do that fully!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we want to do this?

Suggested change
<S.TimeColumn strikethrough={canceled}>
<S.TimeColumn strikethrough={canceled || closed}>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Added


export const PlaceName = styled.span<{ strikethrough?: boolean }>`
export const PlaceName = styled.span<{
red?: boolean;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use a styled PlaceName?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants