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

Performance Profiler: Add link to recommendations on CWW section #94439

Merged
merged 15 commits into from
Sep 13, 2024

Conversation

WBerredo
Copy link
Collaborator

Fixes Performance Profiler: add link to jump to recommendations

Proposed Changes

Add a link to the recommendations section on the CWW section.
The link should redirect to the section with using the current metric as filter.

CleanShot 2024-09-11 at 14 27 38

PS: If there are no recommendations for a given metric, this section shouldn't be shown.

Why are these changes being made?

Performance Profiler: add link to jump to recommendations

Testing Instructions

  • Go to speed-test-tool?url=https%3A%2F%2Fwordpress.com%2F&hash=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NzQ2N30.LOelpUBxFDxMytpSYeB3EBNdBnHeYTvonyZ6zE7aqSM
  • On the CWW section check if there is a button with View recommendations
  • Click on this button
  • Check if you the page scroll to the recommendations section with the selected metric on the filter.
  • Check if the section is not shown for some metrics
    • It shouldn't be shown where are no recommendations for a given metric.

@matticbot
Copy link
Contributor

matticbot commented Sep 11, 2024

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

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

  • blaze-dashboard
  • notifications
  • odyssey-stats
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/performance-profiler-cww-rec-link on your sandbox.

@matticbot
Copy link
Contributor

matticbot commented Sep 11, 2024

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

App Entrypoints (~2 bytes removed 📉 [gzipped])

name                 parsed_size           gzip_size
entry-subscriptions        +14 B  (+0.0%)       -2 B  (-0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~313 bytes added 📈 [gzipped])

name                                parsed_size           gzip_size
site-performance                         +962 B  (+0.1%)     +239 B  (+0.1%)
performance-profiler                     +962 B  (+0.3%)     +239 B  (+0.2%)
write-flow                                +14 B  (+0.0%)       +5 B  (+0.0%)
videopress-flow                           +14 B  (+0.0%)       +5 B  (+0.0%)
themes                                    +14 B  (+0.0%)       +5 B  (+0.0%)
subscribers                               +14 B  (+0.0%)       +5 B  (+0.0%)
stats                                     +14 B  (+0.0%)       +5 B  (+0.0%)
staging-site                              +14 B  (+0.0%)       +5 B  (+0.0%)
sites-dashboard                           +14 B  (+0.0%)       +5 B  (+0.0%)
site-purchases                            +14 B  (+0.0%)       +5 B  (+0.0%)
site-profiler                             +14 B  (+0.0%)       +5 B  (+0.0%)
site-monitoring                           +14 B  (+0.0%)       +5 B  (+0.0%)
site-logs                                 +14 B  (+0.0%)       +5 B  (+0.0%)
settings-writing                          +14 B  (+0.0%)       +8 B  (+0.0%)
settings-security                         +14 B  (+0.0%)       +5 B  (+0.0%)
settings-performance                      +14 B  (+0.0%)       +5 B  (+0.0%)
settings-jetpack                          +14 B  (+0.0%)       +5 B  (+0.0%)
settings-discussion                       +14 B  (+0.0%)       +5 B  (+0.0%)
settings                                  +14 B  (+0.0%)       +5 B  (+0.0%)
security                                  +14 B  (+0.0%)       +6 B  (+0.0%)
scan                                      +14 B  (+0.0%)       +5 B  (+0.0%)
reader                                    +14 B  (+0.0%)       +5 B  (+0.0%)
purchases                                 +14 B  (+0.0%)       +5 B  (+0.0%)
promote-post-i2                           +14 B  (+0.0%)       +5 B  (+0.0%)
posts-custom                              +14 B  (+0.0%)       +5 B  (+0.0%)
posts                                     +14 B  (+0.0%)       +5 B  (+0.0%)
plugins                                   +14 B  (+0.0%)       +5 B  (+0.0%)
plans                                     +14 B  (+0.0%)       +5 B  (+0.0%)
people                                    +14 B  (+0.0%)       +5 B  (+0.0%)
patterns                                  +14 B  (+0.0%)       +1 B  (+0.0%)
pages                                     +14 B  (+0.0%)       +5 B  (+0.0%)
notification-settings                     +14 B  (+0.0%)       +5 B  (+0.0%)
media                                     +14 B  (+0.0%)       +5 B  (+0.0%)
marketing                                 +14 B  (+0.0%)       +5 B  (+0.0%)
link-in-bio-tld-flow                      +14 B  (+0.0%)       +5 B  (+0.0%)
jetpack-connect                           +14 B  (+0.0%)       +5 B  (+0.0%)
jetpack-cloud-pricing                     +14 B  (+0.0%)       +5 B  (+0.0%)
jetpack-cloud-plugin-management           +14 B  (+0.0%)       +5 B  (+0.0%)
jetpack-cloud-partner-portal              +14 B  (+0.0%)       +4 B  (+0.0%)
jetpack-cloud-features-comparison         +14 B  (+0.0%)       +5 B  (+0.0%)
jetpack-cloud-agency-sites-v2             +14 B  (+0.0%)       +5 B  (+0.0%)
import-hosted-site-flow                   +14 B  (+0.0%)       +4 B  (+0.0%)
import                                    +14 B  (+0.0%)       +6 B  (+0.0%)
hosting-features                          +14 B  (+0.0%)       +5 B  (+0.0%)
hosting                                   +14 B  (+0.0%)       +5 B  (+0.0%)
home                                      +14 B  (+0.0%)       +5 B  (+0.0%)
google-my-business                        +14 B  (+0.0%)       +5 B  (+0.0%)
github-deployments                        +14 B  (+0.0%)       +5 B  (+0.0%)
earn                                      +14 B  (+0.0%)       +5 B  (+0.0%)
domains                                   +14 B  (+0.0%)       +5 B  (+0.0%)
comments                                  +14 B  (+0.0%)       +5 B  (+0.0%)
checkout                                  +14 B  (+0.0%)       +5 B  (+0.0%)
build-flow                                +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-team                     +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-sites                    +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-settings                 +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-referrals                +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-purchases                +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-plugins                  +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-partner-directory        +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-overview                 +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-migrations               +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-marketplace              +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-landing                  +14 B  (+0.0%)       +5 B  (+0.0%)
a8c-for-agencies-client                   +14 B  (+0.0%)       +5 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-store-app-store-stats                           +14 B  (+0.0%)       +5 B  (+0.0%)
async-load-design-playground                               +14 B  (+0.0%)       +5 B  (+0.0%)
async-load-design-blocks                                   +14 B  (+0.0%)       +5 B  (+0.0%)
async-load-design                                          +14 B  (+0.0%)       +5 B  (+0.0%)
async-load-calypso-post-editor-media-modal                 +14 B  (+0.0%)       +5 B  (+0.0%)
async-load-calypso-post-editor-editor-media-modal          +14 B  (+0.0%)       +5 B  (+0.0%)
async-load-calypso-components-web-preview-component        +14 B  (+0.0%)       +5 B  (+0.0%)
async-load-calypso-components-jetpack-portal-nav           +14 B  (+0.0%)       +5 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.

@gcsecsey
Copy link
Contributor

gcsecsey commented Sep 12, 2024

I added a small change in 04f9994 to fix the hover styles for the dropdown items:

Before After
CleanShot 2024-09-12 at 12 07 42@2x CleanShot 2024-09-12 at 12 19 07@2x

Copy link
Contributor

@gcsecsey gcsecsey left a comment

Choose a reason for hiding this comment

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

Changes LGTM and work great :shipit:

@gavande1
Copy link
Contributor

gavande1 commented Sep 13, 2024

The changes look good to me. However, there is a minor concern.

There is a noticeable white space between the explanation and the suggestions for improvement. While I understand why it is there, we could get rid of it by increasing the length of the text. What do you think?

CleanShot 2024-09-13 at 11 52 28@2x

@gcsecsey
Copy link
Contributor

The changes look good to me. However, there is a minor concern.

There is a noticeable white space between the explanation and the suggestions for improvement. While I understand why it is there, we could get rid of it by increasing the length of the text. What do you think?

CleanShot 2024-09-13 at 11 52 28@2x

Agreed. I made some minor tweaks in 6bcdd06 to match the designs better:

Figma Calypso
CleanShot 2024-09-13 at 11 01 39@2x image

Copy link
Contributor

@gavande1 gavande1 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@WBerredo
Copy link
Collaborator Author

WBerredo commented Sep 13, 2024

The idea was to minimize the changes in the height of the CWW container when switching tabs, if we are ok with this, its ok to remove the calculation for a fixed number of lines as per 6bcdd06.

@WBerredo WBerredo merged commit 9e9c9d6 into trunk Sep 13, 2024
11 checks passed
@WBerredo WBerredo deleted the add/performance-profiler-cww-rec-link branch September 13, 2024 16:44
@a8ci18n
Copy link

a8ci18n commented Sep 13, 2024

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/16716981

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @WBerredo for including a screenshot in the description! This is really helpful for our translators.

1 similar comment
@a8ci18n
Copy link

a8ci18n commented Sep 15, 2024

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/16716981

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @WBerredo for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Oct 6, 2024

Translation for this Pull Request has now been finished.

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.

6 participants