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 Profiler: Update styles for Results Header section #91016

Merged
merged 13 commits into from
May 23, 2024

Conversation

epeicher
Copy link
Contributor

@epeicher epeicher commented May 22, 2024

Related to https://github.com/Automattic/dotcom-forge/issues/7280
Resolves https://github.com/Automattic/dotcom-forge/issues/7384
Resolves https://github.com/Automattic/dotcom-forge/issues/7294
Resolves https://github.com/Automattic/dotcom-forge/issues/7383

Proposed Changes

  • Create the Results Header component with correct styles
  • Connect the buttons for open the report and check another site
  • Add one of the backgrounds
Desktop Mobile
CleanShot 2024-05-22 at 18 57 19@2x CleanShot 2024-05-22 at 19 00 47@2x

Why are these changes being made?

  • To create the new results header section as per design

Testing Instructions

  • Apply this patch and in your local environment navigate to /site-profiler
  • Add a URL and click on Check site
  • Confirm the styles of the results header match Figma in Desktop and Mobile
  • Click on the Access full site report - It’s free
  • Check the report form is opened at the bottom
  • Close the form
  • Click on the Check another site link
  • Check the page navigates to the landing page

Things to be done as part of other tasks:

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)?

@epeicher epeicher added the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label May 22, 2024
@matticbot
Copy link
Contributor

matticbot commented May 22, 2024

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

Sections (~263 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
site-profiler      +1001 B  (+0.9%)     +263 B  (+0.9%)

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

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.

@gavande1
Copy link
Contributor

gavande1 commented May 23, 2024

The visual changes look good to me. Few nitpicks:

The header looks way up to the top bar; we could add some top margin.

CleanShot 2024-05-23 at 11 25 16@2x

The side areas look empty on the large display.

CleanShot 2024-05-23 at 11 26 37@2x

@gcsecsey
Copy link
Contributor

The header looks way up to the top bar; we could add some top margin.

@gavande1 I updated the top spacing, now it looks like this:

Desktop Above breakpoint Mobile
image image CleanShot 2024-05-23 at 12 46 51@2x

The side areas look empty on the large display.

There's not much we can do in that regard, the whole page is designed with container width of 1015px in mind. The footer and other elements on the page also contain big empty areas on the sides if you view them on a wider screen.

@gavande1
Copy link
Contributor

@gavande1 I updated the top spacing, now it looks like this:

That's looking better. What do you think?

There's not much we can do in that regard, the whole page is designed with container width of 1015px in mind. The footer and other elements on the page also contain big empty areas on the sides if you view them on a wider screen.

I understand. Let's stick to the designs and revisit them if necessary.

Copy link
Collaborator

@WBerredo WBerredo left a comment

Choose a reason for hiding this comment

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

Couple of comments below but overall LGTM!

client/site-profiler/components/get-report-form/index.tsx Outdated Show resolved Hide resolved
Comment on lines 127 to 129
{ bad: ! overallScore },
{ good: overallScore }
) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I've used success and alert on translations instead of good and bad, so we might want to unify the names.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a good idea, we already have a Score type here:

export type Scores = 'good' | 'needs-improvement' | 'poor';

What do you think about using that as a common name everywhere?

Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think about using that as a common name everywhere?
I think this is indeed better.

I'll update my usages to use Scores values as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, and I'll update the names here soon

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/header-section-score on your sandbox.

@gcsecsey gcsecsey merged commit 8007270 into trunk May 23, 2024
11 checks passed
@gcsecsey gcsecsey deleted the update/header-section-score branch May 23, 2024 15:40
@github-actions github-actions bot removed the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label May 23, 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.

None yet

5 participants