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

Untangle: Enable user data fields & color scheme selector #35271

Closed
wants to merge 14 commits into from

Conversation

lupus2k
Copy link
Contributor

@lupus2k lupus2k commented Jan 26, 2024

Follow-up: #35235

Proposed changes:

Removes all wpcom related data from Profile and make the Admin Color Schema work when enable it by using this PR: https://github.com/Automattic/wpcomsh/pull/1669

Before After
image image
image image

Jetpack product discussion

paYJgx-4uN-p2#comment-4524

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Apply this wpcomsh PR (follow the instructions): https://github.com/Automattic/wpcomsh/pull/1669
  • Set your Admin interface style to Classic (wp-admin) in wordpress.com/hosting-config/site_slug
  • Go to wp-admin
  • Users > Profile should link to wp-admin profile page
  • Color Scheme should show different Schemes, and you can switch them.
  • Try reloading after changing the Scheme.
  • User data (Name, About yourself) is editable.
  • Try editing it, saving and reloading.
  • Color and user data should not affect Calypso/wpcom.

@lupus2k lupus2k changed the title Update/untangle my profile to profile test Untangle: Remove wpcom related data from profile Jan 26, 2024
Copy link
Contributor

github-actions bot commented Jan 26, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the update/untangle-my-profile-to-profile-test branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack update/untangle-my-profile-to-profile-test
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions bot added [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] In Progress labels Jan 26, 2024
Copy link
Contributor

github-actions bot commented Jan 26, 2024

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team Review" label and ask someone from your team review the code. Once reviewed, it can then be merged.
If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen daily.
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly. The next release is scheduled for March 5, 2024 (scheduled code freeze on March 4, 2024).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Debug Helper plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Backup plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Boost plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Search plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Social plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Starter Plugin plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Protect plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Videopress plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Super Cache plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Migration plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Mu Wpcom plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Inspect plugin:

  • Next scheduled release: March 5, 2024.
  • Scheduled code freeze: February 26, 2024.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@lupus2k lupus2k changed the base branch from trunk to update/jetpack-stats-to-calypso January 26, 2024 19:20
@lupus2k lupus2k changed the base branch from update/jetpack-stats-to-calypso to update/untangle-my-profile-to-profile January 26, 2024 19:21
@lupus2k lupus2k self-assigned this Jan 27, 2024
@lupus2k lupus2k requested review from a team January 27, 2024 04:42
@lupus2k lupus2k marked this pull request as ready for review January 27, 2024 04:42
@lupus2k lupus2k changed the title Untangle: Remove wpcom related data from profile Untangle: Enable User data edit and Color Schemes. Jan 27, 2024
@lupus2k lupus2k changed the title Untangle: Enable User data edit and Color Schemes. Untangle: Enable user data fields & color scheme selector Jan 27, 2024
Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

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

After exploring the codebase a bit more, I think the whole logic is self-contained in this file:

projects/plugins/jetpack/modules/masterbar/profile-edit/bootstrap.php

What if, we just don't include that file when the classic style is enabled? So the change is simply:

diff --git a/projects/plugins/jetpack/modules/masterbar.php b/projects/plugins/jetpack/modules/masterbar.php
index aacde02a96..e61fa14b49 100644
--- a/projects/plugins/jetpack/modules/masterbar.php
+++ b/projects/plugins/jetpack/modules/masterbar.php
@@ -28,7 +28,11 @@ new Admin_Color_Schemes();
 if ( ( new Host() )->is_woa_site() ) {
 	new Inline_Help();
 	require_once __DIR__ . '/masterbar/wp-posts-list/bootstrap.php';
-	require_once __DIR__ . '/masterbar/profile-edit/bootstrap.php';
+
+	if ( get_option( 'wpcom_admin_interface' ) !== 'wp-admin' ) {
+		require_once __DIR__ . '/masterbar/profile-edit/bootstrap.php';
+	}
+
 	require_once __DIR__ . '/masterbar/nudges/bootstrap.php';
 }

(Haven't tested it, though.)

@lupus2k
Copy link
Contributor Author

lupus2k commented Jan 29, 2024

After exploring the codebase a bit more, I think the whole logic is self-contained in this file:

projects/plugins/jetpack/modules/masterbar/profile-edit/bootstrap.php

Interesting, I'll take a look and test if everything works as expected. Thanks!

@lupus2k
Copy link
Contributor Author

lupus2k commented Jan 29, 2024

@fushar, I updated with your suggestion and it works great, thanks for that 🎉

@github-actions github-actions bot added [Tools] Development CLI The tools/cli to assist during JP development. Actions GitHub actions used to automate some of the work around releases and repository management Admin Page React-powered dashboard under the Jetpack menu Docs E2E Tests RNA labels Feb 1, 2024
@lupus2k lupus2k force-pushed the update/untangle-my-profile-to-profile branch from 4c7d3f3 to 14eddb2 Compare February 1, 2024 23:23
@lupus2k lupus2k force-pushed the update/untangle-my-profile-to-profile-test branch from 136c7d7 to c536df9 Compare February 1, 2024 23:24
@lupus2k lupus2k force-pushed the update/untangle-my-profile-to-profile branch 2 times, most recently from 96c1e86 to 0a9c305 Compare February 6, 2024 19:13
Base automatically changed from update/untangle-my-profile-to-profile to trunk February 6, 2024 21:10
@lupus2k
Copy link
Contributor Author

lupus2k commented Mar 13, 2024

Closed in favor of #36341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Action] Push To Mirrors Action to push folders of a monorepo to a mirror repo [Action] Repo Gardening Github Action: manage PR and issues in your Open Source project [Action] Required Review [Action] Test Results to Slack Actions GitHub actions used to automate some of the work around releases and repository management Admin Page React-powered dashboard under the Jetpack menu [Block] AI Assistant [Block] Cookie Consent [Block] Like [Block] Sharing Button [Block] Sharing Buttons [Block] Subscriber Login [Boost Feature] Page Cache Docs E2E Tests [Extension] AI Assistant Plugin [Extension] AI Content Lens [Feature] Contact Form [Feature] Custom Content Types Custom post or content types (usually for testimonials and portfolios) and their settings. [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Feature] Scan [Feature] Shortcodes / Embeds [Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. [Feature] WooCommerce Analytics [Feature] WPCOM API [Focus] Compatibility Ensuring our products play well with third-parties [JS Package] AI Client [JS Package] API [JS Package] Base Styles [JS Package] Boost Score Api [JS Package] Components [JS Package] Connection [JS Package] Eslint Config Target Es [JS Package] I18n Loader Webpack Plugin [JS Package] IDC [JS Package] Image Guide [JS Package] Licensing [JS Package] Partner Coupon [JS Package] Publicize Components [JS Package] React Data Sync Client [JS Package] Scan [JS Package] Shared Extension Utils [JS Package] Storybook [JS Package] Videopress Core [JS Package] Webpack Config [mu wpcom Feature] Block Patterns [mu wpcom Feature] Launchpad [mu wpcom Feature] Verbum Comments Verbum, a better comment experience, app developed in the mu-wpcom plugin [Package] Action Bar This package no longer exists in the monorepo. [Package] Ad aka WordAds [Package] Admin Ui [Package] Assets [Package] Backup [Package] Blaze [Package] Boost Core [Package] Connection [Package] Forms [Package] Identity Crisis This package no longer exists in the monorepo. It was merged into [Package] Connection. [Package] Jetpack mu wpcom WordPress.com Features [Package] Jitm [Package] Lazy Images This package no longer exists in the monorepo. [Package] My Jetpack [Package] Publicize [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] Stats Data [Package] Sync [Package] VideoPress [Package] WAF [Package] WP JS Data Sync [Package] Yoast Promo [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] CRM Issues about the Jetpack CRM plugin [Plugin] Debug Helper Debug Tools plugin [Plugin] Inspect [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Migration [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Protect A plugin with features to protect a site: brute force protection, security scanning, and a WAF. [Plugin] Search A plugin to add an instant search modal to your site to help visitors find content faster. [Plugin] Social Issues about the Jetpack Social plugin [Plugin] Starter Plugin [Plugin] Super Cache A fast caching plugin for WordPress. [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. RNA [Tests] Includes Tests [Tools] Development CLI The tools/cli to assist during JP development.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants