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

Design System: Button (and stories) #4418

Closed
2 tasks
mica000 opened this issue Oct 24, 2023 · 14 comments · Fixed by #4820
Closed
2 tasks

Design System: Button (and stories) #4418

mica000 opened this issue Oct 24, 2023 · 14 comments · Fixed by #4820
Assignees
Labels
area:components area:ui UI engineering specific tasks. effort:medium Expected to take 2-5 days of integration work

Comments

@mica000
Copy link

mica000 commented Oct 24, 2023

EDIT: This issue will now be tracking the coordination of all button variants and creating stories for them.

I believe we already build this on the swap but not sure if we need to improve it

This ticket for the button with tokens, used for swaps.
I believe we already build this on the swap but not sure if we need to improve it?

These are the states on designs
Default, Hover, Active, Focused, Disabled
Screenshot 2023-10-24 at 16 21 08

@mica000
Copy link
Author

mica000 commented Oct 24, 2023

@fbwoolf and finally, could you also review this one? I believe it's 90% done?

@mica000 mica000 added the area:ui UI engineering specific tasks. label Oct 26, 2023
@markmhendrickson markmhendrickson added this to the Establish UI library milestone Jan 2, 2024
@fbwoolf fbwoolf self-assigned this Jan 4, 2024
@mica000 mica000 changed the title Design System Instance: Button with tokens Design System: Button with tokens Jan 8, 2024
@fbwoolf
Copy link
Contributor

fbwoolf commented Jan 10, 2024

I don't think the component should be name here with token bc that is too specific, should it be ButtonWithIcon? It could be anything, not just a token icon, correct?

@mica000
Copy link
Author

mica000 commented Jan 10, 2024

True! Maybe avatar? since icon there are instances of an avatar with an icon inside.

@fbwoolf
Copy link
Contributor

fbwoolf commented Jan 10, 2024

When I look at Radix, I feel like Avatar is always associated to a user, is that not how you think about it?
https://www.radix-ui.com/themes/docs/components/avatar

@pete-watters
Copy link
Contributor

token buttons and avatar buttons seem to be the same as ghost but with different child elements.

I would keep the name Avatar for user avatars only and maybe we can just have 3 button variants:

  • solid
  • outline
  • ghost

I don't really understand what token is for, it looks like a DropDownTrigger ?

In any case, the Button doesn't need to know what's inside it. So it could be a ghost that has an icon child / a dropdown trigger

@mica000
Copy link
Author

mica000 commented Jan 11, 2024

I don't really understand what token is for, it looks like a DropDownTrigger ?

Yes, used to trigger the swaps and possibly send in the future.

So it could be a ghost that has an icon child / a dropdown trigger

Good point.. we could do this - however the icon and token/avatar have different sizes. Considering the new icon package has 24px, avatar/token have 32px, the size of the "button with tokens" is slightly bigger, 48px. Hence, fine to use the ghost variant as long as the size adapts to it. The padding all around them should be 8px (this value was also updated recently with the introduction of new icon set - before it was 12px)

@fbwoolf
Copy link
Contributor

fbwoolf commented Jan 11, 2024

Yeah, agree with @pete-watters here, I think there is a way to simplify these button variants. I'll rename this issue to handle coordinating all buttons and will propose a solution in a PR where we can make sure to coordinate with Figma if needed for naming, etc. I'll handle making stories for the buttons so we can evaluate them all once done.

@fbwoolf fbwoolf changed the title Design System: Button with tokens Design System: Button coordination Jan 11, 2024
@fbwoolf fbwoolf changed the title Design System: Button coordination Design System: Button (and stories) Jan 11, 2024
@fbwoolf
Copy link
Contributor

fbwoolf commented Jan 11, 2024

@kyranjamie do you have any thoughts here too as I work on this one to coordinate the buttons with stories?

@kyranjamie
Copy link
Collaborator

kyranjamie commented Jan 11, 2024

I think I share Pete's thoughts. The token/avatar/icon is just a child of the button, not part of the button. So we don't need a specific button component just for this type.

Let's just make sure, and provide some examples in Storybook, of how buttons look with tokens/avatars/icons as children?

// Composing components like this
<Button>
  <Image />
  Text
</Button>
// is better than creating a new one that does everything imo
<ButtonWithIcon />

@mica000 in atomic design speak, the buttons with images in them are molecules composed of atoms (buttons and image) components

@fbwoolf
Copy link
Contributor

fbwoolf commented Jan 11, 2024

Let's just make sure, and provide some examples in Storybook, of how buttons look with tokens/avatars/icons as children?

Yep, agree, thanks.

@mica000
Copy link
Author

mica000 commented Jan 12, 2024

cc @fabric-8

@fabric-8
Copy link
Contributor

fabric-8 commented Jan 15, 2024

Just a small addition: We'd love to try 48px as a default button heught and see how that'll look overall :) The height is already reflected in the design system button component

Also agree that token buttons should really just be a particular ghost button configuration

@fbwoolf
Copy link
Contributor

fbwoolf commented Jan 16, 2024

@mica000 @fabric-8 just a heads up that the links to Figma in this issue description do not lead to the most up-to-date version. I have been working on this w/out knowing there are more updated designs. I'm not sure how to know as a dev when the links become outdated? I should just make sure to see the Ready for dev label and question if I don't see it?

@fabric-8
Copy link
Contributor

fabric-8 commented Jan 16, 2024

@fbwoolf whoops thanks for the hint, updated — Mistake on our end and you should generally not have to worry about that. Just happened as the ticket has been created a while ago while we reiterated on the button component later on without updating things here

@kyranjamie kyranjamie added the effort:medium Expected to take 2-5 days of integration work label Jan 17, 2024
fbwoolf added a commit that referenced this issue Jan 18, 2024
@fbwoolf fbwoolf linked a pull request Jan 18, 2024 that will close this issue
3 tasks
fbwoolf added a commit that referenced this issue Jan 18, 2024
kyranjamie pushed a commit that referenced this issue Jan 22, 2024
## [6.24.0](v6.23.0...v6.24.0) (2024-01-22)

### Features

* use radix tooltip ([aa8a530](aa8a530))

### Bug Fixes

* fee estimation error, ref [#4821](#4821) ([9b75521](9b75521))
* home action btns hover state ([c270868](c270868))
* send inscription form fee flow ([ee9728d](ee9728d))
* tooltip logic ([2ae8cf0](2ae8cf0))

### Internal

* audit colours, update token package, brown becomes ink ([c82c612](c82c612))
* button and link, ref [#4418](#4418) and [#4523](#4523) ([7d75f4a](7d75f4a))
* fix icon padding, ref [#4693](#4693) ([fbd8c11](fbd8c11))
* fix validate custom network name field on form submission, closes [#4737](#4737) ([63e6a94](63e6a94))
* post-release merge back ([0930968](0930968))
* update network tests ([ab1fb5b](ab1fb5b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:components area:ui UI engineering specific tasks. effort:medium Expected to take 2-5 days of integration work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants