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

Site Management Panel: Update primary styling on buttons #94192

Merged
merged 10 commits into from
Sep 5, 2024

Conversation

DustyReagan
Copy link
Member

@DustyReagan DustyReagan commented Sep 4, 2024

Related to https://github.com/Automattic/dotcom-forge/issues/8783

Proposed Changes

  • This PR removes the "primary" button styling from the buttons in the Site Management flyout panels.
Before After
Screenshot 2024-09-04 at 10 15 23 AM Screenshot 2024-09-04 at 10 15 05 AM
Before After
Screenshot 2024-09-04 at 10 15 34 AM Screenshot 2024-09-04 at 10 15 44 AM
Before After
Screenshot 2024-09-04 at 10 16 04 AM Screenshot 2024-09-04 at 10 15 55 AM
Before After
Screenshot 2024-09-04 at 10 37 39 AM Screenshot 2024-09-04 at 10 37 28 AM
Before After
Screenshot 2024-09-04 at 10 16 19 AM Screenshot 2024-09-04 at 10 16 29 AM
Before After
Screenshot 2024-09-04 at 10 45 40 AM Screenshot 2024-09-04 at 10 46 07 AM

Why are these changes being made?

  • Decrease competition for the user's attention with too many call-to-action styled buttons.

Testing Instructions

  • Use Calypso Live
  • Go to /sites and check all of Site Management tabs for "primary" buttons. They should be "regular" buttons, like in the screenshots above.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@matticbot
Copy link
Contributor

matticbot commented Sep 4, 2024

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~18 bytes added 📈 [gzipped])

name                parsed_size           gzip_size
sites-dashboard          +152 B  (+0.0%)      +52 B  (+0.0%)
hosting-features         +152 B  (+0.0%)      +52 B  (+0.0%)
github-deployments       +152 B  (+0.0%)      +52 B  (+0.0%)
site-monitoring          +141 B  (+0.0%)      +46 B  (+0.0%)
site-logs                +130 B  (+0.0%)      +40 B  (+0.0%)
hosting                   +93 B  (+0.0%)      +37 B  (+0.0%)
staging-site              +67 B  (+0.0%)      +30 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~10 bytes added 📈 [gzipped])

name                                       parsed_size           gzip_size
async-load-calypso-layout-command-palette        +15 B  (+0.0%)      +10 B  (+0.0%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@DustyReagan DustyReagan marked this pull request as ready for review September 4, 2024 16:55
@DustyReagan DustyReagan requested a review from a team September 4, 2024 16:57
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 4, 2024
@DustyReagan DustyReagan self-assigned this Sep 4, 2024
@DustyReagan DustyReagan changed the title Remove primary styling from buttons Site Management Panel: Remove primary styling from buttons Sep 4, 2024
@allilevine
Copy link
Member

This could be a personal preference, but I think the toggles or "segmented controls" look better with a background. It's hard to tell what's selected at a glance.

Screen Shot 2024-09-04 at 4 26 01 PM Screen Shot 2024-09-04 at 4 25 55 PM

The pagination is highlighted with a background:

Screen Shot 2024-09-04 at 4 26 40 PM

I found another primary button on a staging site > Staging site tab, should that be a non-primary button too?

Screen Shot 2024-09-04 at 4 27 09 PM

@DustyReagan
Copy link
Member Author

Thanks, @allilevine! From this conversation p1725482783281379-slack-C03NLNTPZ2T I've updated the background color of the page numbers and the toggles and updated the "Switch to production site" button.
Screenshot 2024-09-04 at 4 59 54 PM
Screenshot 2024-09-04 at 4 59 49 PM

@davemart-in
Copy link
Contributor

Some feedback:

The add site button should probably have a secondary button style:

CleanShot 2024-09-05 at 07 15 50@2x

I think it's right to have the WP Admin button the primary button on the Overview page:

CleanShot 2024-09-05 at 07 20 40@2x

But in subsequent tabs, I could see us making it the secondary button and allowing the primary button to be used elsewhere. Here are a few examples:

1)Hosting features tab for simple sites:

CleanShot 2024-09-05 at 07 22 50@2x

  1. Deployments:

CleanShot 2024-09-05 at 07 24 19@2x

  1. Logs:

CleanShot 2024-09-05 at 07 25 09@2x

  1. Staging site:

CleanShot 2024-09-05 at 07 25 52@2x

  1. The server settings tab is a tough one. Realistically, these should all be on their own separate page, but I think we explored that option and decided not to go that route.

This almost looks like a text field instead of a button:

CleanShot 2024-09-05 at 07 27 43@2x

Can we change the button copy on this to be just "Restore". That should make this feel more like a button.

Then I might just make the Open PHPMyAdmin button the primary button.

@DustyReagan DustyReagan force-pushed the update/site-management-buttons-style branch from f6c2cf8 to c69629e Compare September 5, 2024 14:39
@DustyReagan DustyReagan force-pushed the update/site-management-buttons-style branch from 7a2c1d9 to 167f6c4 Compare September 5, 2024 17:50
@DustyReagan DustyReagan changed the title Site Management Panel: Remove primary styling from buttons Site Management Panel: Update primary styling on buttons Sep 5, 2024
@DustyReagan
Copy link
Member Author

Thanks, @davemart-in! I've updated the PR with your feedback. It's ready for another look.

Copy link
Contributor

@davemart-in davemart-in left a comment

Choose a reason for hiding this comment

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

Thanks for working through all of this! These changes are a good more in the right direction.

@DustyReagan DustyReagan merged commit ea1e9af into trunk Sep 5, 2024
12 checks passed
@DustyReagan DustyReagan deleted the update/site-management-buttons-style branch September 5, 2024 20:07
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants