#34439 closed defect (bug) (fixed)
Consider removing the "list of files which will be deleted"
Reported by: | afercia | Owned by: | swissspidy |
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Plugins | Keywords: | has-patch has-screenshots commit |
Focuses: | ui, multisite | Cc: |
Description
When removing a Plugin (or a Theme from the Network), there's a link to toggle the list of all the files which will be deleted:
For accessibility, this link should be a button (maybe styled like a link) and should use an aria-expanded
attribute to give screen reader users some feedback about what it does.
By the way, wondering if it would be better to remove this feature entirely. Is it really useful for 80% of the users? As a user, I wouldn't really be interested in looking at a list of files and probably I wouldn't even know what they are and what they do :)
Removing it and having a cleaner UI seems to best option to me, unless I'm missing something. Any thoughts more than welcome.
Attachments (3)
Change History (32)
#3
@
9 years ago
+1 for removing it. I have used that link maybe twice in 10 years.
Is there a hook in place so others could add back that functionality if needed?
#4
follow-up:
↓ 6
@
9 years ago
When bundling several (small) plugins into the same folder, the delete plugin action deletes them all. For some users this may be unexpected, but there is no sane way for WP to determine which file belongs to which plugin.
So I think it's a useful file list in some cases.
Or, maybe, detect if there are several "primary" plugin (header) files, then warn with a list of those plugins instead of all files.
#5
@
9 years ago
This needs a UI decision :) Personally, I'm for removing it. Also:
Design for the Majority
https://make.wordpress.org/core/handbook/about/philosophies/#design-for-the-majority
Clean, Lean, and Mean
https://make.wordpress.org/core/handbook/about/philosophies/#clean-lean-and-mean
The rule of thumb is that the core should provide features that 80% or more of end users will actually appreciate and use.
#6
in reply to:
↑ 4
@
9 years ago
When bundling several (small) plugins into the same folder, the delete plugin action deletes them all. For some users this may be unexpected, but there is no sane way for WP to determine which file belongs to which plugin.
It's worth noting that this practice is not really recommended and such a bundle is not allowed in the plugin repository. Definitely an edge case I don't really think we need to handle.
This ticket was mentioned in Slack in #design by afercia. View the logs.
9 years ago
#8
@
9 years ago
I think it makes sense to remove this, as most users will only be confused by it.
However, we should evaluate which situations allow plugin deletion. For example, maybe only plugins available on .org should be deletable via the admin (or otherwise, prevent explicitly private plugins from being deleted) to avoid even running into a case where site-specific type plugins could accidentally be deleted, and checking the file list could help to confirm that nothing is accidentally deleted.
#9
@
9 years ago
Don't forget there are a lot of private plugins out there. Developers following recommendations has been pulling functionality snippets out of the (child) theme's functions.php
and into small plugins. Some has chosen to put them into a single folder, knowing that trying to delete one warns you that other files will be deleted, too.
Accidentially deleting a small, no longer needed plugin, that for some reason has been "bundeled" into the folder of another, important one, with the somewhat surprising side effect that the important one also gets deleted, may break things. While maybe not recommended, it has been de facto supported for about 10 years to make bundles of private plugins. In some cases they also share a library.
Suggestion: If there are several detectable plugins in the same folder, only delete the plugin main file (not the entire folder).
When the last plugin of such non-recommended bundle is deleted then the folder will be removed as usual. Should also work when bach deleting.
If this check is implemented then I think it's ok to remove the list of files.
And: WordPress does not remove legacy functionality just because it probably isn't useful for 80% of the users. This rule applies mainly to development of new features.
As @nacin wrote: Smarter algorithms, smarter defaults https://nacin.com/2015/05/24/smart-algorithms-defaults/
#10
@
9 years ago
I wouldn't be opposed to keeping the list of files for the Plugins :) What about the list for the Network Themes?
#11
follow-up:
↓ 12
@
9 years ago
- Owner set to swissspidy
- Status changed from new to assigned
Showing the list of plugins to be deleted and the list of files are two different things.
Suggestion: If there are several detectable plugins in the same folder, only delete the plugin main file (not the entire folder).
When the last plugin of such non-recommended bundle is deleted then the folder will be removed as usual. Should also work when batch deleting.
I think that should be worked on in a separate ticket.
Let's focus on getting rid of the 'Click to view the list of files which will be deleted' toggle and having better buttons (primary / secondary).
#12
in reply to:
↑ 11
@
9 years ago
- Focuses javascript added
Replying to swissspidy:
Showing the list of plugins to be deleted and the list of files are two different things.
Totally agree, @knutsp do feel free to open new tickets for separate issues.
Refreshed patch, second pass. Keeps the lists and adds some ARIA stuff. Was thinking to take this opportunity to try to introduce a generic method to have reusable, accessible, toggles. Tried to make it as more generic and reusable as possible. About the button-link
styling, there's some ongoing discussion if it should provide also the link colors and underline, see comment 12 on ticket 31476. Any thoughts more than welcome.
#13
follow-up:
↓ 14
@
9 years ago
@afercia Why not just remove this list altogether as you initially suggested? :-)
From my previous comment:
Let's focus on getting rid of the 'Click to view the list of files which will be deleted' toggle and having better buttons (primary / secondary).
#14
in reply to:
↑ 13
@
9 years ago
Replying to swissspidy:
@afercia Why not just remove this list altogether as you initially suggested? :-)
Because I'm not a dictator :) The decision should be made by the community, also asked some UI feedback but no reply so far.
and having better buttons (primary / secondary).
Agreed, there's a primary action in these screens but no primary button. Should probably go in a separate ticket though.
#15
@
9 years ago
I agree with removing this list of files.
The list of files was included for the case where multiple plugins are bundled within one directory.
Here's my alternate suggestion:
- Remove the list of files, it's useless.
- If multiple plugins are detected within the directory, display "This will remove Plugin A, Plugin B, Plugin C" as a paragraph without a expand/shrink.
#16
@
9 years ago
- Focuses accessibility javascript removed
- Keywords has-screenshots added
- Milestone changed from Awaiting Review to 4.5
34439.3.patch is a new patch that removes the file list.
Here's how it looks like (nothing spectacular):
We can further improve these screens as part of #20578
#17
follow-up:
↓ 18
@
9 years ago
I like this approach very much. It respects that a folder might contain several plugins.
As for suggested the ability to delete just one (bundeled) plugin at a time, this would have to be a separate enhancement ticket. But I'm no longer sure that is needed, since we should perhaps not give any priority to enhancements to not recommended practices.
#18
in reply to:
↑ 17
;
follow-up:
↓ 19
@
9 years ago
Replying to knutsp:
I like this approach very much. It respects that a folder might contain several plugins.
I did not change anything in that regard :-) I just removed the link in the bottom.
#19
in reply to:
↑ 18
@
9 years ago
Replying to swissspidy:
Replying to knutsp:
I like this approach very much. It respects that a folder might contain several plugins.
I did not change anything in that regard :-) I just removed the link in the bottom.
I misinterpreted the intention in this ticket. I thought it would mean just deleting the folder without identifying (all) the plugins inside. This is good. Move on!
#21
in reply to:
↑ 20
@
9 years ago
Replying to afercia:
@swissspidy was testing the same thing and it works also with plugins named "01", "02", "03"!! :D
Again, that's how it has worked for years :)
Should the "Yes, delete these files" be a primary button? cc @helen
Yes, it should. See #20578 for UI updates here, where I also created a patch to make it a primary button.
This ticket was mentioned in Slack in #core by afercia. View the logs.
9 years ago
#23
follow-up:
↓ 24
@
9 years ago
"delete these files?" should be "delete these plugins?", to be consistent.
The attached patch removes the "list of files which will be deleted" from the Delete Plugin(s) and Network > Delete Theme(s) screens.