Skip to content

Update plugin meta details. #103364

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

Merged
merged 13 commits into from
May 16, 2025
Merged

Update plugin meta details. #103364

merged 13 commits into from
May 16, 2025

Conversation

StevenDufresne
Copy link
Contributor

@StevenDufresne StevenDufresne commented May 13, 2025

Part of #100453

Figma: Qtuh9uDXchizLRdGio68gk-fi-1_2046

Proposed Changes

This PR updates the Plugin Meta details to match the designs.

Changes:

  • Delete <PluginRatings/>
    • Move logic into a util function
    • Round ratings for integers
    • Apply ratings to <PluginsBrowserListElement>.
  • Re-orders columns.
  • Updates 'Ratings' to 'Rating'.
  • Changes 'Last Updated' date format.

TODO:

  • The designs include a copy update from "Active installations" to "Installations".
    • That is very specific terminology from wp.org that I want confirmation on before making the change.
    • Comment: Qtuh9uDXchizLRdGio68gk-fi-1_2354#1252967774
    • We agreed not to do it.

Screenshots

Context Before After
Has Ratings Screenshot 2025-05-13 at 9 27 28 AM Screenshot 2025-05-13 at 9 25 33 AM
No Ratings Screenshot 2025-05-13 at 9 27 24 AM Screenshot 2025-05-13 at 9 25 26 AM
Ratings (Premium) Screenshot 2025-05-13 at 10 14 45 AM Screenshot 2025-05-13 at 10 13 49 AM

Why are these changes being made?

We are no longer displaying star ratings.

Considerations

This PR removes a lot of functionality from <PluginRatings />. I've searched the code base and found no other use of this component anywhere, and most of the features were not being used.

If this isn't the right way to process, I can revert.

Testing Instructions

Plugin with reviews
On a free site, find a plugin with no reviews. Expect it to look like the screenshot above.

Plugin with no reviews
On a free site, find a plugin with no reviews. Expect it to look like the screenshot 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 UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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 May 13, 2025

@matticbot
Copy link
Contributor

matticbot commented May 13, 2025

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

Sections (~436 bytes removed 📉 [gzipped])

name                             parsed_size           gzip_size
plugins                              -1828 B  (-0.1%)     -427 B  (-0.1%)
jetpack-cloud-plugin-management      -1828 B  (-0.1%)     -427 B  (-0.1%)
a8c-for-agencies-plugins             -1828 B  (-0.1%)     -427 B  (-0.1%)
marketplace                           +143 B  (+0.0%)      +56 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 (~65 bytes added 📈 [gzipped])

name                          parsed_size           gzip_size
async-load-design-playground       +159 B  (+0.0%)      +65 B  (+0.0%)
async-load-design                  +159 B  (+0.0%)      +65 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.

@StevenDufresne StevenDufresne marked this pull request as ready for review May 13, 2025 01:02
@StevenDufresne StevenDufresne requested review from fditrapani and a team May 13, 2025 01:02
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 13, 2025
@taipeicoder
Copy link
Contributor

For /plugins/woocommerce-xero I'm seeing:

Screenshot 2025-05-13 at 1 56 17 PM

With a link to https://wordpress.org/support/plugin/woocommerce-xero/reviews which is a 404 page.

@StevenDufresne
Copy link
Contributor Author

@taipeicoder Thanks for catching that. I'll do more thorough testing.

@fditrapani
Copy link
Contributor

Thanks for working on this Steve. This is mostly looking good. Justing echoing/pointing out that in this case:

image

We only need one link to add a review.

I don't think it's related to this PR but something I else I noticed while navigating back and forth is that the column widths are changing as content is loaded in which is causing the layout to shift.

Screen.Recording.2025-05-13.at.10.44.35.AM.mov

@StevenDufresne
Copy link
Contributor Author

StevenDufresne commented May 14, 2025

We only need one link to add a review.

Yep, didn't realize we had two review flows. Shortsighted on my part. 🙇‍♂️

Copy link
Contributor

@taipeicoder taipeicoder left a comment

Choose a reason for hiding this comment

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

Left minor feedback, overall it looks good 👍

@StevenDufresne
Copy link
Contributor Author

@fditrapani I want to call out that I'm not displaying the decimals for integers, so for example: 3/5 and not 3.0/5.

To me, that seems more natural, however, it does take it out of sync with the card which displays the rating as 3.0.

Card Listing
Screenshot 2025-05-14 at 2 52 25 PM Screenshot 2025-05-14 at 2 52 37 PM

Thoughts?

@fditrapani
Copy link
Contributor

Yep, didn't realize we had two review flows. Shortsighted on my part.

No worries!

I want to call out that I'm not displaying the decimals for integers, so for example: 3/5 and not 3.0/5.
To me, that seems more natural, however, it does take it out of sync with the card which displays the rating as 3.0.

I think that's a good call too. Any chance we can sync up the other view so that we don't have 2 different treatments?

@StevenDufresne StevenDufresne force-pushed the fix/fix-plugin-ratings-section branch from 02921f7 to 4b78af2 Compare May 14, 2025 23:11
@matticbot
Copy link
Contributor

matticbot commented May 14, 2025

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

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

  • notifications

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/fix-plugin-ratings-section on your sandbox.

@StevenDufresne
Copy link
Contributor Author

@fditrapani I've updated the cards to match. Can you check that and advise as to whether this is ready to merge. Thanks.

Copy link
Contributor

@fditrapani fditrapani left a comment

Choose a reason for hiding this comment

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

Nice! thanks for the updates. Looking good 😎

@@ -42,9 +42,10 @@ const PluginDetailsHeader = ( {
} );

// Rating can be a valid number, 0 or null, discard undefined for easier comparison
const rating = isMarketplaceProduct
? ( reviewsStats?.ratings_average * 100 ) / 5 ?? 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This, reviewsStats?.ratings_average will return NaN for marketplace ratings as reviewsStats hasn't been resolved yet. This results in a brief flash of null in the view.

@StevenDufresne StevenDufresne merged commit a14fbfe into trunk May 16, 2025
14 checks passed
@StevenDufresne StevenDufresne deleted the fix/fix-plugin-ratings-section branch May 16, 2025 01:09
@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 May 16, 2025
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.

5 participants