-
Notifications
You must be signed in to change notification settings - Fork 2k
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 business plugins (cleanup of #3079) #3170
Conversation
c321890
to
4dfa2aa
Compare
359e8a7
to
5dfe4c6
Compare
2e5defe
to
6153696
Compare
@Tug - one small piece of feedback - the first commit here could have been smaller, which would have made it easier to grok. Not a big deal, but just something to think about. |
I tried to but all those changes are related and once you decide to remove a feature it isn't easy to group the changes into several commit or you end up with a broken version between each commits. |
These changes look good and work as expected. Its probably a good idea to have @drewblaisdell take a look too, since he knows this code better than me. |
@@ -52,10 +51,6 @@ module.exports = React.createClass( { | |||
return null; | |||
} | |||
|
|||
if ( ! this.props.wporg ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested the code but I don't think this looks right.
A plugin can be a non .org plugin and still be visible in calypso.
The this.props.wporg
indicated if a plugin is found in the .org repo or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, this is used for custom plugins, not for business ones
I haven't tested the code yet but it looks like some assumptions here are wrong. There is a different between a not wporg plugin and a plugin that is found on .com. A non wporg plugins is custom plugin that was build for the jetpack site that is not available for updates from .org. These plugins are often paid plugins for example. We currently don't support plugin updates and autoupdates for such plugins. |
const { isWpCom } = this.props; | ||
let options = []; | ||
let actions = []; | ||
const options = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, I didn't know you can push new elements in an array declared as constant! nice to know!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:) Yeah, the difference between const
and let
is related to assignment, not mutation.
@@ -19,10 +18,6 @@ module.exports = React.createClass( { | |||
return; | |||
} | |||
|
|||
if ( ! this.props.wporg ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a427990
to
5d6186a
Compare
this.props.wporgFetchPluginData( plugin.slug ); | ||
} | ||
return assign( {}, plugin, pluginData ); | ||
let pluginData = WporgPluginsSelectors.getPlugin( this.props.wporgPlugins, plugin.slug ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be a const :)
@lezama Thank you for reviewing, |
3d07c22
to
f918f1c
Compare
Product 👍 Very nice, Tug. Thanks for the detailed instructions! |
Thanks Tug! I think @enejb or @johnHackworth should be the ones giving the final 👍 |
I've been testing it and both code and product-wise looks good good work! |
Great work Tug! |
Thanks, it's always fun removing code ;) |
@@ -207,42 +204,6 @@ PluginUtils = { | |||
} ); | |||
}, | |||
|
|||
addWpcomIcon: function( plugin ) { | |||
if ( plugin.slug && plugin.wpcom ) { | |||
return _assign( {}, plugin, { icon: '/calypso/images/upgrades/plugins/' + plugin.slug + '.png' } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also remove the corresponding images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted!
Great job, that wasn't an easy one! |
8040c4a
to
575f899
Compare
… given by `this.translate`
- Fix deactivating bulk plugins - Prefer const instead of let - Use Object.assign which is available in Babel now - Simplify a render method: print the elements of a dropdown selector directly instead of appendinf them to an array - Remove unused code
575f899
to
cdf53d3
Compare
Remove business plugins (cleanup of #3079)
In the context of removing the eCommerce feature from the Business plan upgrade, the plugins page becomes available to Jetpack sites only. The "Plugins" menu entry is being removed on #3079
This PR removes references to plugins related to the Business plan (eCommerce plugins) and display the "Plugins not supported" page at
/plugins/:site
for all wp.com sites.Testing instructions
git fetch -a && git checkout remove/business-plugins && make run
Test 1 (Wp.com)
/plugins/:site
and check that the "Plugins not supported" page is displayed/plugins/browse/:site
and check that the "Plugins not supported" page is displayed/plugins/akismet/:site
and check that the "Plugins not supported" page is displayed/plugins
and check that only your jetpack sites are counted.Test 2 (Jetpack, test that nothing broke)
Code Review Instructions
Reviewing
cc: @fabianapsimoes @drewblaisdell @scruffian