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

Remove the Gutenberg dialog on new sites #11385

Merged
merged 5 commits into from
Mar 2, 2020

Conversation

maxme
Copy link
Contributor

@maxme maxme commented Feb 26, 2020

Remove the Gutenberg dialog that was showning after creating a new site.
Also change the default for freshly added self hosted sites.

Test 1:

  • Create a new site.
  • Create a new post, make sure the block editor is showing and there is no dialog about it.

Test 2:

  • Create a new user.
  • Create a new site.
  • Create a new post, make sure the block editor is showing and there is no dialog about it.

Test 3:

  • Add a self hosted site.
  • Create a new post, make sure the block editor is showing and there is no dialog about it.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 26, 2020

You can test the changes on this Pull Request by downloading the APK here.

@maxme maxme added this to the 14.4 milestone Feb 26, 2020
@cameronvoell
Copy link
Contributor

Test 1:

  • Create a new site.
  • Create a new post, make sure the block editor is showing and there is no dialog about it.

In this case, for both new and and existing users, I am still seeing the dialog. The code enabling it is here:

// Mark the site to show the GB popup at first editor run
SiteModel newSiteModel = mSiteStore.getSiteByLocalId(newSiteLocalID);
if (newSiteModel != null) {
AppPrefs.setShowGutenbergInfoPopupForTheNewPosts(newSiteModel.getUrl(), true);
}

Test 2:

  • Create a new user.
  • Create a new site.
  • Create a new post, make sure the block editor is showing and there is no dialog about it.

In this case I am also still seeing the dialog. It seems to get enabled here:

AppPrefs.setShowGutenbergInfoPopupForTheNewPosts(site.getUrl(), true);

Test 3:

  • Add a self hosted site.
  • Create a new post, make sure the block editor is showing and there is no dialog about it.

In this specific case I am not seeing the dialog. However, the first time I click on editing an existing post, the dialog does show. This is caused by code on this line.

@cameronvoell
Copy link
Contributor

I think this change was made after it was pointed out,

"We display the message: “Block editor enabled: You are using the new editor…” to a brand new user. They don’t need to know we have another editor, that message can be removed now for new users. "

What is unclear for me is what are the cases for non-new users that we still want to show the dialog?

Copy link
Contributor

@cameronvoell cameronvoell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the suggestions in my comment for why the test cases seem to still be showing the Gutenberg Enabled popup.

@maxme
Copy link
Contributor Author

maxme commented Feb 28, 2020

What is unclear for me is what are the cases for non-new users that we still want to show the dialog?

We should show the dialog only to users that we're migrating to the block editor.

@maxme
Copy link
Contributor Author

maxme commented Feb 28, 2020

Test 2:

  • Create a new user.
  • Create a new site.
  • Create a new post, make sure the block editor is showing and there is no dialog about it.

In this case I am also still seeing the dialog. It seems to get enabled here:

I can't reproduce that one, but it might happen due to the delay on that call after creating the site:

dispatcher.dispatch(SiteActionBuilder.newDesignateMobileEditorAction(

@maxme
Copy link
Contributor Author

maxme commented Feb 28, 2020

I fixed case 1 and 3 in 4ff75c3

In 4f01138 - I also updated the enable/disable functions to update the site model locally, I'm not sure why it wasn't done originally.

Copy link
Contributor

@cameronvoell cameronvoell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, and test cases all working now. 🎉

@maxme maxme merged commit 031e045 into develop Mar 2, 2020
@maxme maxme deleted the issue/remove-gutenberg-dialog-on-new-sites branch March 2, 2020 08:39
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

Successfully merging this pull request may close these issues.

2 participants