-
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
feat(connected-itinerary-body): make alert collapse configurable #1182
Conversation
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.
One small nitpick!
example-config.yml
Outdated
@@ -347,6 +347,8 @@ itinerary: | |||
renderRouteNamesInBlocks: true | |||
# Whether the mode icons should be colored as well | |||
fillModeIcons: true | |||
# Allow user to collapse alerts in itinerary body | |||
collapseAlerts: true |
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 is misleadingly named. Can we name it allowUserAlertCollapsing
?
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.
Looks good! Just one boolean thing to deal with
@@ -116,6 +117,7 @@ class ConnectedItineraryBody extends Component { | |||
<ItineraryBodyContainer> | |||
<StyledItineraryBody | |||
accessibilityScoreGradationMap={accessibilityScoreGradationMap} | |||
alwaysCollapseAlerts={allowUserAlertCollapsing} |
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.
alwaysCollapseAlerts={allowUserAlertCollapsing} | |
alwaysCollapseAlerts={!allowUserAlertCollapsing} |
Should this be flipped?
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 think so, I'm setting allowUserAlertCollapsing
to true
in the config!
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.
Unless we want alerts to collapse by default, which might be preferable?
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.
But as it is right now if allowUserAlertCollapsing
is true, then they won't be allowed to collapse them right? Or am I forgetting how the behavior works
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.
No, alwaysCollapseAlerts
needs to be true for the alerts to collapse
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.
Please add the new attribute to the corresponding config type.
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.
Approving subject to https://github.com/opentripplanner/otp-react-redux/pull/1182/files#r1543097570.
Co-authored-by: Binh Dam <[email protected]>
Description:
Use
alwaysCollapseAlerts
prop in connected itinerary body to configure whether users can collapse alerts.PR Checklist: