Automattic / studio

Studio by WordPress.com, a free desktop app that helps developers streamline their local WordPress development workflow.
https://developer.wordpress.com/studio/
GNU General Public License v2.0
138 stars 12 forks source link

fix: Improve button style consistency #243

Closed dcalhoun closed 1 week ago

dcalhoun commented 2 weeks ago

Relates to https://github.com/Automattic/studio/pull/214#discussion_r1635129557.

Proposed Changes

Introduce a new outlined button variant.

Overloading the in-use tertiary button variant styles resulted in unexpected and inconsistent styles in the UI --- e.g., the "Add site" dialog. Introducing a new outlined variant achieves the original goal of a new button style that is now used in both the sidebar and AI assistant code blocks.

Testing Instructions

Expected outline button styles display

  1. Verify the sidebar's "Add site" button renders correct styles.
  2. Navigate to the "Assistant" tab.
  3. Send a "Show me some code" message.
  4. Verify the "Copy" and "Run"[^1] buttons render correct styles.
Before After
before-inline-code after-inline-code

[^1]: The "Run" button is currently commented in the source code and thus hidden.

Expected tertiary button styles display

  1. Click "Add site."
  2. Verify the "Cancel" button renders correct styles.
Before After
before-add-site after-add-site

Pre-merge Checklist

dcalhoun commented 2 weeks ago

👋🏻 @matt-west. The changes I propose do not include the reduced button padding captured in the design proposal as I was uncertain if we intended to apply that to the "Add site" button as well.

My thought is that the current padding used for all existing buttons looks fine for the inline code buttons (see images in the PR description). If you disagree, we could introduce additional one-off button style modifications for the padding of the inline code buttons. WDYT?

matt-west commented 1 week ago

Thanks for implementing this change @dcalhoun.

I think the code buttons need the reduced padding, they're a bit too dominating at the moment. We should keep the existing padding for the Add site button though. Applying one-off modifications to the code buttons makes sense to me. 👍