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

Define default module activation (onboarding) #61

Closed
ThierryA opened this issue Dec 22, 2021 · 16 comments · Fixed by #191
Closed

Define default module activation (onboarding) #61

ThierryA opened this issue Dec 22, 2021 · 16 comments · Fixed by #191
Assignees
Labels
Infrastructure Issues for the overall performance plugin infrastructure [Type] Enhancement A suggestion for improvement of an existing feature
Milestone

Comments

@ThierryA
Copy link
Member

Opening this issue to discuss if modules should be activated by default or not, maybe all modules other than the experimental for instance. When someone install the plugin, the expectation is generally that there is some preset for features right away.

If it is justified not to have any modules activated, we should at least guide plugin users to the module activation page, for instance redirecting to settings page upon plugin activation with a notice informing them to activate modules (and/or wp tooltip maybe).

@ThierryA ThierryA added Infrastructure Issues for the overall performance plugin infrastructure Needs Decision labels Dec 22, 2021
@jeffpaul
Copy link
Member

Given that this plugin is intended to improve performance, I would be in favor of having all but the experimental items enabled by default and also with an admin notice and settings link on the plugin install page that directs users to the plugin settings page so that they can disable/enable other things that best fit their needs for their site.

@mitogh
Copy link
Member

mitogh commented Dec 22, 2021

I would be in favor of enabling all the modules by default as long as WP_DEBUG is defined and is set to true usually this is helpful for non-production environments.

Enabling all the modules specifically the ones that might have an impact on the aspect of the site on production by default like changing the enqueued or priorities of assets (JS/CSS) and such might have an impact on the aspect of the site. With that being said I think modules that are BE heavily like changing the default type of image for new uploads can be safely activated as those do not have an impact on the existing behavior of the site. Any module that changes the markup or might modify the aspect of the site should be disabled by default for production environments.

One thing that would be great to integrate is to enable modules during runtime using a query parameter so it can be tested in production without a global impact on the site like: ?performance=module1 would enable that module during that specific request only. Having this behavior can be used to compare before vs after as well in a single page request.

Another thing is even if all the modules are enabled by default some sort of control where the modules can be toggled from within the admin as well.

@tillkruss
Copy link
Member

+1 for activating non-breaking modules by default.

@ecotechie
Copy link

ecotechie commented Dec 22, 2021

I would like to see a test for WP_DEBUG and WP_ENVIRONMENT_TYPE. If debug is not on or environment is production, then none of the modules activate on plugin activation. We don't know who will be installing this plugin and what will break if they do. Making enabling modules easy and understandable is a great option. Aren't all the modules experimental? We don't know what will/won't break on sites other than ours... Otherwise these modules wouldn't be here. I like the query string idea as well!

@eugene-manuilov
Copy link
Contributor

We don't know who will be installing this plugin and what will break if they do. Making enabling modules easy and understandable is a great option. Aren't all the modules experimental? We don't know what will/won't break on sites other than ours... Otherwise these modules wouldn't be here.

I agree with this statement. We can't know who will be using this plugin and what may break if they install it on production and activate it without checking for compatibility. All modules in this plugin are experimental to a certain degree and I think it would be better if we force site owners to manually activate modules that they need so that they will need to evaluate the risk of activating a module themselves.

One thing that would be great to integrate is to enable modules during runtime using a query parameter so it can be tested in production without a global impact on the site like: ?performance=module1 would enable that module during that specific request only. Having this behavior can be used to compare before vs after as well in a single page request.

This is nice, but in some cases "query string activated modules" can affect other pages as well 🤔. For example, if a user activates the object cache module and it flushes or changes cached data, it will affect other pages where that data from the cache is being used.

@ThierryA
Copy link
Member Author

We don't know who will be installing this plugin and what will break if they do. Making enabling modules easy and understandable is a great option. Aren't all the modules experimental? We don't know what will/won't break on sites other than ours... Otherwise these modules wouldn't be here.

I agree with this statement. We can't know who will be using this plugin and what may break if they install it on production and activate it without checking for compatibility. All modules in this plugin are experimental to a certain degree and I think it would be better if we force site owners to manually activate modules that they need so that they will need to evaluate the risk of activating a module themselves.

Some module will be tagged as experimental when we don't have confidence it won't break sites. For all other modules, they will be developed with the goal of being production ready and therefore we should consider making them enabled by default. In theory, all plugins should be installed on a testing environment prior to be rolled out to production, this one is no different in that sense.

@JustinyAhin
Copy link
Member

I am also in favor of enabling by default the modules that are ready for production. Perhaps in this case we should keep an updated list of those modules that will be activated in the plugin's README.

Also, I'm not too much in favor of an immediate redirection to the plugin settings page after activation. We could opt for an approach similar to the WP Reset plugin (https://wordpress.org/plugins/wp-reset) which displays a small tooltip when the plugin is activated (see screenshot). It's less invasive and unexpected.

CleanShot 2022-01-14 at 08 28 48@2x

@mxbclang
Copy link
Contributor

Please vote for this approach with a thumbs-up or thumbs-down emoji. Voting will close on 1 Feb 2022 at 6pm GMT.

Non-experimental modules will be activated by default; experimental modules will not be activated by default.

@mxbclang
Copy link
Contributor

mxbclang commented Feb 1, 2022

Voting is now closed.

Based on 19 thumbs up votes and no thumbs down votes, we'll proceed with this behavior:

Non-experimental modules will be activated by default; experimental modules will not be activated by default.

Removing Needs Decision label and adding Needs Dev label.

@mxbclang mxbclang added Needs Dev Anything that requires development (e.g. a pull request) and removed Needs Decision labels Feb 1, 2022
@kirtangajjar
Copy link
Member

@felixarntz I see this issue has a "Needs Dev" label. I would like to take up this issue if you're fine with it.

cc @eclarke1

@felixarntz
Copy link
Member

@kirtangajjar Awesome! Assigned the issue to you, feel free to ping me on the PR for review as well.

@felixarntz felixarntz added the [Type] Enhancement A suggestion for improvement of an existing feature label Feb 18, 2022
@felixarntz felixarntz added this to the 1.0.0-beta.1 milestone Feb 18, 2022
@felixarntz felixarntz mentioned this issue Feb 18, 2022
5 tasks
@eclarke1 eclarke1 removed the Needs Dev Anything that requires development (e.g. a pull request) label Feb 21, 2022
@felixarntz
Copy link
Member

@kirtangajjar Any update on this one? Since it was assigned to you a week ago, it would be great to have a PR to review, especially since this is blocking the initial plugin release.

If you don't have capacity to do it, no worries at all - just please provide an update here.

@kirtangajjar
Copy link
Member

kirtangajjar commented Feb 26, 2022

Hey @felixarntz, I was mostly busy with other tasks I had this week. I was unaware that this is task was a blocker for the initial plugin release. If I knew about it, I would've prioritised accordingly.

I still managed to create a POC in my local environment in which non-experimental modules get activated by default and it's working for me. I was going to create a PR on it, but I was thinking to create one after I add WP admin UI pointer as described in #61 (comment)

However given the urgency of the issue, I will create a draft PR for it on Monday and share it here so I can get feedback on the work done till now and then add the wp-admin UI pointer.

@felixarntz
Copy link
Member

@kirtangajjar Let's focus only on the default active modules in this issue. While the admin pointer came up here, that is more of a separate topic IMO and we should open a new issue for it. cc @JustinyAhin

@kirtangajjar
Copy link
Member

@felixarntz Please checkout #191. Added you as reviewer too :)

@felixarntz
Copy link
Member

I've opened #193 to implement the suggestion from #61 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Issues for the overall performance plugin infrastructure [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.