Skip to content
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

Unifying buttons #5567

Closed
alyblenkin opened this issue May 3, 2023 · 11 comments · Fixed by #5676
Closed

Unifying buttons #5567

alyblenkin opened this issue May 3, 2023 · 11 comments · Fixed by #5676
Assignees
Milestone

Comments

@alyblenkin
Copy link
Collaborator

alyblenkin commented May 3, 2023

Blocked by #5607

Unify all buttons styles with M3. There are five types of common buttons: elevated, filled, filled tonal, outlined, and text in their guidelines. We will use all of the button styles apart from "tonal", as I haven't figured out a good use case for this usage.

It would be great to also increase the text size to LabelLarge text appearance (and potentially padding to match) of all Material 3 button styles because our layouts are very text heavy in comparison to the mockups M3 uses.

Image

In the example actions below, I've called out where the buttons are full-width (currently implemented using MainMenuButton and StartNewFormButton) vs default (using Button or MaterialButton), and where we are using high-emphasis/primary buttons (filled) and medium-emphasis secondary buttons (outline).

Example actions Current button style Future button style
Landing screen Outline, compact and narrow, with icon Filled primary button, outline, full-width, with icon - Figma
Main menu Elevated, filled primary button, outline, full-width, icon & metadata Same - Figma
Settings page Text and blue icons spaced out, hint text Text with icon, hint text - Figma (Listing items, like what we did with the preferences dialog )
Exit dialogs Filled primary button, outline secondary buttons, full-width, with icon Same - Figma
Confirmation dialog (i.e. deleting saved forms, change admin password) Text Filled primary "Ok", text "Cancel"
Start GeoPoint / change location Filled, full-width, small radius Filled, full-width
GeoPoint widget Text Filled primary "Ok", text "Cancel"
Select one from map widget Filled, compact with icon Filled primary button with icon
Back and next Text with icon Filled "Next" when text is entered, outline "Back", with icon - Figma
Go to start and Go to End Outline with small radius Outline
Sort by filter Text with icon with light grey text Text with icon
Icons Combination of filled and outlined May update in the future 😊

Other notes:
In some places, we have two primary buttons, which we want to avoid. An example of this is when the user is deleting saved drafts, "select all" and "delete selected" are both filled. The primary / high-emphasis is on the "delete selected" action, and "select all" is a secondary outlined button.

@seadowg
Copy link
Member

seadowg commented May 9, 2023

Just marking this as "needs discussion" for the moment, as we'll need to flesh this out more before doing anything.

@seadowg
Copy link
Member

seadowg commented May 16, 2023

Moving this out of the milestone as I don't think we'll prioritize for this release.

@seadowg seadowg removed this from the v2023.2 milestone May 16, 2023
@seadowg
Copy link
Member

seadowg commented May 30, 2023

Just a note from a recent discussion with @alyblenkin: it's likely that we want to up the text size (and potentially padding to match) of all Material 3 button styles. This might mean just bumping the font size on the LabelLarge text appearance.

@seadowg seadowg added this to the v2023.3 milestone May 30, 2023
@seadowg seadowg mentioned this issue May 30, 2023
3 tasks
@seadowg
Copy link
Member

seadowg commented Jun 22, 2023

Blocking this on #5607 as it won't make sense to implement until after.

@alyblenkin
Copy link
Collaborator Author

Notes:

  • Define categories of buttons: for example, full-width buttons in the main menu and widgets
  • Everything else is from material
  • Specifying the places we need to update things
  • What are the things we don't like about the material pattern now - bumping the text size

@alyblenkin
Copy link
Collaborator Author

@seadowg, I may have gone over the top with this story 😅. Let me know if I missed anything or if I should clarify anything.

@seadowg
Copy link
Member

seadowg commented Jun 26, 2023

I've added some parenthesis on how default vs full-width is implemented. This is ready to go!

@seadowg seadowg moved this from not ready to backlog in ODK Collect Jun 26, 2023
@seadowg seadowg removed the blocked label Jul 28, 2023
@seadowg
Copy link
Member

seadowg commented Jul 28, 2023

Unblocking as we'll do this as part of the same PR as #5607.

@seadowg seadowg moved this from backlog to in progress in ODK Collect Jul 28, 2023
@seadowg seadowg self-assigned this Jul 28, 2023
@seadowg
Copy link
Member

seadowg commented Jul 28, 2023

@alyblenkin one thing I'm not sure about: dialogs in Material use text button for dialog options. Do you really want to switch them to filled?

@alyblenkin
Copy link
Collaborator Author

alyblenkin commented Jul 28, 2023

Let's keep our custom exit / save as draft dialog as is!

For the others, we should have the action as a filled button, and a text button to link back. For the example below, we would have a text button for "Cancel" and a filled button for "Save."

Screenshot 2023-07-28 at 12 07 15 PM

I know they want to use two text buttons, but that's not giving the user the correct feedback. Happy to chat about this, if it will be a lot of work! It's not the end of the world if we can't do it, but it would make it a better user experience.

  • Navigation is a link/ text button
  • Action is a button

Figma example | Article about this UX pattern

@seadowg
Copy link
Member

seadowg commented Jul 31, 2023

I know they want to use two text buttons, but that's not giving the user the correct feedback. Happy to chat about this, if it will be a lot of work! It's not the end of the world if we can't do it, but it would make it a better user experience.

Makes sense! I just wanted to check seeing as we're deviating from Material 3 itself. I'll give this a go.

@seadowg seadowg modified the milestones: v2023.3, v2023.4 Aug 28, 2023
@seadowg seadowg added this to the v2023.4 milestone Aug 28, 2023
@github-project-automation github-project-automation bot moved this from in progress to done in ODK Collect Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging a pull request may close this issue.

2 participants