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

Themes: Drop sites-list usage (take two) #12124

Merged
merged 7 commits into from
Mar 16, 2017

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Mar 14, 2017

This affects only single-site mode, and mostly Jetpack error/warning messages (JP upgrade needed/JP Manage disabled/etc) there.

To test:

  • Single WP.com Site Mode: Check that it still works (Active theme correctly displayed, with correct menu items in '...' menu; Current Theme bar)
  • Single JP Site Mode: Same as above. Additionally, verify that the error messages still work (Action button points to correct wp-admin theme showcase) for
    • JP version outdated (< 3.7)
    • JP Manage disabled
  • Theme Upload: Verifify that for a JP Multisite install, the JP Error Message's Open WP Admin button points correctly to wp-admin.

Deprecates #8776, which was quite outdated.

(We're still passing around a bunch of props rather needlessly or at least inelegantly, but I'll leave those for a future PR.)

@ockham ockham added [Feature Group] Appearance & Themes Features related to the appearance of sites. [Status] In Progress labels Mar 14, 2017
@ockham ockham self-assigned this Mar 14, 2017
@matticbot
Copy link
Contributor

matticbot commented Mar 14, 2017

@ockham ockham mentioned this pull request Mar 14, 2017
3 tasks
@ockham ockham force-pushed the remove/themes-sites-list-dep-take-two branch 2 times, most recently from 6293a3c to c68c43b Compare March 14, 2017 18:26
@ockham ockham force-pushed the remove/themes-sites-list-dep-take-two branch from c68c43b to deefa68 Compare March 14, 2017 21:04
@ockham ockham force-pushed the remove/themes-sites-list-dep-take-two branch 2 times, most recently from 9a8b9bd to 5cd2af4 Compare March 15, 2017 14:58
@ockham ockham force-pushed the remove/themes-sites-list-dep-take-two branch from 5cd2af4 to 8b49f37 Compare March 15, 2017 14:58
@@ -38,7 +38,6 @@ JetpackSite.prototype.updateComputedAttributes = function() {
this.canUpdateFiles = SiteUtils.canUpdateFiles( this );
this.canAutoupdateFiles = SiteUtils.canAutoupdateFiles( this );
this.hasJetpackMenus = versionCompare( this.options.jetpack_version, '3.5-alpha' ) >= 0;
this.hasJetpackThemes = versionCompare( this.options.jetpack_version, '3.7-beta' ) >= 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is obsolete, site.hasJetpackThemes isn't used anywhere anymore. (Try grepping for hasJetpackThemes.)

isJetpack: isJetpackSite( state, selectedSiteId ),
isCustomizable: canCurrentUser( state, selectedSiteId, 'edit_theme_options' ),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is obsolete -- try grepping for isCustomizable .

filter,
vertical
vertical,
wpcomTier
} = props;
const jetpackEnabled = config.isEnabled( 'manage/themes-jetpack' );

if ( ! jetpackEnabled ) {
return (
<JetpackReferrerMessage
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll be able to drop this component altogether once we drop the (now obsolete) manage/themes-jetpack feature flag.

@ockham ockham added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Mar 15, 2017
@folletto
Copy link
Contributor

Tested on Chrome:

  1. Single Site → ••• Menu lists everything — ✅
  2. Single Site → ••• → Activate — ✅
  3. Single Site → ••• → Try — ✅
  4. Single Site → Sheet — ✅
  5. Jetpack Site → ••• Menu lists everything — ✅
  6. Jetpack Site → ••• → Activate — ✅
  7. Jetpack Site → ••• → Try — ✅
  8. Jetpack Site → Sheet — ✅
  9. Current site (both Jetpack and Single Site) — ✅
  10. Theme upload — ✅
  11. All Sites → Theme Sheet — ✅
  12. All Sites → ••• — ✅

I didn't test: mange disabled (how?), outdated version, multi-site install.


Aside: the order of the ••• menu items between Jetpack and .com sites is different, we should fix that in a later PR.

@ockham
Copy link
Contributor Author

ockham commented Mar 16, 2017

I didn't test: mange disabled (how?), outdated version, multi-site install.

Tested those myself. Will merge now.

@ockham ockham merged commit 3730cbf into master Mar 16, 2017
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 16, 2017
@ockham ockham deleted the remove/themes-sites-list-dep-take-two branch March 16, 2017 15:32
@matticbot matticbot added [Size] M Medium sized issue [Size] L Large sized issue [Size] XL Probably needs to be broken down into multiple smaller issues and removed [Size] M Medium sized issue [Size] L Large sized issue [Size] XL Probably needs to be broken down into multiple smaller issues labels Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Appearance & Themes Features related to the appearance of sites. [Size] XL Probably needs to be broken down into multiple smaller issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants