We render sort options in two places with the new filter controls. Instead of having to manually pass the options is two places, let鈥檚 just pass to ResourceList and share through context.
@sarahill what do you think about switching this back to a Select? I'm concerned about the usability of the popover for an important action like sorting.
Yea, I know we switched to a button with a popover or real estate but, usability wise, I agree it's not the best. The only concern is the available space in that area.
It would be nice to revisit popovers and how they function on mobile. Ryan has tried to tackle this though and I know there are some issues with popovers acting like sheets in embedded apps.
@dpersing do you have any thoughts on this?
cc: @ry5n
One big concern about using a native <select> on desktop for sorting is that keyboard users can trigger different effects on different platforms. On Windows, using the arrow keys cycles the selected option, and we want to avoid updating the sort order every time a new option is selected. Windows users can create the popup effect that happens by default on macOS, but it takes an extra keystroke with the space key.
Gif of the default behavior on Windows

However, it's a better experience on mobile for that reason, because of the native sheet effect you mention, @sarahill.
Having a select with a submit button, or a more application-y dropdown menu, would be preferred.
If the problem lies in some people not realizing that they can scroll the popover, could we consider custom scrollbars for the popover component, in order to always show a scrollbar when overflow is present?
Having a select with a submit button, or a more application-y dropdown menu, would be preferred.
A submit button seems cumbersome with the way the UI is right now but this does make sense.
Ryan's suggestion could work. I'm leaning toward leaving this as is for now though. This needs an evolution but I don't necessarily want to keep band-aiding it.
Open to other thoughts/opinions if anyone feels strongly the other way.
I'm good with that, will leave as-is for now. Going to update the description to reflect the technical approach of sharing the sorting through ResourceList context
Decided not to do this. I've implemented the filters so they are only concerned with filtering, with no concept of auxiliary actions. Aux actions will be up to the implementer to add.
Most helpful comment
A submit button seems cumbersome with the way the UI is right now but this does make sense.
Ryan's suggestion could work. I'm leaning toward leaving this as is for now though. This needs an evolution but I don't necessarily want to keep band-aiding it.
Open to other thoughts/opinions if anyone feels strongly the other way.