-
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
Help Center: Connect to zendesk when user wants to contact support #95680
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Async-loaded Components (~37 bytes added 📈 [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. |
@@ -22,6 +22,7 @@ export const UserMessage = ( { | |||
|
|||
const hasCannedResponse = message.context?.flags?.canned_response; | |||
const isRequestingHumanSupport = message.context?.flags?.forward_to_human_support; | |||
const isOnlyMessage = message.context?.flags?.only_message; |
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.
It took me a while to understand the idea behind this boolean.
I would suggest us to rename this variable. Maybe we should call it “hide-disclaimer” or something similar. WDYT?
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.
Plus, I think we could extract this into another place, this is getting too conditional and difficult to read/follow.
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.
One refactoring example:
const renderExtraContactOptions = () => {
return shouldUseHelpCenterExperience ? <GetSupport /> : extraContactOptions;
};
const renderDisclaimers = () => (
<>
<WasThisHelpfulButtons message={ message } isDisliked={ isDisliked } />
<DirectEscalationLink messageId={ message.message_id } />
<div className="disclaimer">
{ __(
"Generated by WordPress.com's Support AI. AI-generated responses may contain inaccurate information.",
__i18n_text_domain__
) }
<ExternalLink href="https://automattic.com/ai-guidelines">
{ __( 'Learn more.', __i18n_text_domain__ ) }
</ExternalLink>
</div>
</>
);
return (
<>
<Markdown
urlTransform={ uriTransformer }
components={ {
a: CustomALink,
} }
>
{ isRequestingHumanSupport ? displayMessage : message.content }
</Markdown>
{ ! isOnlyMessage && (
<>
{ showExtraContactOptions ? renderExtraContactOptions() : isBot && renderDisclaimers() }
</>
) }
</>
);
Related to pdDR7T-1Vr-p2#comment-2342
Proposed Changes
Create a connection to Zendesk when users click on "Contact our Support Team"
I made in a way to avoid adding "Feeling stuck" or feedback to the message switching you to zendesk
Why are these changes being made?
We still had to update that link
Testing Instructions
?flags=help-center-experience