Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Sites Dashboard: Hide actions on a deleted site #96606

Open okmttdhr opened 21 hours ago

okmttdhr commented 21 hours ago

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

Proposed Changes

This PR hides actions except "Restore" on a deleted site.

before

https://github.com/user-attachments/assets/3f7686d0-b6ea-4e9f-8bd5-f593779a5b59

after

https://github.com/user-attachments/assets/35f8bf5a-ba7d-467f-b9fb-27456b7ae2e8

I retained the loading spinner in the status column, as loading status in actions doesn’t seem to be natively supported. This might be worth revisiting in a follow-up. CC: @youknowriad (in case you have insight)

Why are these changes being made?

https://github.com/Automattic/dotcom-forge/issues/9903

Testing Instructions

Pre-merge Checklist

github-actions[bot] commented 21 hours ago
Calypso Live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125247
Jetpack Cloud live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125247&env=jetpack
Automattic for Agencies live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125247&env=a8c-for-agencies
matticbot commented 21 hours ago

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

Sections (~2 bytes removed 📉 [gzipped])

``` name parsed_size gzip_size staging-site +236 B (+0.0%) -2 B (-0.0%) sites-dashboard +236 B (+0.0%) -2 B (-0.0%) site-tools +236 B (+0.0%) -2 B (-0.0%) site-settings +236 B (+0.0%) -2 B (-0.0%) site-performance +236 B (+0.0%) -2 B (-0.0%) site-monitoring +236 B (+0.0%) -2 B (-0.0%) site-marketing +236 B (+0.0%) -2 B (-0.0%) site-logs +236 B (+0.0%) -2 B (-0.0%) hosting-features +236 B (+0.0%) -2 B (-0.0%) hosting +236 B (+0.0%) -2 B (-0.0%) github-deployments +236 B (+0.0%) -2 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 commented 20 hours ago

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

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

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/hide-actions-on-deleted-site on your sandbox.