hackforla / tdm-calculator

DTLA Hack for LA is partnering with Los Angeles Department of Transportation (LADOT) to develop a Traffic Demand Management (TDM) calculator tool. This tool will help planners at LADOT and real estate developers to meet the Los Angeles’s Mobility Plan goals by 2035.
https://tdm.ladot.lacity.org
GNU General Public License v2.0
49 stars 33 forks source link

Re-Design sort options: change toggle buttons to radio buttons for mutually exclusive options and update style guide #1834

Closed NilakshiS closed 1 month ago

NilakshiS commented 2 months ago

Overview

The toggle buttons currently used in the prototype might confuse users, as they look like you can select multiple options. However, you can only sort in one way at a time. We should either change the design or use radio buttons instead, as the Dev team suggested.

Details

Each popup has an option to sort by that column. The prototype design uses two toggle buttons that essentially mean "Sort Ascending" or "Sort Descending" (though the labels differ based on the column).

Image of Toggle buttons on "Created On" column by default ![image](https://github.com/user-attachments/assets/bc01f9f3-df45-4c67-8e74-c6b51dc21cca)
Image of Toggle buttons on "Created On" column on Hover ![image](https://github.com/user-attachments/assets/ea949624-bc88-4689-bb52-40108263c909)

Dev team suggests that toggle buttons are not an appropriate choice, since it is not possible to sort ascending and descending simultaneously. A better choice is a set of two radio buttons. This allows the user to select one or the other, but not both.

A prototype using radio buttons instead of toggle buttons ![image](https://github.com/user-attachments/assets/660e2563-b73d-47d5-8bff-ec94ea5b3326)

Moreover, the data might not be sorted by that column at all, in which case neither radio button is checked when the popup is first opened. If the user then clicks on one of the choices, it will be applied when the Apply button is clicked. They can also choose Reset to not apply sorting by that column.

Dev has already implemented this change (see My Project's page).

Action Items

Resources

namigoeku commented 1 month ago

Although I understand Dev's concern regarding the toggles, I believe toggles would provide a more modern UI as they are either on or off and when paired with other features like the checkboxes, offer less cognitive load. I have drafted some ideas.

6

7

namigoeku commented 1 month ago

Changed the design to include just the radio sort by ascending/descending. Updated this portion in the Figma prototype (#1578 #1386 )

Screenshot 2024-10-01 at 11 07 46 PM

image

NilakshiS commented 1 month ago

Added the radio buttons and sort options to the new prototype made as part of #1885

Screenshots of the updated designs from Figma ![Image](https://github.com/user-attachments/assets/a254a6b8-4261-43e1-a642-f44a36f3a683) ![Image](https://github.com/user-attachments/assets/1c667cc4-a5c4-4947-899b-74844c5d5f19) ![Image](https://github.com/user-attachments/assets/2ec00c60-4cf0-40a9-8655-08be755d777e) ![Image](https://github.com/user-attachments/assets/9cd7f981-31ce-401e-903d-b4939b010bfc)