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

Admin Page: Hide pro set up button for searchable modules #9096

Merged
merged 4 commits into from
Mar 22, 2018

Conversation

oskosk
Copy link
Contributor

@oskosk oskosk commented Mar 20, 2018

Fixes #8525
Fixes #9113

Changes proposed in this Pull Request:

  • Makes the Set Up show only for paid features related to plugins.

Testing instructions:

  • Go to wp-admin > Jetpack > Settings,
  • Search for the "Widget Visibility" . Expect to see no setup button.

Searchable module active Before

When Akismet is active:
image

When Akismet is deactivated:

image

Note that the ACTIVE label is intended for paid features depending on plugin configuration

Searchable module active After

image

Changelog entry

  • Admin Page: Don't show a Set Up button when searching for modules that are inactive in Jetpack Settings page. The Set Up button is meant for paid features coming from plu
    gins.

@oskosk oskosk added [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Focus] FixTheFlows labels Mar 20, 2018
@oskosk oskosk requested a review from a team as a code owner March 20, 2018 17:07
@oskosk oskosk changed the title Admin Page: Hdie pro set up button for searchable modules Admin Page: Hide pro set up button for searchable modules Mar 20, 2018
@oskosk oskosk self-assigned this Mar 20, 2018
@oskosk oskosk added this to the 6.0 milestone Mar 20, 2018
: 'akismet/akismet.php';
vpData = this.props.getVaultPressData();
let pluginSlug = '';
if ( 'scan' === this.props.proFeature || 'backups' === this.props.proFeature || 'vaultpress' === this.props.proFeature ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this needsrewind here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If rewind does not depend on the plugin, then its pluginSlug should be empty and this feature (rewind) is caught by

if ( 'rewind' === feature ) {

@@ -212,7 +216,7 @@ class ProStatus extends React.Component {
}
}

if ( sitePlan.product_slug ) {
if ( sitePlan.product_slug && pluginSlug ) {
if ( ! hasFree ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this line can be combined with the previous if

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 7def6fd

}

return this.getSetUpButton( feature );
// Show set up or active status only for paid features that depend on a plugin, and only under a pid plan
Copy link
Contributor

Choose a reason for hiding this comment

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

under a pid plan => under a paid plan

@eliorivero eliorivero force-pushed the fix/set-up-button-for-searchable-modules branch from 7e63be7 to c6e37b2 Compare March 20, 2018 19:57
@bsessions85
Copy link

I tested this and it looks good to me!

@rebeccahum
Copy link
Contributor

Tested this on VIP Go and it works.

Copy link
Contributor

@eliorivero eliorivero left a comment

Choose a reason for hiding this comment

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

Let's get this in 🐑

@eliorivero eliorivero added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Mar 21, 2018
@dereksmart
Copy link
Member

Merge conflicts now :(

@oskosk
Copy link
Contributor Author

oskosk commented Mar 22, 2018

@dereksmart I'm on it...

@oskosk oskosk force-pushed the fix/set-up-button-for-searchable-modules branch from 836a1d1 to bee5944 Compare March 22, 2018 14:37
@oskosk oskosk merged commit d34545c into master Mar 22, 2018
@oskosk oskosk deleted the fix/set-up-button-for-searchable-modules branch March 22, 2018 16:22
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Mar 22, 2018
oskosk added a commit that referenced this pull request Mar 23, 2018
dereksmart pushed a commit that referenced this pull request Mar 27, 2018
* Changelog 6.0: create base for changelog.

* Add #8938 to changelog

* Add #8962 to changelog

* Add #8974 to changelog

* Add #8975 to changelog

* Add #8978 to changelog

* Add #8867 to changelog

* Add #8937 to changelog

* Add #8961 to changelog

* Add #8855 to changelog

* Add #8944 to changelog

* Add #8973 to changelog

* Add #8977 to changelog

* Add #8979 to changelog

* Add #8980 to changelog

* Add #8982 to changelog

* Add #8983 to changelog

* Add #8984 to changelog

* Add #8986 to changelog

* Add #9005 to changelog

* Add #9010 to changelog

* Add #9012 to changelog

* Add #9021 to changelog

* Add #9022 to changelog

* Add #9056 to changelog

* Add #9061 to changelog

* Add #9079 to changelog

* Add #9080 to changelog

* Add #9088 to changelog

* Add #9096 to changelog

* Add #9097 to changelog

* Add #9100 to changelog

* Add #9107 to changelog

* Add #8969 to changelog

* Add #8993 to changelog

* Add #9003 to changelog

* Add #9031 to changelog

* Add #8945 to changelog

* Add #9052 to changelog

* Add #9058 to changelog

* Add #9066 to changelog

* Add #9076 to changelog

* Add #9053 to changelog

* Add #9108 to changelog

* Add #9135 to changelog

* Add #9148 to changelog

* Add #9125 to changelog

* Add #9137 to changelog

* Added testing instructions for 6.0.

* Added IS testing instructions, huge props to @tiagonoronha.

* Added #8498 to changelog.

* Added #8954 to changelog.

* Added #8985 to changelog.

* add #9027

* add #9112 to changelog

* add #9136 to changelog

* add #9102 to changelog

* add #9093 to changelog

* add #9062 to changelog

* add #9172 to changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] FixTheFlows [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants