Post actions: Rename "Copy" to "Duplicate"
Related to https://github.com/Automattic/dotcom-forge/issues/5078.
Proposed changes:
This diff renames the "Copy" post action to "Duplicate." Copy is not great semantically as the action the user really is taking is to duplicate an entry in the WordPress site.
In fact, it's misleading, as there is a notice in Calypso saying that this feature is actually meant to duplicate a page:
So I propose to rename it. For starters, I just renamed the user-facing side, but if we want, I can also refactor the code so it says "duplicate" everywhere instead of "copy."
Other information:
~- [ ] Have you written new tests for your changes, if applicable?~ ~- [ ] Have you checked the E2E test CI results, and verified that your changes do not break them?~
- [x] Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
In any site with the Jetpack plugin installed, verify that the duplicate post/page functionality says "Duplicate" instead of "Copy."
| Before | After |
|---|---|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
-
To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the
enhance/rename-copy-post-duplicatebranch. -
To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack enhance/rename-copy-post-duplicate
Interested in more tips and information?
- In your local development environment, use the
jetpack rsynccommand to sync your changes to a WoA dev blog. - Read more about our development workflow here: PCYsg-eg0-p2
- Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2
Thank you for your PR!
When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
- :white_check_mark: Include a description of your PR changes.
- :white_check_mark: Add a "[Status]" label (In Progress, Needs Team Review, ...).
- :white_check_mark: Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
- :white_check_mark: Add testing instructions.
- :white_check_mark: Specify whether this PR includes any changes to data or privacy.
- :white_check_mark: Add changelog entries to affected projects
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation :robot:
The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.
Follow this PR Review Process:
- Ensure all required checks appearing at the bottom of this PR are passing.
- Choose a review path based on your changes:
-
A. Team Review: add the "[Status] Needs Team Review" label
- For most changes, including minor cross-team impacts.
- Example: Updating a team-specific component or a small change to a shared library.
-
B. Crew Review: add the "[Status] Needs Review" label
- For significant changes to core functionality.
- Example: Major updates to a shared library or complex features.
-
C. Both: Start with Team, then request Crew
- For complex changes or when you need extra confidence.
- Example: Refactor affecting multiple systems.
-
A. Team Review: add the "[Status] Needs Team Review" label
- Get at least one approval before merging.
Still unsure? Reach out in #jetpack-developers for guidance!
Jetpack plugin:
The Jetpack plugin has different release cadences depending on the platform:
- WordPress.com Simple releases happen semi-continuously (PCYsg-Jjm-p2).
- WoA releases happen weekly.
- Releases to self-hosted sites happen monthly. The next release is scheduled for none scheduled (scheduled code freeze on undefined).
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.
I applied the code to my sandbox didn't work
Thanks for testing! Do you mean you didn't see the changes in WP Admin? What exactly "did not work" in your sandbox?
I assume the core fix will rectify that
Core is a different thing; I'm trying to push the changes upstream so that we can remove the Jetpack and Calypso code altogether. But that's probably going to take a while, so I'm working on intermediary changes in the meantime.
Thanks for testing! Do you mean you didn't see the changes in WP Admin? What exactly "did not work" in your sandbox?
I select a simple site go to pages and change the view to classic wp-admin view but I'm still seeing the old copy
I'm still seeing the old copy
This is because this PR only changes the actual interface, i.e. what you see when you move your mouse hover posts in the posts list. It does not update the admin notice displayed at the top of the page. This admin notice is managed on WordPress.com simple, here: fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Snqzva%2Qcyhtvaf%2Spbcl%2Qcbfg%2Spbcl%2Qcbfg.cuc%3Se%3Q26q5rnso%2333-og
Thanks @jeherve, I'll work on a project to orchestrate the changes, including updating docs and heads-upping HEs.
@vykes-mac the reason why it didn't work for you on Simple was that the current deployment is sun but the Jetpack downloader script is applying the changes in the moon directory.
You can try changing it to moon in .config/jetpack-loader.php and try again.
This PR has been marked as stale. This happened because:
- It has been inactive for the past 3 months.
- It hasn’t been labeled `[Pri] BLOCKER`, `[Pri] High`, etc.
If this PR is still useful, please do a [trunk merge or rebase](https://github.com/Automattic/jetpack/blob/trunk/docs/git-workflow.md#keeping-your-branch-up-to-date) and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation.
If the PR is not updated (or at least commented on) in another month, it will be automatically closed.
This PR has been automatically closed as it has not been updated in some time. If you want to resume work on the PR, feel free to restore the branch and reopen the PR.
Curious about the status of this. Should we make time to finish this?
We could @autumnfjeld. This is low-priority stuff for the moment but happy to shepherd this if you think we should!
This PR has been marked as stale. This happened because:
- It has been inactive for the past 3 months.
- It hasn’t been labeled `[Pri] BLOCKER`, `[Pri] High`, etc.
If this PR is still useful, please do a [trunk merge or rebase](https://github.com/Automattic/jetpack/blob/trunk/docs/git-workflow.md#keeping-your-branch-up-to-date) and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation.
If the PR is not updated (or at least commented on) in another month, it will be automatically closed.
Code Coverage Summary
This PR did not change code coverage!
That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷
We could @autumnfjeld. This is low-priority stuff for the moment but happy to shepherd this if you think we should!
Late reply, but agree. Low priority. User can certainly understand "Copy" in this context.