refactor(styleguide): migrate and redesign buttons
Created by: Tirokk
Authored by alina-beck Merged
🍰 Pullrequest
- Migration of styleguide buttons + improved code and functionality + design changes
- Migration of styleguide spinner (because it is used in the buttons)
- Refactoring of the
CounterIcon(because it was wrapped around a button but I would argue it should be the other way round😉 )
Please start storybook to see them in action!
Motivation
- I got rid of the
secondarybutton because it is never used on the site and would disrupt the design in its current state. I don't think we need the blue color at all. - I changed the design of the default button because with grey text on grey background it looks
disabledwhich can be very confusing. By the way, the vast majority of buttons on the network is set asprimary(filled in green) anyway. - This is part of the reason why I decided to remove the
ghostbuttons as well. They are very rarely used and I think the new design of thedefaultbutton is a good replacement – especially sinceghostbuttons are only ever used in combination withprimaryordangerbuttons. - I introduced new color shades (
primary-lightandprimary-dark, same fordanger), so thehoverandactivestates are now more easily distinguishable. - Buttons can now explicitly be set as
circleshapes which was impossible before.
Issues
- relates #2074
Questions
-
Testing: We should make this decision as a team, but I'm especially interested what @mattwr18 has to say – because you added tests for
CounterIcon: What should be covered in component tests, especially forgenericcomponents? I think it would make sense to test logic, but only if there is any (in case of theCounterIconI added a cap for the counter, so we could make sure that count values below100are displayed at their actual value and counts above as99+) but I don't think it is necessary to test that all the elements are rendered. If that is something we do want to test I would maybe suggest thestorybook snapshotsinstead. What do you think? -
Icon Button Design: Do you think there is a use case for the below button style or should
icon-onlybuttons by default becircles?
ToDo
-
get the design approved 😁 -
replace <ds-button>with<base-button>throughout the project -
use scss variablesinBaseComponents







