Automattic / bugomattic

Bugomattic is a tool that guides bug reporters to the right actions within large, complex organizations
GNU General Public License v2.0
6 stars 0 forks source link

Code Hygiene: Make standardized button components for shared styling #102

Closed dpasque closed 1 year ago

dpasque commented 1 year ago

What Does This PR Add/Change?

As I was told growing up in my American Midwest home: "the buttons that style together, stay together". 😆

Our button styling had gotten away from us a bit! In our design, we have a shared set of a few different button styles. This PR standardizes those into a shared set of components that are then re-used throughout the app! Now the majority of the button code (css included) is all in one place! Yum! 😋

Here's how the styling order goes...

  1. In index.css, we target all button elements in the app, mostly resetting a bunch of settings to their initial styles. This is mostly to mitigate some CSS collisions when deployed internally at a8c. We also set some helpful starting points for all buttons in the site (even ones that aren't "action" buttons), like the font and a basic padding, etc.
  2. In the buttons.module.css, we set the styles for our shared set of component buttons.
  3. Other consuming components can still provide other classes to these button components to override some styles in unique cases. This almost always is just massaging padding -- we make certain buttons bigger or smaller in various places in the app!

What is left out?

Testing Instructions

The unit tests still pass, but that's not too surprising...

Mostly, go through the app and make sure all the buttons still look as they should! I've done a couple passes in this regard, but always appreciate the extra eyes 😄

Issues

Related to #
Closes #74