Skip to content

Make sorting dropdown in user admin Pajamas compliant

Laura Callahan requested to merge migrate-dropdown-user into master

What does this MR do and why?

This removes the bootstrap dropdown and replaces it with the Pajamas compatible listbox. Addresses #263219 (closed). Additionally, adjusts the page to sort the users by name rather than ID by default since an option in the dropdown will always be selected. Without a sort specified via URL, the defaultly selected option will be Name since it is first in the list.

Screenshots or screen recordings

Before After
Screen_Shot_2022-02-16_at_10.56.37_AM Screen_Shot_2022-02-18_at_12.56.57_PM Screen_Shot_2022-02-18_at_12.57.10_PM

How to set up and validate locally

  • Visit http://localhost:3000/admin/users, users should be sorted by name and Name should be visible in the dropdown
  • Manually select the Name sorting option from the dropdown again, the URL should append ?sort=name_asc but the sorting should remain the same as the previous step
  • Select an arbitrary option from the dropdown, and users should sort accordingly

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Laura Callahan

Merge request reports

Loading