Skip to content

Conversation

@mzorz
Copy link
Contributor

@mzorz mzorz commented Jan 18, 2021

This PR builds on top of #13758 and implements the FeatureConfig class.

Related Gutenberg-mobile: PR wordpress-mobile/gutenberg-mobile#3015 and wordpress-mobile/gutenberg-mobile#3001
Related Gutenberg PR: WordPress/gutenberg#28293

To test:

CASE A: flag ON for production

  1. build vanilla with this PR as is
  2. on a jetpack site with version 8.5 and above, create a GB Post
  3. verify the block picker in mobile gutenberg shows the Contact Info block and you can insert and use it in the Post.
  4. switch the site to a self hosted site, or a site using a jetpack version older than 8.5
  5. verify the block picker in mobile gutenberg does NOT show the Contact Info block

CASE B: flag OFF for production

  1. in WordPress/build.gradle edit this line in the vanilla flavor buildConfigField "boolean", "CONTACT_INFO_BLOCK_AVAILABLE", "true" and set it ti false instead
  2. build vanilla
  3. on a jetpack site with version 8.5 and above, create a GB Post
  4. verify the block picker in mobile gutenberg does NOT show the Contact Info block

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.

@mzorz mzorz added Gutenberg Editing and display of Gutenberg blocks. gutenberg-mobile labels Jan 18, 2021
@mzorz mzorz added this to the 16.6 milestone Jan 18, 2021
@mzorz mzorz requested a review from illusaen January 18, 2021 14:46
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jan 18, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jan 18, 2021

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

@JavonDavis
Copy link
Contributor

Hey! Bumping this to 16.7, if you'd like to get it in for this release please merge this into release/16.6 and then DM me to release a new Beta version.

@JavonDavis JavonDavis modified the milestones: 16.6, 16.7 Jan 25, 2021
@jd-alexander jd-alexander self-requested a review January 26, 2021 03:48
public static final String AZTEC_EDITOR_NAME = "aztec";
public static final String WP_STORIES_CREATOR_NAME = "wp_stories_creator";
public static final String WP_STORIES_JETPACK_VERSION = "9.1";
public static final String WP_CONTACT_INFO_JETPACK_VERSION = "8.5";
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @illusaen or @mzorz I have a question about the Jetpack version. I am looking at the release notes above and it specifies that the contact info block works on WP.com site and sites with JetPack 9.1 and above. But this value is 8.5 so I am just checking if this is expected i.e I am checking to see if these versions should be the same or not. Thanks 🙇

Copy link
Contributor Author

@mzorz mzorz Jan 27, 2021

Choose a reason for hiding this comment

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

Good observation @jd-alexander ! My findings tell me the first version of Jetpack shipping with that block was 8.5, so the release notes should be updated accordingly 👍 @illusaen do you want to update it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also another question @mzorz should the block be tested with vanilla debug or vanilla release ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think both should work as long as it's vanilla - I tested vanillaDebug only but it should be the same (the productFlavors work this way)

Copy link
Contributor

@jd-alexander jd-alexander left a comment

Choose a reason for hiding this comment

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

1.When the build config value in the vanilla block was set to true with the Jetpack version at 9.3.1 the Contact Info Block was shown in the inserter.


2. When the build config value in the vanilla block was set to false with Jetpack version 9.3.1 the Contact Info Block was NOT shown.


 
3. When the build config value was true and the Jetpack version was rolled back to 8.4.2 (below 8.5) the Contact Info block was NOT shown.

 


 
LGTM 🚢 I didn't approve this because the gb-mobile PR needs updating and the WPiOS PR needs to be reviewed. Once those are reviewed/updated this PR can be approved and merged in.

@mzorz
Copy link
Contributor Author

mzorz commented Jan 27, 2021

Thanks so much for your review @jd-alexander !! 🙇

@mzorz
Copy link
Contributor Author

mzorz commented Jan 27, 2021

NOTE! Not to be merged before #13808 gets merged as we've added empty body implementations of the new callback interfaces introduced there (see 5a408ed) cc @jd-alexander

@illusaen
Copy link
Contributor

See wordpress-mobile/gutenberg-mobile#3064 for issue coming up with contact info block.

@jd-alexander
Copy link
Contributor

@mzorz @illusaen is this still being shipped into 16.7? Since the Gutenberg counterparts have been merged in, and the contact block is enabled I suppose that is the case, so let me know if this is due another review. Thank you.

@illusaen
Copy link
Contributor

illusaen commented Feb 6, 2021

@jd-alexander I don't think it'll make it in -- got a bug to fix in contact info in general first. It's actually not enabled in production yet still so no huge hurry :)

@mzorz mzorz modified the milestones: 16.7, 16.8 Feb 6, 2021
@mzorz
Copy link
Contributor Author

mzorz commented Feb 6, 2021

is this still being shipped into 16.7?

Bumped the milestone 👍 thanks for the heads up @jd-alexander

@mzorz
Copy link
Contributor Author

mzorz commented Feb 9, 2021

Set the Contact Info block available to non-production builds only in a31c71a as per the reasons explained in this comment by @illusaen

Consequently, also removed the relevant information from RELEASE-NOTES.md in 28f4a20 (see iOS counterpart in wordpress-mobile/WordPress-iOS@6cbd1a1)

@mzorz
Copy link
Contributor Author

mzorz commented Feb 9, 2021

@jd-alexander this is finally ready for another look 😅 - the gutenberg-mobile PR is merged so I updated the reference here. Also worth noting, this is not going into production for now, relevant changes were made as explained in this #13804 (comment). 🙏

@jd-alexander
Copy link
Contributor

@jd-alexander this is finally ready for another look 😅 - the gutenberg-mobile PR is merged so I updated the reference here. Also worth noting, this is not going into production for now, relevant changes were made as explained in this #13804 (comment). 🙏

Understood. Thanks for the ping @mzorz I will take a look soon 👌🏾

Copy link
Contributor

@jd-alexander jd-alexander left a comment

Choose a reason for hiding this comment

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

The code here looks good. I am going to give this another run tomorrow and then we are good to merge.

@mzorz mzorz modified the milestones: 16.8, 16.9 Feb 22, 2021
@mzorz
Copy link
Contributor Author

mzorz commented Feb 22, 2021

@illusaen moving this to draft as per conversation with @JavonDavis , let me know when there's a need to resurface this and we can catch up 👍

@mzorz mzorz marked this pull request as draft February 22, 2021 22:01
@mzorz mzorz removed this from the 16.9 milestone Feb 22, 2021
@mzorz mzorz marked this pull request as ready for review April 8, 2021 12:15
@mzorz mzorz added this to the 17.2 milestone Apr 8, 2021
@mzorz
Copy link
Contributor Author

mzorz commented Apr 8, 2021

This should be ready @illusaen:

  1. tried alphaDebug: Contact Info is present in the block picker and I can add it and use it in a Post ✅
  2. tried vanillaDebug: Contact Info block is not present in the block picker ✅

Also worth noting: we need to change the valuein gutenberg-mobile here from __DEV__ to true once we're fine with getting the Contact Info block no longer behind a feature flag

const supportedJetpackBlocks = {
	'contact-info': {
		available: __DEV__,
	},
	story: {
		available: true,
	},
};

Another thing to note: given the check on WPiOS counterpart here I believe given the flag is behind this check return BuildConfiguration.current ~= [.localDeveloper, .a8cBranchTest], it shouldn’t have the release notes yet, should it? (see the relevant similar Android commit and message here #13804 (comment))

Let me know 👍

@illusaen
Copy link
Contributor

illusaen commented Apr 8, 2021

This should be ready @illusaen:

1. tried `alphaDebug`: Contact Info **is** present in the block picker and I can add it and use it in a Post ✅

2. tried `vanillaDebug`: Contact Info block is **not** present in the block picker ✅

Awesome thanks!!

Also worth noting: we need to change the valuein gutenberg-mobile here from __DEV__ to true once we're fine with getting the Contact Info block no longer behind a feature flag
Yep! That'll be happening after this and the Jetpack PR are merged.

It shouldn’t have the release notes yet, should it?
Nope no release notes should be on there :) I'll be adding them in the DEV flag switch PR after these are merged.

@illusaen illusaen merged commit 70ce7de into develop Apr 8, 2021
@illusaen illusaen deleted the contact-info-api-mario branch April 8, 2021 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gutenberg Editing and display of Gutenberg blocks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants