-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Support chat using Zendesk Messaging #76777
Conversation
This PR modifies the release build for editing-toolkit To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-mMA-p2 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~79 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~4645 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 (~21469 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. |
c254c03
to
f11e350
Compare
799e204
to
8bd09c2
Compare
d7c0194
to
13df63d
Compare
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.
Reviewed, but didn't get to test yet. The majority are non-blockers, only one is actually a blocker, the rest all are optional.
...editing-toolkit/editing-toolkit-plugin/help-center/class-wp-rest-help-center-user-fields.php
Show resolved
Hide resolved
if ( typeof window.zE !== 'function' ) { | ||
return; | ||
} | ||
if ( showMessagingLauncher ) { |
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.
I would make showMessagingLauncher
a string instead of a boolean and just pass it around.
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.
I'm not sure I understand - could you clarify what are the benefits of it being a string and how that would make it easier to pass it around?
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 if
is basically converting true
to 'show'
and false
to 'hide'
. I prefer
window.zE( 'messenger', showMessagingLauncher )
It's inspired by this https://kentcdodds.com/blog/stop-using-isloading-booleans
packages/help-center/src/components/help-center-contact-form.tsx
Outdated
Show resolved
Hide resolved
packages/help-center/src/components/help-center-third-party-cookies-notice.tsx
Outdated
Show resolved
Hide resolved
@klimeryk are there some steps to testing this with ZD chat in staging? I have tried just opening things as I would with HelpCenter normally, but I am getting an error:
|
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.
Wasn't able to test the changes, but read through. Everything seems to be good from my perspective.
As you highlighted before I do think this should prompt a general spring cleaning of Help Center to make it easier to understand and update since many decisions were made with happychat in mind.
...editing-toolkit/editing-toolkit-plugin/help-center/class-wp-rest-help-center-user-fields.php
Show resolved
Hide resolved
...editing-toolkit/editing-toolkit-plugin/help-center/class-wp-rest-help-center-user-fields.php
Show resolved
Hide resolved
Thanks for testing! I'll reach out on Slack to get more info on which user you've used to test 🙇 |
This prevents loading the Zendesk widget
Taken from #74706
Also, fixes an issue where the support history would persist between refreshes, leading probably to this notice being less effective
Simplify code - props to @alshakero! And ensure react-query does not try to retry the error state - it really seems to hate when there's an error.
f4b0906
to
4da2806
Compare
Thanks so much for testing and sharing your feedback!
Yup, definitely, I'll rework it so that if the user selects Live chat option, they'll immediately go to Zendesk Messaging. I'll do that in a follow-up PR, though, as we need to launch now 🙇♂️ I'll be on the lookout for any reports about the confusion around the notice and ask for feedback how/if we should it improve it as well - thanks for pointing it out! |
Reverts #77016 Second attempt at #76777 We're switching from Happy Chat to Zendesk Messaging for live chat support. This PR is big, but it's also the smallest I could get given the scope of the project. Any cleanup of Happy Chat code, old contact forms, etc. will be done as a follow-up. I want to keep this PR as easy to revert as possible if needed.
Reverts #77016 Second attempt at #76777 We're switching from Happy Chat to Zendesk Messaging for live chat support. This PR is big, but it's also the smallest I could get given the scope of the project. Any cleanup of Happy Chat code, old contact forms, etc. will be done as a follow-up. I want to keep this PR as easy to revert as possible if needed.
Well, this one is a doozy.
We're switching from Happy Chat to Zendesk Messaging for live chat support. This PR is big, but it's also the smallest I could get given the scope of the project. Any cleanup of Happy Chat code, old contact forms, etc. will be done as a follow-up. I want to keep this PR as easy to revert as possible if needed.
Proposed Changes
type=zendesk
)./help/messaging/is-available
endpoint.Testing Instructions
The live chat support flow should feel the same up to the point where you click the chat CTA (
Chat with us
/Still chat with us
). At that point, the Help Center should get hidden, while the Zendesk launch and widget should become visible.Trying to show the Help Center should automatically minimize the Zendesk widget, to avoid clutter and confusing UI. The Zendesk launcher remains visible, so the user can come back to the conversation at any time.
If you have Enhanced Tracking Protection (or similar strict privacy settings and/or ad-blockers), you will see this notice when choosing the Live Chat support option:
Other support options should not show this notice, of course.
Verify that the Zendesk widget follows you on different paths in Calypso. Where Help Center is, the widget should also be there.
If you have an active, ongoing conversation, it should be detected and on refreshes the launcher should appear. If new messages arrive, it will be reflected with a count/notification on the launcher as well.
Verify these behaviors in different environments that Help Center has to work in:
Pre-merge Checklist