-
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
Replace trip sort select with accessible dropdown #897
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.
I think it is heading in the right direction. I would create s separate styled component for the locale selector (so that you don't have to pass that extra locale
prop. I also indicated some i18n and a11y tweaks too.
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 major change! I don't think this behavior should be the 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.
Please see the tweaks mentioned, I think that'll make things much cleaner.
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.
Chef's kiss. Much cleaner!
/> | ||
</span> | ||
} | ||
nav |
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.
Just remove the unused nav
prop.
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.
Very clever re-use of components and great cleanup!
I have a few cosmetic notes before I dig into the code -- I'm sad to see the locale selector dropdown has lost its background on click. I would be sad to lose it but if it's not possible to keep then I think it's worth it based on how good the new dropdown looks!
The second thing is that because the dropdown is now non-native the leave feedback button that's sometimes to the left of it looks very out of place. Do you think it's worth creating a matching button class?
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.
A few more bugs to iron out
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'm not sure if this was introduced by this PR but still seeing some problems using arrow keys to navigate the menu. Agreed we can deal with the rough edges in a future PR. Should be ready to go once merge conflicts are sorted
Fixed merge conflicts! I am not seeing any issues with the keyboard navigation on the dropdown, can you let me know if you still are? |
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.
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.
Great work! Just 2 tiny nitpicks
const NavItemOnLargeScreens = styled(NavbarItem)` | ||
display: block; | ||
@media (max-width: 768px) { | ||
display: none !important; | ||
} | ||
` | ||
|
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.
Now that we control NavbarItem
we can probably add this rule right to NavbarItem
! This hack was only there because I couldn't touch bootstrap
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.
We're using NavbarItem
for the log in/sign up button as well, which should stay visible at smaller screen sizes, so I think the custom rule is still necessary!
Thank you both for all the help with this one! |
Description:
Select to sort trip results updates page without warning (3.2.2 On Input). This PR repurposes the locale selector dropdown to provide a better approach to sorting in terms of accessibility.
PR Checklist: