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

fix(button)!: button attributes refactored #191

Merged
merged 8 commits into from
Aug 15, 2022

Conversation

muratcorlu
Copy link
Contributor

@muratcorlu muratcorlu commented Aug 8, 2022

This is a BREAKING CHANGE

Currently we use boolean attributes for button variants (primary, secondary, success, danger) and types (contained, outline, text). In the beginning we thought this is easier to write but currently I see that this is conflicting with the approach how we use boolean attributes in other components and how we really should use them. Boolean attributes should not rely on other attributes. But now we are technically allowed to write <bl-button primary secondary> and in this case result relies on our CSS specifity. And this type of writing does give the feeling that it's possible.

I think we need to fix this as soon as possible to not make confusion for new comers.

This PR converts boolean variants to a more standart variant attribute with a default primary value again. I picked fill attribute value for button types (we use type in storybook) because probably type attribute will be needed in near future for using a button as a submitter of a form. Since HTML button has type I thought we should not use type for setting button as outline or text. Opinions are very welcome.

@DamlaDemir
Copy link
Contributor

Good job!

@leventozen
Copy link
Member

Good work! However, I believe using button-type is more clear than fill. Because in our design system, we are naming contained, outline and text as button types.

@leventozen
Copy link
Member

leventozen commented Aug 15, 2022

After discuss with @DamlaDemir, we think that type and button-type may confuse people when they need to use them at the same time. We decided to go with kind.

@leventozen leventozen changed the title fix(button): button attributes refactored fix(button)!: button attributes refactored Aug 15, 2022
@buseselvi
Copy link
Contributor

can we fix the buttons on the tab component to secondary text button - icon only variant like before?

@sonarcloud
Copy link

sonarcloud bot commented Aug 15, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@leventozen
Copy link
Member

@buseselvi we fixed it, can you check it again?

@buseselvi
Copy link
Contributor

@leventozen buttons look ok 👌 but this time in the hover state tooltip seems to slide down
image

@leventozen
Copy link
Member

leventozen commented Aug 15, 2022

@leventozen buttons look ok 👌 but this time in the hover state tooltip seems to slide down image

@buseselvi, this changes are not related to this bug, so we created another issue. thank you for your attention 🤖

@leventozen leventozen merged commit f9134fd into next Aug 15, 2022
@leventozen leventozen deleted the button-attributes-refactor branch August 15, 2022 08:32
@github-actions
Copy link

🎉 This PR is included in version 2.0.0-beta.21 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants