-
Notifications
You must be signed in to change notification settings - Fork 800
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
Main Dashboard: improve performance by loading React dash only when connected / in dev mode #13563
Conversation
This is an automated check which relies on |
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.
Tested it and works great! The code looks good, too.
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 did improve the performance in an obvious way. Nice work Enej! 👏
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 is breaking the dashboard for sites using Jetpack's Development mode.
True the notice is not there any more. Since it is baked into the admin.js bundle which this PR removed on purpose. To read the notice. I think it would make more sense to rething the notices in the first place. cc @keoshi for some ideas here. |
By Development mode, I meant this: The dashboard does not load at all in this mode anymore since we're now only loading the bundle if Jetpack is connected to WordPress.com. |
@enejb and I just chatted a bit about this and I agree that we can do without the notice, especially if Jetpack is much more performant without loading these assets. A proposed solution would be to add a little flag at the top of the page, as well as note if the user is using Beta/staging environment/etc. in the footer. Quick and dirty mock: One thing left to consider is that we'd be removing the |
We can talk about this a bit more in a different issue, but it's worth noting that we already have such badges when the site is connected to a WordPress.com sandbox: --
We also have this notice when using Jetpack Dev mode: --
|
Thanks for the clarification and great work catching that! I didn't test it in that mode at all. |
Thanks the fix you suggested works as tested. |
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.
Would it be an option to drop the whole footer implementation from the React dashboard, and only use PHP to display that footer?
We could then do the tracking from the PHP / JS side as well, since we load the tracks js client on all pages already.
I pushed a change to remove a duplicate, and extract the link building process. I was hoping that this would help me bring Tracks back on those links. Unfortunately it is not that easy. While I can add some tracking with the Another problem this PR introduces is the lack of "Reset" and "Dev Tools" options when the site is not connected to WordPress.com. Those buttons are useful when developing Jetpack. None of this may be blocking, especially since this PR will introduce significant performance improvements for folks connecting Jetpack to WordPress.com for the first time. That said, I'd love to have another Crew member's final opinion on this. |
I would consider that non-blocking for this PR (the performance enhancement for regular users is worth it) but we can/should re-add them in another PR. Either in the footer there or the Jetpack Debug page (which I should take a pass at now that most interesting bits of that page are in the Site Health now). |
Nice work folks 👏 |
* 7.9: Changelog * Update version number * Update stable tag and tested up to * Changelog: add #13530 * changelog: add #13578 * Changelog: add #13598 * Changelog: add entry for numerous block preview changes * Changelog: add #13599 * changelog: add #13541 * Changelog: add #13542 * Changelog: add #13331 * Changelog: add #13558 * Changelog: add #13409 * Changelog: add #13582 * Changelog: add #13600 * Changelog: add #13601 * Changelog: add #13595 * Changelog: add #12695 * Changelog: add #13009 * Changelog: add #13649 * Changelog: add #13450 * Changelog: add #13507 * Changelog: add #13658 * Changelog: add #13687 * changelog: add #13683 * Changelog: add #9323 * Changelog: add #13681 * Fix typos in readme * Add link to WordPress Beta Tester plugin * Changelog: add #13630 * Changelog: add #13695 * Changelog: add #13659 * Changelog: add #13716 * Changelog: add #13664 * Changelog: add #13682 * Changelog: add #13362 * Changelog: add #13563 * Add testing list for #13563 * Changelog: add #13735 * Changelog: add #13752 * Changelog: add #13624 * Changelog: add #13756 * Changelog: add #13745 * Changelog: add #13728 * Changelog: add #13779 * Changelog: add #13699 * Changelog: add #13804 * Changelog: add #13761 * Changelog: add #13637 * Changelog: add #13517 * Changelog: add #13521 * Changelog: add #13729 * Testing list: add testing instructions for #13729 * Changelog: add sync changes * Changelog: add #13807 * Changelog: add #13654 * Changelog: add #13795 * Changelog: add #13801 * Changelog: add #13818 * Changelog: add #13725 * Changelog: add #13831 * Changelog: add #13516 * Testing list: add Twenty Twenty instructions * Changelog: add #13799 * Changelog: add #13805 * Changelog: add #13688 * Changelog: add #13830
Improved the loading performance of the connection page my making sure that we don't load the admin.js file.
This results in a much faster appearance of the connection button the jetpack dashboard page.
Before:
https://cloudup.com/csvrz9kD32W
After:
https://cloudup.com/cvBU_z__CQa
Notes
This makes use of a React portal to hook 2 extra links to the footer, now relying on PHP for all links but those 2.
This introduces 2 issues:
Testing instructions:
Proposed changelog entry for your changes: