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

Design: Dependency installation #3

Open
afragen opened this issue Mar 8, 2022 · 13 comments
Open

Design: Dependency installation #3

afragen opened this issue Mar 8, 2022 · 13 comments

Comments

@afragen
Copy link
Member

afragen commented Mar 8, 2022

How do we want to display and install these plugin dependencies? Each of the PRs has opinions about how this should happen.

  1. Each plugin dependency admin notice has a link to install the plugin.
  • non-standard method of plugin installation
  • No clear way to view additional information about the dependency
  1. A distinct view/tab in the Plugin Install page showing all the plugin dependencies as plugin cards. This gives the advantage of being able to display more Information about the dependency as well as install/activate the plugin from the familiar core method.
  • Having a tab in the Plugin Install page offers an easy method to show all the actual dependencies and their installation/activation status.
@afragen
Copy link
Member Author

afragen commented Mar 8, 2022

Other thoughts?

@afragen
Copy link
Member Author

afragen commented Apr 4, 2022

Pervious design review by @paaljoachim WordPress/wordpress-develop#1724 (comment)

@paaljoachim
Copy link

paaljoachim commented Apr 4, 2022

Walking through the current process.

I am also including my thought process.

I have made a sample plugin that has two plugin dependencies: WooCommerce and Gutenberg.
Local site running Desktop Server.
Alpha version of WordPress 6.0.
Plugins active: Git Updater, WordPress Beta Tester and Plugin Dependencies Tab.

Uploading Sample plugin and clicking Install Now.
See the standard information on installing a plugin.
Screenshot 2022-04-04 at 09 20 49

Should there be a sentence below "Plugin installed successfully" text which mentions that this plugin has dependencies?
As it would be a subtile touch before the user clicks to Activate Plugin.

I click to Activate Plugin.
I see this:
Screenshot 2022-04-04 at 09 23 51

It gives a non intrusive overview. One line telling that that there are dependencies (requirements) I need to deal with to be able to use the Sample plugin.
There is also a very clear message in the Sample plugin description telling me that this plugin requires WooCommerce and Gutenberg.


What happens if I click Activate under the Sample plugin?
Nothing happens. If I want to use the Sample plugin clicking activate does nothing (as it should).
I will need to deal with the dependencies.


Clicking Go to the Dependencies install page link. I initially did not know where it would lead me.
As I initially did not know where the Dependencies install page is located. Going through it I thought about "Go to the Add New Dependencies install page." But as I turned it around in my mind I end up back at the original text: Go to the Dependencies install page

After clicking it the first time and going to Add New Dependencies tab. I thought aha this seems like a good way to handle required plugins. As these are plugins that are needed to be installed for the Sample plugin to work. Having the Dependencies tab in the Add New plugins screen feels right. It creates a good association with what the Add Plugins screen is about.

EDIT 11 April (Updated the screenshot. It now shows Required by: Sample):
Screenshot 2022-04-11 at 16 53 32

My conclusion from looking at the user interface flow is that it integrates tightly with the current WordPress user interface. It is non intrusive, gives the exact information needed and guides the user in how to install the required (dependencies) plugins.

@justlevine
Copy link

The dependencies page imo needs a way to indicate the installed dependants requiring the displayed plugins

@afragen
Copy link
Member Author

afragen commented Apr 9, 2022

@justlevine not sure I understand. The Dependencies tab contains all the dependencies and the plugin card of each dependency tells what plugin requires it. Some of the above images were taken when the filter was not in place.

screenshot-2

@shaunandrews
Copy link

image

I found this single notice confusing for a few reasons:

  • There’s no visual connection or information regarding which plugin has requirements. I can assume from context that it’s the plugin I just installed, but that may not always be the case.
  • There’s no indication of what a dependency is or where the link will take me.
  • This adds additional work for me, the user, who is simply trying to use a new plugin. I expected WordPress to reduce the number of steps needed to allow me to use my newly installed plugin.

My first thought was to clarify the notice and place it near the plugin with the requirements.

image

This feels more informative and helpful, but as its not at the top of the page it might be harder to see. It also could lead to a scenario with multiple notices when there are multiple plugins with missing requirements — I don’t think this scenario will be very common, so I only mention it as an edge-case.

--

Another option that came to mind was to simply list required plugins at the top of the Installed Plugins screen.

image

--

Its also possible that we could avoid the need for notices or extra installation steps by introducing some friction to the beginning flow. For example, perhaps we display a dialog before the flow begins.

image

This dialog would inform the user about the need for additional plugins and enforce installing all requirements, redirecting users to the Installed Plugins screen when complete.

@afragen
Copy link
Member Author

afragen commented May 27, 2022

The idea for a single admin notice was for simplification and not having an admin notice for each dependency, as this would quickly result in admin notice hell. 👿

The notice informs the user that there are plugin dependencies and the link takes the user to the page displaying all the plugin dependencies, what they are dependencies for, and the ability to install and activate them.

The plugins page lists both the dependencies and the requiring plugins in each appropriate plugin row.

Mixing the functions of each page, plugins.php and install-plugin.php, will be challenging. I'm not certain of the benefit, but I'm very open to discussion.

@afragen
Copy link
Member Author

afragen commented May 27, 2022

In order to something like this to happen, the plugins_api() would need to be expanded to return the contents of the Requires Plugins header for each plugin.

@morehawes
Copy link
Contributor

Thanks for the great work on this! I am new to contributing, so apologies if this is not in the proper place or format.

In my testing of this plugin and reading through some of the history, it occurred to me that the UI could be treated akin to how WordPress handles the 'Requires PHP' header (i.e. when the PHP version requirement is not met):

wp-php-requirement

  • No Bulk Select Option
  • "Activate" link disabled ("Cannot activate" in grey text, unclickable link)
  • Useful message and link for user to learn more

In the current implementation, the user can create an error either by Bulk selecting, or clicking the Activate link. This error directs them to the new Dependencies tab on plugin-install.php.

My suggestion would be to eliminate the need for the error message by removing these actions when the dependency is not met:

wp-plugin-requirement

The Dependencies tab is a nice summary, but I think the user could be kept on plugins.php by offering them information about the plugin using a "More Details" modal borrowed from plugin-install.php. This also has the Install Now button:

wp-plugin-info

Advantages

  • Removes actions that could incur error (Bulk checkbox and Activate link).
  • Simple inline message reduces clutter.
  • Keeps user on plugins.php, no need for new Dependencies tab.
  • Inline with similar WP approaches (i.e. 'Requires PHP' header).
  • Simple :)

@afragen
Copy link
Member Author

afragen commented Jun 2, 2022

@morehawes I really like some of the above. What do you think of this?

screenshot_177

@paaljoachim
Copy link

I think that is a very good idea @afragen ! As it strengthens the message that this specific plugin has dependencies and one can quickly also see which plugins it also requires.

@morehawes
Copy link
Contributor

Good additions and subtractions, I like it.

@afragen
Copy link
Member Author

afragen commented Jun 2, 2022

Now in v1.1.0 https://wordpress.org/plugins/wp-plugin-dependencies/

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

No branches or pull requests

5 participants