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

Remove bulk actions for templates #35997

Closed
wants to merge 1 commit into from

Conversation

jameskoster
Copy link
Contributor

Part of #35994.

If we go ahead and list all templates in Appearance > Templates, the bulk actions may get confusing since some templates can be deleted, others can be reset, and so on.

Since most sites won't have large amounts of templates, and bulk editing templates is an infrequent exercise anyway, it may be simplest to disable bulk editing altogether for now.

This PR removes the bulk actions dropdown, and the checkboxes in the templates table.

Before

Screenshot 2021-10-27 at 12 50 08

After

Screenshot 2021-10-27 at 12 49 57

@carolinan
Copy link
Contributor

Deleting templates in bulk is still important for testing and theme development,

@jameskoster
Copy link
Contributor Author

Understood, but it probably shouldn't be possible to delete the actual theme files from this view, right? That seems like something that should only be done by interacting with the files directly.

@carolinan
Copy link
Contributor

No, the theme files were never available in this view.

@jameskoster
Copy link
Contributor Author

I think they should be :) #35994

Copy link
Contributor

@carolinan carolinan left a comment

Choose a reason for hiding this comment

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

I have tested the pull request and did not see any issues.
Then I will approve this, but shouldn't the same be done for template parts?

@carolinan
Copy link
Contributor

carolinan commented Nov 5, 2021

Sorry I was too fast there, the tests still needs to pass.

@jameskoster
Copy link
Contributor Author

Thanks for the approval.

Just before we merge, I wanted to offer up an illustration of how bulk trashing could be handled once we display theme files here. I share this in the interest of working out whether the trade-off of losing bulk actions for custom templates is definitely the correct one.

In the video below, the Search template is the only user-generated template, and consequently the only one that can be deleted. So when I select-all and delete, all the others remain. We could potentially offer a link to documentation explaining why this occurs.

trash.mp4

Would this be better than removing bulk actions altogether?

@ndiego
Copy link
Member

ndiego commented Nov 15, 2021

Thanks for your work on this @jameskoster. What about the 404 template in your video that has been edited by a user? Previously, if you deleted a user modified template, it would revert back to the template provided by the theme, which was very useful. Should we allow that user-modified 404 template to be deleted as well for the same functionality, or maybe a "Delete/Clear Customizations" option?

@jameskoster
Copy link
Contributor Author

@ndiego this is currently possible whilst editing the template:

But yes, I think it would be useful to enable this on the templates list view as well.

@ndiego
Copy link
Member

ndiego commented Nov 15, 2021

But yes, I think it would be useful to enable this on the templates list view as well.

Yeah, in the future it might be nice. Especially if a user wanted to revert a bunch of templates all at once, i.e. if there is a theme update and they want to make use of the latest template changes.

@jameskoster
Copy link
Contributor Author

Closing this since we're no longer using the wp-admin list view for templates.

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.

Update Appearance > Templates to list all templates
3 participants