-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
[TASK-915] Simplify button component (even more) #5046
Conversation
and update all the instances <3
…gation is more consistent/secure also adds some useful comments
# Conflicts: # jsapp/js/projects/projectsTable/projectQuickActions.tsx # jsapp/scss/libs/react-tagsinput.scss
# Conflicts: # jsapp/js/account/security/email/emailSection.component.tsx # jsapp/scss/libs/react-tagsinput.scss
# Conflicts: # jsapp/js/components/common/button.scss
| 'blue' | ||
| 'red' | ||
| 'dark-blue'; | ||
export type ButtonType = 'primary' | 'secondary' | 'danger' | 'secondary-danger' | 'text'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a JSDoc comment for the line where type is defined, but I will move it to the line where button prop is - it should do the trick 🆗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else looks good to me :)
| 'blue' | ||
| 'red' | ||
| 'dark-blue'; | ||
export type ButtonType = 'primary' | 'secondary' | 'danger' | 'secondary-danger' | 'text'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checklist
Description
Minimizes the amount of button types we use in the UI. There are still some legacy buttons being used (that don't look properly), but the vast majority of buttons will now fall into 5 distinct types. This is an improvement from current 9 types, and from previous 15 types we've had for the last few years.
Improved the accessibility of Button: pending state is no longer focusable and keyboard-clickable, disabled button is no longer TAB focusable
Notes
Things changed here:
type
+color
mix, but rather unified and simplifiedtype
(we have 5 types:primary
,secondary
,danger
,secondary danger
, andtext
)<Button>
to use the new typeRelated issues
Includes work from #5033
After merging this kobotoolbox/docs#372 can be done