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

Bulk Plugin Management: Use list view for small viewports #98551

Merged
merged 4 commits into from
Jan 21, 2025

Conversation

epeicher
Copy link
Contributor

@epeicher epeicher commented Jan 17, 2025

This also removes one property for a type

This is the initial implementation to be updated

Resolves https://github.com/Automattic/dotcom-forge/issues/10216

Proposed Changes

  • Uses the list layout for screens smaller than Desktop view (i.e. 960px)
  • Displays the labels in the list view for the toggle controls

Why are these changes being made?

  • To improve the UI for small viewports

Testing Instructions

  • Apply this changes and navigate to /plugins/manage/sites
  • Select a plugin
  • Reduce the screen and check that the top table displays nicely in small viewports

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

This also removes one property for a type

This is the initial implementation to be updated
@matticbot
Copy link
Contributor

matticbot commented Jan 17, 2025

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

Sections (~84 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
plugins                               +240 B  (+0.0%)      +84 B  (+0.0%)
jetpack-cloud-plugin-management       +240 B  (+0.0%)      +84 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.

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.

@matticbot
Copy link
Contributor

matticbot commented Jan 17, 2025

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

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

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/bulk-plugin-management-list-view on your sandbox.

@@ -115,8 +116,8 @@ const PluginsDashboard = ( {
const productsList = useSelector( ( state ) => getProductsList( state ) );
const { data: dotComPlugins }: { data: Plugin[] | undefined } = useWPCOMPluginsList( 'all' );
const allPlugins = useSelector( ( state ) =>
getPlugins( state, siteIds, 'all' ).map( ( plugin: Plugin ) => {
let dotComPluginData: Plugin | undefined;
getPlugins( state, siteIds, 'all' ).map( ( plugin: PluginComponentProps ) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using PluginComponentProps as a type as it contains the isMarketplaceProduct property and it does not need to be added to the Plugin type below.

.dataviews-view-list {
.dataviews-view-list__media-wrapper {
background-color: transparent;
display: none;
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 can be revisited once the latest version of the @wordpress/dataviews component is deployed as part of #96470 because in the latest version there is a showMedia property: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-dataviews/#properties

@epeicher epeicher marked this pull request as ready for review January 21, 2025 15:55
Copy link
Contributor

@cpapazoglou cpapazoglou left a comment

Choose a reason for hiding this comment

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

Tested it in:

  • Jetpack
  • WP.com plugins manage
  • WP.com single plugin "Manage Sites" popup

Works well!

@epeicher epeicher merged commit 2874b82 into trunk Jan 21, 2025
13 checks passed
@epeicher epeicher deleted the add/bulk-plugin-management-list-view branch January 21, 2025 18:05
JessBoctor pushed a commit that referenced this pull request Jan 22, 2025
* Bulk Plugin Management: Use list view for small viewports

This also removes one property for a type

This is the initial implementation to be updated

* Remove media wrapper in list view

* Use domain as primary field for list view

* Update styles to small viewports
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.

3 participants