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
Move and modularise guided tour state #43723
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~55 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~896 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~67 bytes removed 📉 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
1b73dcb
to
00f07dd
Compare
Rebased to fix conflicts. |
@saramarcondes: I think this PR may address part of #43395. See 05c8704. Edit: Actually, I just noticed that your #43690 addresses the same thing. I'll keep an eye on it and rebase if it makes its way in first 🙂 |
00f07dd
to
ed4b092
Compare
Rebased to fix conflicts. |
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.
The above failure of the desktop tests is valid. |
Looks like further usage of the imports being changed has popped up since this PR was opened. Taking another pass. |
Actually, it was a bad merge from the earlier rebase. Fixed. |
Thank you for verifying the failure before I even had a chance to notice it, @belcherj! 😄 |
Looks like everything is working correctly now. Any chance of a review before new conflicts pop up? |
f63b13f
to
d398f1f
Compare
Rebased again to fix new conflict. |
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.
Looks like a legitimate failure in the wp-desktop source build:
|
I probably missed something in the merge conflict. Taking a look. |
Merge conflict properly resolved, ready for review again. |
@sgomes thanks for your work on this. It's been some time since I've contributed to Calypso, so I can't speak to the actual code changes.
Yes, Guided Tours needs to be able to initiate a tour based on certain properties. E.g., the media basics tour should be triggered for all new users on a desktop viewport size when they visit The tours triggered by a button click in the getting started list seem to work fine. However, the media basics tour didn't trigger for me initially. It only triggered when I edited the URL to say In any case, a new user visiting the media library for the first time should be seeing the tour automatically trigger when visiting from a desktop-sized viewport. |
Hey @lsinger ! Sorry I've only been able to get back to this now, as I took a shift into other projects. Sorry about the ping, please let me know if I should be looping in someone else! I'm not entirely clear from your comment whether there is an issue with this PR or with the media guided tour in general? In any case, I can't seem to reproduce; the media tour appears to work for me in a newly created user, both in production and on this branch. |
Nobody has been working on Guided Tours for quite some time, I think, so I'm not sure. Maybe @jsnajdr? He's in the list of requested reviewers already, though.
OK, good to hear -- possibly something went wrong on my side then. 👍 |
b56b90f
to
138a9e9
Compare
Everything is green after a rebase. |
@sgomes Do you have a link for how to do activate the guided tour? I'd love to review this PR for you to get it out of your hair but I'm not familiar with the feature. |
Hey Sara! That would be amazing, thank you! 😄 There are probably better ways of doing this, but the only reliable way that I know of triggering a guided tour is by creating a new account, creating a free blog on it, and then visiting A small popup should appear a short time after loading |
@saramarcondes @sgomes Guided Tours has a mechanism for forcing a tour to start. You need to find the tour name, which is usually in E.g., when you replace
Edit: the |
Thank you, @lsinger, I knew there had to be a better way! 😄 |
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.
Armed with @lsinger's helpful advice I was able to test a guided tour and it worked great. Code of course LGTM 🤠
Woohoo, thank you @saramarcondes! 😄 I'll get this merged tomorrow morning my time, when things are quieter 🙂 |
This PR is one of many working on modularising state in Calypso. This one handles guided tours, which until now live under
ui
but deserve their own top-level entry.For more details on state modularisation, see the modularised state documentation and p4TIVU-9lM-p2.
Note: I added all the reviewers that GitHub suggested. Please feel free to ignore the review request or pull in someone else if you're not comfortable reviewing this PR. Thank you!
Changes proposed in this Pull Request
ui
and into a new top level entryguided-tours/contexts
monolithic module into smaller ones.Testing instructions
Guided tour state is always loaded on (logged-in) boot, and that appears to be an intentional architectural decision. However, that makes it difficult to see the state going from unloaded to loaded, as it happens without user input on boot, so it's difficult to test the automatic state loading part of the PR. That's not a big concern, however; the important thing is to ensure that nothing is getting broken.
With that in mind, in order to verify that this change works correctly, please smoke test guided tour functionality and ensure that it continues to work as before.