Make WordPress Core

Opened 2 months ago

Closed 7 weeks ago

Last modified 7 weeks ago

#60465 closed defect (bug) (fixed)

Plugin dependency info notice improvements

Reported by: desrosj's profile desrosj Owned by: costdev's profile costdev
Milestone: 6.5 Priority: normal
Severity: normal Version:
Component: Plugins Keywords: has-patch commit
Focuses: Cc:

Description

Follow up to #22316/[57545].

When dependencies are missing for an installed plugin, an admin notice is displayed to the user on the Plugins page:

There are additional plugin dependencies that must be installed.

I'd like to propose two modifications.

First, this notice is a .notice-info. Missing dependencies is arguably a situation where the site is potentially broken and needs to be addressed by the site owner. This should have a higher emphasis. I suggest using .notice-warning instead.

Second, we can't assume that an average user understands what a "dependency" is in the context of software. Even if we believe this to be true, it is an assumption that has not been validated.

The sentence also reads awkwardly for me. Here are a few other suggestions:

  • Some required plugins are missing.
  • Some plugin requirements are not being met.
  • Plugins required by some inactive plugins are missing.
  • Some plugins required by other, already installed plugins are missing.
  • Dependencies for installed plugins are missing. (if we must)

Also, the notice is missing direction. It's not clear how or where to fix the problem. But I don't yet have a good suggestion for what that should be.

Change History (18)

This ticket was mentioned in PR #6070 on WordPress/wordpress-develop by @costdev.


2 months ago
#1

  • Keywords has-patch added

This PR changes the messaging for the notice displayed when there are missing dependencies.

In addition to removing the word "dependencies", which may not be understood by the average user, a link to the plugins page with some direction has been added, and the notice is now a .notice-warning rather than the previous .notice-info.

### Plugins > Installed plugins

#### Before
https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/79332690/47ee0554-eca8-4d84-af26-701230680805

#### After
https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/79332690/137a6875-3090-4907-b290-1302e0f373ad

### Plugins > Add New

#### Before
https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/79332690/970fd253-f9b0-4b77-add3-7301c82c53fd

#### After
https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/79332690/dc6ae35f-825e-4312-b3bd-46a4309169b9

#2 @costdev
2 months ago

@desrosj I've submitted PR 6070 with screenshots included in the PR description.

It includes an initial attempt at providing some direction as an illustration, to invite feedback and improvement on this too.

@afragen commented on PR #6070:


2 months ago
#3

How about "Some required plugins are missing. Please review your plugins for those that cannot be activated." With link as appropriate.

@costdev commented on PR #6070:


2 months ago
#4

@afragen Ah I see, to reduce the repetition of the word "plugins". @joedolson what do you think?

#5 @costdev
2 months ago

  • Owner set to costdev
  • Status changed from new to assigned

@desrosj commented on PR #6070:


2 months ago
#6

@joedolson Another a11y question. Should this notice have a "Warning:" prefix? Or is the notice on it's own without a prefix OK?

@swissspidy commented on PR #6070:


8 weeks ago
#7

@costdev note the merge conflict now

@costdev commented on PR #6070:


8 weeks ago
#8

@desrosj @afragen @swissspidy I've updated the top notice so that:

  1. It says "required plugins that are missing or inactive" for consistency.
  2. Doesn't say "for plugins that cannot be activated", as the issue may (and likely will) actually be plugins that were already active when their dependencies were deleted or deactivated through some other means.

When users click the link to plugins.php, they'll see a notice in a problematic dependent's row. See the PR's description for updated screenshots. I think this works better by accounting for the dependent's current status.

Thoughts? 🙂

#9 @swissspidy
7 weeks ago

  • Keywords commit added

Tentatively marking for commit, though still awaiting feedback from @desrosj

@euthelup commented on PR #6070:


7 weeks ago
#10

Hi all,

I want to bring up the point that the plugin card might get too crowded with this notice(that's just my opinion).

If we take into consideration an update notice (and who knows what else people bring extra in that card) it would look like this
https://github.com/WordPress/wordpress-develop/assets/1893980/9c1e2f0d-64d4-47bf-99f2-5d5633d08655

Personally, I share @desrosj thoughts from track#60465 I'm not sure if that notice adds much value and it might not be needed. A contextual help tab proposed in track#60466 could add more info than that notice.

I would argue that a plugin required by another is self-explanatory, it is clear that you cannot deactivate the main plugin as long as the dependency is active.

Maybe a little bit of visual focus might help.
https://github.com/WordPress/wordpress-develop/assets/1893980/43e84e22-9c59-4855-b1d7-88b5595267a6

Congrats for the work on this feature, I can't wait for it to land in production.

@desrosj commented on PR #6070:


7 weeks ago
#11

Thanks for working on this, all! I added a few comments that I wouldn't necessarily consider blockers. This is a good refinement and a step in the right direction for 6.5.

@desrosj commented on PR #6070:


7 weeks ago
#12

I want to bring up the point that the plugin card might get too crowded with this notice(that's just my opinion).

I do agree that if a plugin has several dependencies, it will quickly crowd the plugin card view. But, since it will take a bit of time for plugins to fully embrace this, I think that we can circle back to this in a future iteration.

@costdev commented on PR #6070:


7 weeks ago
#13

@desrosj Are we good to go for commit with this one?

@desrosj commented on PR #6070:


7 weeks ago
#14

I made similar changes here to the ones in response to my comment on the other PR.

I don't know that it's useful or helpful to link to the network admin URL if the user does not have the ability to access that page.

Also, the Manage Plugins link will no longer display when looking at the actual plugins page. The user is already on that page, there's no need to link them.

I think this is good to go, but would love a sanity check from someone else first.

#15 @desrosj
7 weeks ago

  • Component changed from Upgrade/Install to Plugins

#16 @desrosj
7 weeks ago

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

In 57769:

Plugins: Improve plugin dependency admin notices.

This makes several refinements to the various notices displayed in the WordPress admin related to plugin dependencies. Additionally, it adds some conditions to display more appropriate messages for multisite installs with proper context to the user’s capabilities.

Props costdev, joedolson, afragen, swissspidy, peterwilsoncc, euthelup.
Fixes #60465.

#18 @desrosj
7 weeks ago

In 57770:

Plugins: Improve plugin dependency related error messages.

This makes several refinements to the various error messages displayed throughout the WordPress admin related to plugin dependencies. Additionally, it adds some conditions to display more appropriate messages for multisite installs with proper context to the user’s capabilities.

Props costdev, swissspidy, afragen, huzaifaalmesbah, knutsp.
Fixes #60465.

Note: See TracTickets for help on using tickets.