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

Limit Button styles to those defined in the Comet design guidelines #3065

Merged

Conversation

jamesricky
Copy link
Contributor

@jamesricky jamesricky commented Jan 9, 2025

Description

This removes the color prop entirely and only allows our custom values for the variant prop.
The styling of the variants is not yet correct and will be fixed in a separate PR.

Acceptance criteria

Open TODOs/questions

  • Add changeset
  • Shoud this be a V8 thing? We might be able to implement this using the MUI theme then 🤔

Further information

This removes the `color` prop entirely and only allows our custom values for the `variant` prop.
@jamesricky jamesricky requested a review from johnnyomair January 9, 2025 17:18
@jamesricky jamesricky self-assigned this Jan 9, 2025
@jamesricky jamesricky mentioned this pull request Jan 9, 2025
15 tasks
@jamesricky jamesricky requested a review from thomasdax98 January 9, 2025 17:24
Copy link
Collaborator

@johnnyomair johnnyomair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if this is a good idea. Yes, UX might not have considered all possible combinations that are available in MUI, but they may add/need them in the future. "Our" variant prop would then become increasingly complex/bloated.

packages/admin/admin/src/common/buttons/Button.tsx Outdated Show resolved Hide resolved
@jamesricky
Copy link
Contributor Author

I'm unsure if this is a good idea. Yes, UX might not have considered all possible combinations that are available in MUI, but they may add/need them in the future. "Our" variant prop would then become increasingly complex/bloated.

I specifically asked UX about which variants they need as we (me and UX) want to prevent devs from using combinations of MUIs variant and color that are not allowed, according to UX. This list should cover their needs for the foreseeable future.

@johnnyomair
Copy link
Collaborator

I specifically asked UX about which variants they need as we (me and UX) want to prevent devs from using combinations of MUIs variant and color that are not allowed, according to UX.

We don't do this for other components, e.g., Typography. I'm not a fan of removing MUI functionality just because UX hasn't thought about a use case (yet). Our devs should be able to use the MUI docs as a primary source. And IMO we can expect devs to think. They can always use sx if they want to change the background to a color UX doesn't allow. Or would you remove that as well? 😉

But I don't care too much about it. If we find that it wasn't a good idea, we can change it back. 🤷🏼‍♂️

@jamesricky
Copy link
Contributor Author

And IMO we can expect devs to think.

I don't want to think if I don't have to 😅

I see your point, maybe we can discuss this next week, this doesn't have any priority 🙂

@jamesricky jamesricky requested review from johnnyomair and removed request for thomasdax98 January 16, 2025 10:05
@johnnyomair
Copy link
Collaborator

Discussed this internally and decided to go with the single variant prop for now. 🙂

@johnnyomair johnnyomair merged commit ceefaa6 into feature/custom-button Jan 16, 2025
5 checks passed
@johnnyomair johnnyomair deleted the only-allow-using-design-conform-buttons branch January 16, 2025 11:59
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

Successfully merging this pull request may close these issues.

2 participants