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

Help Center: Connect to zendesk when user wants to contact support #95680

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

escapemanuele
Copy link
Contributor

@escapemanuele escapemanuele commented Oct 24, 2024

Related to pdDR7T-1Vr-p2#comment-2342

Proposed Changes

Create a connection to Zendesk when users click on "Contact our Support Team"

image

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

  • Add the flag ?flags=help-center-experience
  • Open Wapuu
  • Ask something
  • Click on "Contact our support team"
  • You should be talking with a HE (fake if you're in staging)

@escapemanuele escapemanuele changed the title To zendesk when user wants to contact Help Center: Connect to zendesk when user wants to contact support Oct 24, 2024
@escapemanuele escapemanuele requested a review from a team October 24, 2024 15:40
@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 Oct 24, 2024
@escapemanuele escapemanuele self-assigned this Oct 24, 2024
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • command-palette-wp-admin
  • help-center
  • notifications
  • odyssey-stats
  • whats-new
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug hc-fix-contact-support on your sandbox.

@matticbot
Copy link
Contributor

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])

name                               parsed_size           gzip_size
async-load-automattic-help-center       +158 B  (+0.0%)      +37 B  (+0.0%)

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.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@escapemanuele escapemanuele merged commit c7bb194 into trunk Oct 24, 2024
17 checks passed
@escapemanuele escapemanuele deleted the hc-fix-contact-support branch October 24, 2024 16:16
@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 Oct 24, 2024
@@ -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;
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

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() }
				</>
			) }
		</>
	);

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.

3 participants