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

Consistent and configurable OK/Cancel buttons #240

Open
3 tasks
techniq opened this issue Feb 7, 2024 · 3 comments
Open
3 tasks

Consistent and configurable OK/Cancel buttons #240

techniq opened this issue Feb 7, 2024 · 3 comments
Milestone

Comments

@techniq
Copy link
Owner

techniq commented Feb 7, 2024

Currently components like DateRangeField and MultiSelectField have OK/Cancel or Cancel/Apply buttons...

DateRangeField MultiSelectField
image image

They should be...

  • Consistently ordered
    • What should the default be? OK/Cancel (Windows) or Cancel/OK (Mac), runtime setting based on environment/etc?
Windows Mac
image image
  • Locale translated
    • Support changing text as well (OK vs Apply, for example)
  • Support variant / color defaults?
    • Should OK (primary) be fill/primary, and Cancel (secondary) be default/default, and allow it to be configured in settings()

Related:

@dimfeld
Copy link
Contributor

dimfeld commented Feb 7, 2024

What should the default be? OK/Cancel (Windows) or Cancel/OK (Mac), runtime setting based on environment/etc?

Definitely don't change based on environment, it should be consistent. Otherwise you end up with different button order on desktop vs. phone for example which is disorienting.

The choice of order doesn't really matter much IMO. There are good arguments for both directions and neither really wins out.

I think the one thing that maybe tips it toward the Cancel/OK order is that when you have additional buttons in that row, the additional buttons go on the left, and then the Cancel and OK buttons are always in the same position. Minor point though.

@dimfeld
Copy link
Contributor

dimfeld commented Feb 7, 2024

BTW it sounds like having OkButton and CancelButton components would probably be a good idea here. Thin wrappers around Button but it would simplify the customization and ensure consistent application of i18n and so on.

@techniq
Copy link
Owner Author

techniq commented Feb 7, 2024

BTW it sounds like having OkButton and CancelButton components would probably be a good idea here. Thin wrappers around Button but it would simplify the customization and ensure consistent application of i18n and so on.

That's interesting... and would make styling straight forward.

@techniq techniq added this to the v1 milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants