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: Improve button style consistency #243

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Jun 12, 2024

Relates to #214 (comment).

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

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

  • Have you checked for TypeScript, React or other console errors?

Footnotes

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

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.
@dcalhoun dcalhoun self-assigned this Jun 12, 2024
@dcalhoun dcalhoun added the [Type] Bug Something isn't working label Jun 12, 2024
@dcalhoun
Copy link
Member Author

dcalhoun commented Jun 12, 2024

👋🏻 @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
Copy link
Contributor

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. 👍

The default button size is too large and dominating for the context of
inline code within AI assistant responses.
@dcalhoun dcalhoun marked this pull request as ready for review June 13, 2024 13:21
@dcalhoun dcalhoun requested review from a team June 13, 2024 13:22
Copy link
Contributor

@fluiddot fluiddot left a comment

Choose a reason for hiding this comment

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

LGTM 🎊 !

@dcalhoun dcalhoun merged commit 755fa5d into trunk Jun 13, 2024
13 of 14 checks passed
@dcalhoun dcalhoun deleted the fix/improve-button-style-consistency branch June 13, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants