Skip to content

Conversation

@alec-georgoff
Copy link
Collaborator

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:

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?

<ItinerariesHeaderContainer
showHeaderText={showHeaderText}
style={{
alignItems: 'flex-end',
Copy link
Collaborator Author

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.

Copy link
Contributor

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
Copy link
Contributor

Looking really good! I haven't spent a ton of time looking at the code yet, thought it might make sense to iron out the below for this first round:

  1. Something we discussed was replacing the button text with a chevron, which most mobile users will recognize as a way to expand/collapse the panel. Here's some examples of how this could look
image image
  1. The container on the button has a scroll and so you can easily accidentally get the page into a weird state:
image
  1. Could be this is outside the scope of this PR, but I'm wondering if we may want to more gracefully animate the map expanding and collapsing? Right now the panel size is animated but the map is not, and there's a huge white gap mid-animation when the map resizes. Either we could animate the map height or if that doesn't work we could delay the map resizing.

Thank you so so much for the work on this!

@alec-georgoff
Copy link
Collaborator Author

@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.

Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup left a comment

Choose a reason for hiding this comment

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

  1. Can we move the zoom buttons to the left hand side? We're still getting some button overlap on smaller screen sizes: !image
  2. 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'
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Collaborator Author

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',
Copy link
Contributor

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
Copy link
Contributor

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"

Copy link
Collaborator Author

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

Copy link
Contributor

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.

@amy-corson-ibigroup
Copy link
Contributor

amy-corson-ibigroup commented Dec 10, 2025

  1. Can we move the zoom buttons to the left hand side? We're still getting some button overlap on smaller screen sizes

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!

@alec-georgoff
Copy link
Collaborator Author

  1. Can we move the zoom buttons to the left hand side? We're still getting some button overlap on smaller screen sizes: !image
  2. 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!

How about this? Made it wider and used the branding color as suggested:

image

@alec-georgoff
Copy link
Collaborator Author

Latest update uses the unicode chevron and tweaks the styling a bit to make it less intrusive:

Screenshot 2025-12-16 at 2 31 55 PM Screenshot 2025-12-16 at 2 32 21 PM

Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup left a 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:

  1. 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?
image
  1. The sort results button is blue now?
image If we can fix it while we're touching this code that would be awesome but feel free to ignore it and we can fix later, I don't want to keep changing the scope of this PR.

@alec-georgoff
Copy link
Collaborator Author

I like the unicode chevron! thank you for the changes and for your patience! Sorry for taking a few days to review:

  1. 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?
image 2. The sort results button is blue now?

image If we can fix it while we're touching this code that would be awesome but feel free to ignore it and we can fix later, I don't want to keep changing the scope of this PR.

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 (vh) as the height of the chevron's button. Since our styling was already using a percentage of vertical screen to move the results pane down, using vh allows us to use that same percentage value for the button 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.

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.

3 participants