wpsharks / comment-mail

A WordPress plugin enabling email subscriptions for comments.
http://comment-mail.com
GNU General Public License v3.0
8 stars 3 forks source link

Improve Comment Mail Lite → Comment Mail Pro upgrade workflow #325

Closed raamdev closed 7 years ago

raamdev commented 7 years ago

This is a follow-up to https://github.com/websharks/comment-mail/issues/270, where the workflow for upgrading from Comment Mail Lite to Comment Mail Pro was improved. There are a few final tweaks necessary:

Notice how when I install Comment Mail Pro when Comment Mail Lite is active, Comment Mail Lite gets deactivated as expected and I see a message indicating the Comment Mail Pro has been activated, however there is no "Settings" link for Comment Mail Pro visible and Comment Mail does not appear in the sidebar of the Dashboard, despite having just been activated.

2016-12-13_14-55-12

What we need is a Dashboard message that says something like "Thank you for upgrading to Comment Mail Pro! Please refresh to complete the upgrade." That way the user refreshes to see Comment Mail Pro fully loaded.

jaswrks commented 7 years ago

Estimate set to 2.

Other comments on this...

The proper workflow should be to uninstall Comment Mail Lite and then install Comment Mail Pro. The main goal in this issue, as I see it, is to deal with the case of a user not following that workflow (maybe that's typical, but I haven't seen evidence of that), and in such a case, the loading sequence of plugins and the normal WordPress flow of events must be altered so that both can exist at the same time without raising conflicts.

This leads to unnecessary challenges in code, given the way WordPress is designed to work. Among those challenges, comes the need to redirect the installation request, which is what would fix this problem. However, with every non-standard thing that we do with respect to a typical WP plugin activation, we add another thing to maintain, and another possibility of failure; e.g., as WordPress core is updated, if we are trying to do things in a non-standard way, it's going to become a problem at some point down the line. Automatically deactivating one plugin when another is installed is something quite unexpected in the world of WordPress.

So I see this as being a red flag, and as a potential maintenance nightmare, because it is trying to alter what really should be on the user to get right. Deactivate Comment Mail Lite first, then activate Comment Mail Pro.

For that reason, maybe a better approach, would be for Comment Mail Lite to refuse to activate until Comment Mail Pro has been deactivated, and for Comment Mail Pro to refuse to activate until Comment Mail Lite has been deactivated. This logic is much easier to deal with via notices in the Dashboard, and this way the user is forced to follow a sane workflow.

My quote on what I consider to a better approach is 0.25, as it would only require disabling the current method and instead adding the lite/pro counterpart to the list of true conflicts.

raamdev commented 7 years ago

For that reason, maybe a better approach, would be for Comment Mail Lite to refuse to activate until Comment Mail Pro has been deactivated, and for Comment Mail Pro to refuse to activate until Comment Mail Lite has been deactivated. This logic is much easier to deal with via notices in the Dashboard, and this way the user is forced to follow a sane workflow.

My quote on what I consider to a better approach is 0.25, as it would only require disabling the current method and instead adding the lite/pro counterpart to the list of true conflicts.

I like that logic best. Refuse to activate + Dashboard notice explaining why. I'll change the estimate on this to 0.25. Thanks!

raamdev commented 7 years ago

Next Release Changelog: