Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#34439 closed defect (bug) (fixed)

Consider removing the "list of files which will be deleted"

Reported by: afercia's profile afercia Owned by: swissspidy's profile 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:

https://cldup.com/0PNSeW7ni8.png

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)

34439.patch (1.9 KB) - added by afercia 9 years ago.
34439.2.patch (3.9 KB) - added by afercia 9 years ago.
34439.3.patch (4.4 KB) - added by swissspidy 9 years ago.

Download all attachments as: .zip

Change History (32)

@afercia
9 years ago

#1 @afercia
9 years ago

  • Keywords has-patch added

The attached patch removes the "list of files which will be deleted" from the Delete Plugin(s) and Network > Delete Theme(s) screens.

#2 @SergeyBiryukov
9 years ago

Introduced in [8095] and [17101].

#3 @swissspidy
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: @knutsp
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 @afercia
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 @swissspidy
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 @celloexpressions
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 @knutsp
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/

Version 0, edited 9 years ago by knutsp (next)

#10 @afercia
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: @swissspidy
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).

@afercia
9 years ago

#12 in reply to: ↑ 11 @afercia
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: @swissspidy
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 @afercia
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 @dd32
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.

@swissspidy
9 years ago

#16 @swissspidy
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):

https://cldup.com/iudNaSpEw0.png

https://cldup.com/t0T_q6tyAw.png

We can further improve these screens as part of #20578

#17 follow-up: @knutsp
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: @swissspidy
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 @knutsp
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!

#20 follow-up: @afercia
9 years ago

@swissspidy was testing the same thing and it works also with plugins named "01", "02", "03"!! :D

https://cldup.com/hePuSpifsY.png

Should the "Yes, delete these files" be a primary button? cc @helen

#21 in reply to: ↑ 20 @swissspidy
9 years ago

Replying to afercia:

@swissspidy was testing the same thing and it works also with plugins named "01", "02", "03"!! :D

https://cldup.com/hePuSpifsY.png

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: @knutsp
9 years ago

"delete these files?" should be "delete these plugins?", to be consistent.

#24 in reply to: ↑ 23 @swissspidy
9 years ago

Replying to knutsp:

"delete these files?" should be "delete these plugins?", to be consistent.

See #20578 for wording updates.

#25 @afercia
9 years ago

  • Keywords commit added

Tested also on multisite, looks good to me.

#26 @swissspidy
9 years ago

In 35995:

Plugins: Remove the list of files which will be deleted when uninstalling a plugin.

See #34439.

#27 @swissspidy
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 35996:

Network Admin: Remove the list of files which will be deleted when deleting a theme.

Fixes #34439.

#28 @swissspidy
9 years ago

In 35997:

Remove unused variables after [35995] and [35996].

See #34439.

#29 @jeremyfelt
9 years ago

  • Focuses multisite added
Note: See TracTickets for help on using tickets.