-
-
Notifications
You must be signed in to change notification settings - Fork 29
FeaturePanel: Single public transport route #626
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
810bb76
to
ad7d75a
Compare
background: isFirst ? 'transparent' : color, | ||
}} | ||
/> | ||
{hold && ( |
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 don't understand what does this prop mean, can you please explain and then we can perhaps find a more suitable name?
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.
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.
Maybe we should just call it showCircle
or something similar. This names indicates what the property is for
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.
see new comment below
return ( | ||
<StationsList> | ||
{stops.map((stop, i) => { | ||
{stopsWithButton.map((stop, i) => { |
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.
While this is better than before, I would suggest code like this - in my opinion it is more streamlined, it doesnt mix stops with buttons. Also we could get rid of the showCircle prop, or just use it statically.
stops.map((stop, i) => (
<>
<StationItem stop={stop} showCircle />
{i === 0 ? (<ShowMoreLessButton />) : null}
</>
))
Do you think this could work, or do I miss something?
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.
ShowMoreLessButton
needs to be in a own StationItem
. If it isn't in one at all the left line will suddenly stop and then start again. If it is in the same as the Link it will break the spacing and the circle would be shown in between the button and the first label. If you can think of a solution better then the one I just commited let me know :)
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.
Sure, that was only a pseudo-code.
The solution you commited is perfect i think. We get rid of the stopsWithButton array, and the code reads clearly now. 👍
I noticed you recently prefixed a pr with |
I think |
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Description
When the user clicks a single public transport route they now can see a list of stops.
If the route has more then 7 stops it will get minimized in a smaller view. It is easy to expand it back either by using the checkbox or by pressing the small arrow.
Example links
/relation/13065547
Screenshots