-
Notifications
You must be signed in to change notification settings - Fork 59
Move map expansion button to itinerary header #1502
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
base: dev
Are you sure you want to change the base?
Conversation
| <ItinerariesHeaderContainer | ||
| showHeaderText={showHeaderText} | ||
| style={{ | ||
| alignItems: 'flex-end', |
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 was going to abstract these into CSS or Styled Components, but it looks like we already use inline styling elsewhere in this file so I stuck with that.
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.
You can add these to ItinerariesHeaderContainer, since it's a styled-component! Better to keep all the styles in the same place.
|
@amy-corson-ibigroup I prevented scrolling in the collapsed header area and updated to use the chevron icon! Currently looking into the animation to see if I can clean it up a bit but wanted to get the other fixes over to you for review. |
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.
- Can we move the zoom buttons to the left hand side? We're still getting some button overlap on smaller screen sizes: !

- Something about the button isn't quite right to me, especially when it's collapsed... wondering how we feel about a) making the chevron icon a little wider, and/or b) when the itinerary results are collapsed, making the button the base branding color, so it matches the mobile header? idk, just a couple of ideas, I'm not married to either of them but curious what you and a second reviewer might think!
| @@ -1,5 +1,7 @@ | |||
| /* eslint-disable complexity */ | |||
| import { ArrowLeft } from '@styled-icons/fa-solid/ArrowLeft' | |||
| import { ChevronDown } from '@styled-icons/fa-solid/ChevronDown' | |||
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.
Probably easier to just import one icon and rotate
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.
Well, actually I guess we import both in app-menu-items so I'll leave that to the second reviewer
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.
Yeah, I found these via their usage in another component and figured I'd keep the same pattern here. Happy to go with a rotate strategy if you or others feel strongly, though!
| <ItinerariesHeaderContainer | ||
| showHeaderText={showHeaderText} | ||
| style={{ | ||
| alignItems: 'flex-end', |
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.
You can add these to ItinerariesHeaderContainer, since it's a styled-component! Better to keep all the styles in the same place.
| <StyledIconWrapper | ||
| className={`${customBatchUiBackground && 'base-color-bg'}`} | ||
| {onClickExpansionButton && ( | ||
| <button |
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 button needs to have a title and an aria-label for non-sighted users. You can repurpose the i18n strings for "expand map" and "show results"
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.
Ah thanks for looking out for that; I assume the same value is okay for title and aria-label? That's what I implemented. If not, let me know what the difference is and I can fix
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.
Yes, the same text is good for both! But I would create two variables showResultsText and expandMapText so you're not duplicating code.
Oh, I'm seeing now we have it changed for one environment in the configuration, but I think this needs to be the new default! |
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 like the unicode chevron! thank you for the changes and for your patience! Sorry for taking a few days to review:
- if you look at this on taller devices, the duration button is peeking out. I think we'll need a solution where the duration button is conditionally rendered?
- The sort results button is blue now?
Good catch on the vertical spacing! I dug into it and realized that we need to be a bit more adaptive in our sizing of the button. I ended up using the viewport height ( Regarding the blue sort button, I believe that problem is fixed with the updated configuration styling! Let me know if it persists even with the updated config though. |








Description:
This update moves the "Expand map"/"Show results" button from the map to the itinerary header component, preventing overlap issues with the map attribution on smaller screen sizes in mobile view.
PR Checklist: