-
Notifications
You must be signed in to change notification settings - Fork 3
setting 100px as default width for buttons #1185
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
Conversation
ChristopherChudzicki
left a comment
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.
See Jon's comment.
Please also take a look at the relevant storybook pages... e.g.,
- http://localhost:6006/?path=/story/smoot-design-button--action-buttons-showcase
- http://localhost:6006/?path=/story/smoot-design-button--buttons-showcase
just to make sure things look reasonable.
thanks. I keep forgetting we have something like this |
|
just pushed a fix with your suggestion |
ChristopherChudzicki
left a comment
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's a tab question for @steven-hatch.
@shanbady ... requested change: Could you fix the MenuButton to not use Button? Probably should just be a snowflake styled.button(...).
| ":disabled": { | ||
| cursor: "default", | ||
| }, | ||
| minWidth: "100px", |
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.
Our tab component is based on Button (it uses tertiary buttons). So this increases the width, of tabs, too.
@steven-hatch Do we want tabs to have min-width 100px? I can see pros/cons
Really the only con is width on mobile screens.
Separate issue
In the screenshots above, you can see the mobile menu button in top-left corner now has wrong width.
@shanbady I'm sorry this came up... Button should not have been used for that in the first place. (Bright side: with your change, probably less likely to be used incorrectly for stuff like this.)
But, could you fix it so we don't regress? Probably that menu button should be a "Snowflake". I would just apply the relevant styles to it. See figma: https://www.figma.com/design/Eux3guSenAFVvNHGi1Y9Wm/MIT-Design-System?node-id=3852-51162&m=dev
The code is in frontends/mit-open/src/page-components/Header/MenuButton.tsx
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.
Should be addressed now @ChristopherChudzicki
| borderWidth: "1px", | ||
| borderColor: "currentcolor", |
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.
Could you remove these? They do nothing with borderStyle: "none".
In <Button /> they do have an effect, but then variant="text" set borderStyle to none, so they aren't relevant for that variant.
ChristopherChudzicki
left a comment
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.
👍 Looks good. I would suggest removing the borderWith and borderColor on the menu button, as noted.


What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/4717
Description (What does it do?)
Sets a min width of 100px for buttons
How can this be tested?
Checkout this branch and ensure all buttons such as the login button have a minimum width of 100px