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

Hide the Welcome Tour in the site editor view mode #74242

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

okmttdhr
Copy link
Member

@okmttdhr okmttdhr commented Mar 9, 2023

Closes #72533

Proposed Changes

Hide the Welcome Tour in the site editor view mode (referred to as the "Browse mode" in the original issue) since the tour doesn’t explain how to use the view mode (it does when in editor mode). Hide it until we create the tour for the view mode.

Screen.Recording.2566-03-24.at.16.21.23.mov

Testing Instructions

  • Sandbox a site
  • Run the install-plugin.sh etk update/hide-wolcome-tour command in your sandbox
  • Access wordpress.com/site-editor/[ THE SITE SLUG ]
  • Click on Edit or on the canvas to enter the edit mode
  • Click on Welcome Guide from the Options panel (the three dots menu on the top right) to show it

Screenshot 2566-03-24 at 16 14 22

  • Click on the WordPress logo to enter the view mode
  • Verify the Welcome Tour appears only in the edit mode

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?

@github-actions
Copy link

github-actions bot commented Mar 9, 2023

@matticbot
Copy link
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit update/hide-wolcome-tour on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

@@ -18,25 +19,37 @@ import VideoPressCelebrationModal from './video-celebration-modal';
import WpcomNux from './welcome-modal/wpcom-nux';
import LaunchWpcomWelcomeTour from './welcome-tour/tour-launch';

const { unlock } = __dangerousOptInToUnstableAPIsOnlyForCoreModules(
Copy link
Member Author

@okmttdhr okmttdhr Mar 9, 2023

Choose a reason for hiding this comment

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

We needed to use unlock to get the "site editor's mode" (view, edit, etc.) since the select( 'core/edit-site' ).getCanvasMode is still a private API.

What do you think about using @wordpress/private-apis? @Automattic/lego

If this is not preferred, I think we better wait until getCanvasMode get stable than implement this on our own.

Copy link
Member Author

Choose a reason for hiding this comment

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

I assigned @Automattic/lego as a reviewer because I would like you to look at this earlier 🙂 If it looks good, I'll get to work on tests, etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

I assume it's good to use it except we have another stable way to get the canvas mode. Tested and changes look good 🙂

Copy link
Contributor

@miksansegundo miksansegundo Mar 21, 2023

Choose a reason for hiding this comment

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

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@okmttdhr okmttdhr requested a review from a team March 9, 2023 05:56
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 9, 2023
@okmttdhr okmttdhr self-assigned this Mar 9, 2023
@miksansegundo miksansegundo self-assigned this Mar 24, 2023
Copy link
Contributor

@miksansegundo miksansegundo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

I tested on a simple site via sandbox and on an atomic site uploading the ETK plugin (v3.58617) from Teamcity.

On an atomic site, we don't show the same Welcome guide so the changes doesn't apply.
Screenshot 2566-03-24 at 16 41 59

@miksansegundo miksansegundo marked this pull request as ready for review March 24, 2023 09:47
@miksansegundo miksansegundo merged commit da9862e into trunk Mar 24, 2023
@miksansegundo miksansegundo deleted the update/hide-wolcome-tour branch March 24, 2023 09:48
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 24, 2023
@okmttdhr
Copy link
Member Author

@miksansegundo Thanks for testing and the merge!

@miksansegundo
Copy link
Contributor

Hi @okmttdhr! It's a good idea to find a way to test for this private API, as you mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Welcome Tour: update when/how it appears in the site editor and/or browse mode
4 participants