Codeinwp / wp-maintenance-mode

Adds a splash page to your site that lets visitors know your site is down for maintenance. Full access to the back- & front-end is optional.
https://wordpress.org/plugins/wp-maintenance-mode/
160 stars 81 forks source link

Gutenberg Compatibility [wip] #299

Closed arinaturcu closed 2 years ago

arinaturcu commented 2 years ago

Summary

It makes WP Maintenance compatible with Otter Blocks by changing how maintenance pages are built. A Maintenance Page now uses Gutenberg and templates that use Otter can be imported from the settings page.

Test Instructions

For new users:

For old users:



Those who use versions below WP 5.8 can't use Otter so they can't import any template. The wizard will not appear for them and in the design tab, they can only see the templates and a notice saying they need WP >= 5.8.

Closes https://github.com/Codeinwp/otter-blocks/issues/935.

github-actions[bot] commented 2 years ago

Plugin build for 2ac22df70644724b95949b0d80c68dd3907b9b15 is ready :bellhop_bell:!

HardeepAsrani commented 2 years ago
Screenshot 2022-08-16 at 12 45 58 PM

Few things about the chat box:

Apart from chatbox:

Action required: your Maintenance page has been deleted. Visit settings page to address this issue.

Action required: your Maintenance page is drafted. Visit settings page to address this issue.

function custom_page_on_front( $value ) {
    // Your conditions here.
    return 1 // change with your page id.
}

add_filter( 'pre_option_page_on_front', 'custom_page_on_front' );

Let me know if you have any questions and sorry for the long list!

JohnPixle commented 2 years ago

I went through your feedback Hardeep above and makes sense, I will do a test as well tomorrow and share any UIX insights. Thanks for the update Arina!

JohnPixle commented 2 years ago

@arinaturcu great work so far, things are starting to take shape.

Some input on Hardeep's comments:

GDPR

There's a GDPR option in the backend. If I enable it, I don't see any change in the front. Does it have any functionality in this version, or it's only a relic from the last one?

I think it is a left-over from the existing version, and was related to the contact form. It seems that in order to be GDPR compliant, the user must have access to a privacy page. A link for this page is added in the footer.

Also, in GDPR settings there are text fields where the user defines the consent checkbox text in forms. However this can be done directly on the form block itself. The text is basic, and we can have it as default:

This form collects your name and email so that we can reach you back. Check out our <a href="#">Privacy Policy</a> page to fully understand how we protect and manage your submitted data.

Screenshot 2022-08-17 at 10 57 10

I don't know if we can integrate something like that with Otter forms now, or somehow integrate this logic and functionality into the new version. Open to some brainstorming.

Modal after importing the template

Once you select to import the page, it should show a modal saying they've successfully imported it and then show them a done button and an edit option. Right now, it takes me directly to the Editor, which feels weird as I don't know what the next steps are.

I agree, this part actually already exists in FIgma, more on that below.

UIX Feedback

This is the Figma board. I had linked to a 2 minute video in the original issue, which showed the hover.

Screenshot 2022-08-17 at 11 15 52

This should make better use of space in large screens as well. Let me know if you need more specific details on this or clarifications.

Screenshot 2022-08-17 at 10 40 42

Screenshot 2022-08-17 at 11 45 05

Screenshot 2022-08-17 at 11 21 31

Screenshot 2022-08-17 at 11 58 50


@arinaturcu Let me know if you need any help with the above, happy to clarify any blind spots if any. Sorry for the long scroll.

arinaturcu commented 2 years ago

@JohnPixle Thank you for the input! 🚀

  • [ ] Modules tab @HardeepAsrani Maybe we should remove the "subscribe section" from the modules tab? Also, are we indeed integrating Google Analytics behind the scenes?

The subscribe section is useful for collecting emails stored from the bot. And google analytics still works the same as in the current version.

Also, I think we can remove the GDPR tab since the texts can be added from the blocks as you said and the privacy policy page can be set from WordPress itself.

JohnPixle commented 2 years ago

The subscribe section is useful for collecting emails stored from the bot.

Awesome, makes sense.

Also, I think we can remove the GDPR tab since the texts can be added from the blocks as you said and the privacy policy page can be set from WordPress itself.

Agreed 👍🏻

Thanks for the update @arinaturcu !

HardeepAsrani commented 2 years ago

Also, in GDPR settings there are text fields where the user defines the consent checkbox text in forms. However this can be done directly on the form block itself. The text is basic, and we can have it as default:

That is fine, we can have a Paragraph in Form for that. But what happens with the ChatBot that also collects emails?

Please note that in the new templates layout shows the button on thumbnail hover, so there will be no need for an import button or descriptive text below the area. But regardless of that, I believe there is no need to display that text, since every user will go through the wizard, and they should already have seen that.

I think it should still be there in case someone exit the Wizard and then finds Otter being installed a surprise. Always better to avoid such situations.

What do you think? @JohnPixle @arinaturcu

arinaturcu commented 2 years ago

@JohnPixle @HardeepAsrani Only the new users will have seen the wizard, so that text might be useful for the users that just update to the new version.

Since we will move that button from below the templates to the thumbnail hover, there will be no space left for the text, but maybe we can put it somewhere in the modal after the import, just to inform them that Otter is installed.

HardeepAsrani commented 2 years ago

@arinaturcu That won't work as we need to have their consent before we install any plugin else user might not be happy about it.

irinelenache commented 2 years ago

@arinaturcu Nice work 🚀 Did some testing and here are my findings:

Note: Testing is not complete on my end, i still have to check some more behaviours/contexts

JohnPixle commented 2 years ago

@HardeepAsrani @arinaturcu ok, in this case we can leave the text I suppose, and simply put it above the template thumbnails (and without the button ofc).

Let me know your thoughts

HardeepAsrani commented 2 years ago

Yea, wherever we put it is fine as long as it's visible to the user. Users are never happy about plugins being installed without their knowledge. 😄

JohnPixle commented 2 years ago

@arinaturcu I have finished with the updated forms in the templates, so you should feel free to use the updated code.

Only the templates with the forms have been affected. Links below.

Coming Soon - Modern Maintenance – Modern

A list of all 6 templates is listed here.

Please let me know if you need any clarifications or any help in general! John

arinaturcu commented 2 years ago

Thank you @JohnPixle 🚀

mghenciu commented 2 years ago

I've also tested the Build.

Repro steps:

  1. Create a fresh instance & install the live version WPM
  2. Go to Plugins page and upload the build from here
  3. On the WPM settings page, change some settings and Save them
  4. After saving there should be a Confirmations toast. Close the Toast
  5. Notice the Browser Popup

https://user-images.githubusercontent.com/52494172/185899013-ea1a40bb-bb1e-4f00-8d87-98555d8c7150.mov


image


Make sure to also add the Cursor Mouse when hovering on the Chat bubble, @arinaturcu .


For the user flow where I import a New Template, and the old one is deleted, do you guys think this is the most common flow? @JohnPixle @HardeepAsrani I am thinking maybe marking the old one as Draft and Importing a new template without Deleting the old one, could also be a solution that doesn't remove things users may have.


Style inheritance

What I noticed here is that usually when viewing the Site in Incognito Mode, there look to be some Style differences for font families, between Incognito & the live site. I am not sure if this is some caching issue or else:

https://user-images.githubusercontent.com/52494172/185917223-de89ec0a-fad0-478e-9d60-fbf6f797659c.mov


Compatibility with other Themes

In terms of testing the compatibility with other themes, as the old plugin looks less prone to breaking (in terms of page styling), I think we should establish a list of 5-10 most popular themes, where we make sure the templates import work as expected. For the other themes, that are not so popular, we can maybe create a E2E (smoke) test.

arinaturcu commented 2 years ago

After installing & activating the plugin, shouldn't it initialise the Wizard? Right now, nothing happens after the WPM plugin is activated.

@mghenciu The wizard appears if the user didn't previously install the plugin. So after deleting and installing again the wizard won't appear, only when installing for the first time. If you think the flow should be different let me know.

Style inheritance

What I noticed here is that usually when viewing the Site in Incognito Mode, there look to be some Style differences for font families, between Incognito & the live site. I am not sure if this is some caching issue or else:

Thank you for spotting this! For some reason, the google fonts won't load when the user is logged out. I'm looking into it now.

mghenciu commented 2 years ago

@mghenciu The wizard appears if the user didn't previously install the plugin. So after deleting and installing again the wizard won't appear, only when installing for the first time. If you think the flow should be different let me know.

So in this case, I've created a fresh instance, used the build from above. Should've the Wizard init itself after the plugin is activated? or only when the users go to the Settings page for the first time?

https://user-images.githubusercontent.com/52494172/186127221-80d55b31-c205-49ea-bacd-8a40da68df10.mov

arinaturcu commented 2 years ago

Only when the user goes to the settings for the first time. We can make it appear after the plugin is activated if it would be better. What do you think @HardeepAsrani?

HardeepAsrani commented 2 years ago

@arinaturcu Yea, it should appear on the install. Normally, you can just redirect them to plugin screen open successful activation like this: https://github.com/Codeinwp/otter-blocks/blob/c19e498a670e65119a0b278b4fe8da661799a9a2/inc/plugins/class-dashboard.php#L29 - this the wizard will start.

We also make sure to not redirect them in cases where the plugin is being installed from other ways like WP-CLI or ajax.

arinaturcu commented 2 years ago

@irinelenache You can give it a run again 🚀

irinelenache commented 2 years ago

@arinaturcu The mentioned issues are fixed, thank you 🚀

Here are my other findings:

Issues can be checked here:

 Admin area URL: https://anticipatebears.s2-tastewp.com/wp-admin 
 Username: irinel 
 Password: 6BVmynsSgzg 

⚠️ Note: The testing is still not complete, i mainly tested the migration and the rollback option of the plugin so everything will be for existing users

JohnPixle commented 2 years ago

Thanks for the input @irinelenache 🙌🏻

> If i want to edit an existing template, there won't be any default colors for paragraph or blocks, i have to manually change it to black

Great catch on this one, it's on me. This happened because there was a (forgotten) white text color applied to the elements of the group in which you added the text. So it was white on white. Confusing indeed. The issue was there for both "minimal" type of templates. I fixed that on both.

@arinaturcu Whenever you want, please feel free to update the two "minimal" templates, and use the updated content ffrom these pages:

Minimal Coming Soon Minimal Maintenance

Thank you both!

arinaturcu commented 2 years ago

Great 🚀 Thank you @JohnPixle!

arinaturcu commented 2 years ago

@irinelenache Thank you for finding these 🚀
They should be fixed now.

Also, I can't leave the chat by clicking somewhere on the page, I have to click on the chat circle again.

For this, I think it is expected to work like this, for example, on https://www.pluralsight.com/ it works the same way.

Let me know what you think and feel free to give it another run.

irinelenache commented 2 years ago

@arinaturcu The mentioned issues are fixed now, thank you 🚀

Here are my other findings:

Besides these, everything works fine on my end ✌️

selul commented 2 years ago

@irinelenache for 2 and 3 this is intended; nothing to fix here. you can review the discussion here.

arinaturcu commented 2 years ago

The sharing icons changed their alignment on all templates https://vertis.d.pr/1oiQ2m

@irinelenache This happens only on FSE themes, like Twenty twenty-two, right?

irinelenache commented 2 years ago

@arinaturcu Yes, i was using Twenty twenty-two. I checked and it works fine with Neve

arinaturcu commented 2 years ago

@irinelenache The issues should be fixed now.

  • [x] If i have a template already imported and try to import another one, when i check the editor the Update button looks disabled and gives the impression that the changes should be visible in frontend. In frontend, the page is either blank or without styling. I have to make a small change in editor (like add a character) and hit the Update button in order to make the page work properly in frontend

Now all templates are automatically updated right after importing so there should be no need to press the Update button.

Let me know if you find anything else 🚀

irinelenache commented 2 years ago

@arinaturcu The mentioned issues are fixed now, thank you 🚀

Found a single problem:

You can check it here:

https://wpmm.us4.instawp.xyz/wp-admin
Username: wpmm
Password: hE9FxYii
arinaturcu commented 2 years ago

Thank you @irinelenache! It should be fixed now 🚀

HardeepAsrani commented 2 years ago

@arinaturcu @irinelenache Is it ready for a release then?

Will be nice @arinaturcu if you can just do a quick test to make sure that nothing breaks if one is using this plugin on, let's say WordPress 4.9 or 5.4. The features won't work but just want to make sure it is still compatible with older versions of WordPress.

And if I have a heads up from both of you then we can maybe release. What do you think @selul

arinaturcu commented 2 years ago

@HardeepAsrani The above issue is not fixed yet, Irinel pointed that to me on slack and I am working on it. Then I'll do some tests like you said to make sure thinks don't break.

arinaturcu commented 2 years ago

It's fixed now, I will check the plugin with older versions of WP.

arinaturcu commented 2 years ago

@HardeepAsrani I found only one small thing: when selecting a page as maintenance page, the template was not set automatically on older versions. It's fixed now.

Besides this, everything seems to be working fine.

HardeepAsrani commented 2 years ago

Awesome @arinaturcu, thanks.

pirate-bot commented 2 years ago

:tada: This PR is included in version 2.5.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: