Skip to content

Conversation

@jkguidaven
Copy link
Contributor

@jkguidaven jkguidaven commented Dec 22, 2025

Related to https://linear.app/a8c/issue/A4A-1942/fix-a4a-dashboard-links-to-help-center-docs

NOTE: This is not an exhaustive list and only some of the links are updated. Those will be addressed on follow-up PRs.

Proposed Changes

This pull request refactors how external Knowledge Base (KB) links are handled across the Automattic for Agencies frontend. Instead of opening KB articles in a new tab, clicking these links now opens the relevant article directly in the in-app Help Center modal, providing a more integrated user experience. This change is implemented consistently across multiple components and sections by introducing and utilizing a new showSupportGuide method from the useHelpCenter hook.

Help Center Integration and Link Handling:

  • Introduced a new showSupportGuide method in the useHelpCenter hook, enabling programmatic navigation to specific KB articles within the Help Center modal. (client/a8c-for-agencies/hooks/use-help-center.ts) [1] [2]
  • Updated all relevant components and sections (e.g., team management, WooPayments, migrations, partner directory, referrals) to use showSupportGuide for KB article links, replacing direct external links with in-app modal navigation. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27]

User Experience Improvements:

  • Ensured that all "Learn more" or KB article links now open within the Help Center modal instead of navigating away from the app or opening a new browser tab, resulting in a smoother and more consistent user experience. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Code Consistency and Cleanup:

  • Removed now-unnecessary href, target, and rel attributes from KB anchor tags and buttons, and replaced them with click handlers that trigger the Help Center modal. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Updated all relevant imports to include the new useHelpCenter hook where necessary. [1] [2] [3] [4] [5] [6] [7] [8] [9]

These changes collectively modernize the way help content is presented, keeping users within the application context and offering a more seamless support experience.

Why are these changes being made?

  • Using the Help center to view KB articles is less disruptive because it displays the article inline instead of opening a new tab.

Testing Instructions

  • Use the A4A live link and navigate to /overview page.
  • Verify the following if it works correctly.
Description Image
In the Partner Directory Dashboard screen Screenshot 2025-12-22 at 7 02 37 PM 1
In the Teams page (empty list) Screenshot 2025-12-22 at 7 03 31 PM
In the WooPayments product card Screenshot 2025-12-22 at 7 05 21 PM
In the Migrations FAQ Screenshot 2025-12-22 at 7 07 26 PM
In the Referrals and WooPayments commission card Screenshot 2025-12-22 at 7 08 23 PM 1

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@jkguidaven jkguidaven self-assigned this Dec 22, 2025
@matticbot
Copy link
Contributor

matticbot commented Dec 22, 2025

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

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

  • agents-manager
  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/a4a/kb-link-to-point-help-center on your sandbox.

@matticbot
Copy link
Contributor

matticbot commented Dec 22, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~1120 bytes added 📈 [gzipped])

Details
name                                parsed_size           gzip_size
a8c-for-agencies-partner-directory       +514 B  (+0.1%)     +144 B  (+0.1%)
a8c-for-agencies-woopayments             +490 B  (+0.0%)     +151 B  (+0.0%)
a8c-for-agencies-referrals               +462 B  (+0.0%)     +165 B  (+0.0%)
a8c-for-agencies-team                    +440 B  (+0.0%)     +159 B  (+0.0%)
a8c-for-agencies-sites                   +440 B  (+0.0%)     +152 B  (+0.0%)
a8c-for-agencies-migrations              +438 B  (+0.0%)     +157 B  (+0.0%)
a8c-for-agencies-marketplace             +423 B  (+0.0%)     +147 B  (+0.0%)
a8c-for-agencies-settings                +378 B  (+0.1%)      +70 B  (+0.1%)
a8c-for-agencies-reports                 +378 B  (+0.0%)     +118 B  (+0.0%)
a8c-for-agencies-purchases               +378 B  (+0.0%)      +97 B  (+0.0%)
a8c-for-agencies-plugins                 +378 B  (+0.0%)      +87 B  (+0.0%)
a8c-for-agencies-overview                +378 B  (+0.0%)     +118 B  (+0.0%)
a8c-for-agencies-learn                   +378 B  (+0.0%)     +192 B  (+0.0%)
a8c-for-agencies-feedback                +378 B  (+0.1%)      +89 B  (+0.1%)
a8c-for-agencies-exclusive-offers        +378 B  (+0.0%)     +192 B  (+0.0%)
a8c-for-agencies-client                  +378 B  (+0.0%)     +118 B  (+0.0%)
a8c-for-agencies-agency-tier             +378 B  (+0.0%)      +89 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

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.

@jkguidaven jkguidaven requested a review from a team December 22, 2025 11:08
@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 Dec 22, 2025
@jkguidaven jkguidaven marked this pull request as ready for review December 22, 2025 11:08
Copy link
Contributor

@yashwin yashwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works as expected.

However, I left some comments. Please let me know your thoughts.

></a>
),
// eslint-disable-next-line jsx-a11y/anchor-is-valid
a: <a onClick={ onLearnMoreClick } href="#" />,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a Button here?

<Button onClick={ onLearnMoreClick } variant="link">
	 { translate( 'Learn more.' ) }
</Button>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Yashwin, I decided to leave this as is for now, since converting it to a core component would change its styling and break the pattern. We will handle these later and ensure all our links use the core component, but for this PR we will ignore it for now.

Screenshot 2026-01-14 at 10 31 46 PM

Comment on lines +22 to +27
onClick={ () =>
showSupportGuide(
'https://agencieshelp.automattic.com/knowledge-base/the-automattic-for-agencies-client-plugin/'
)
}
href="#"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. I think we can use a Button.

Comment on lines +154 to +160
onClick={ () => {
dispatch( recordTracksEvent( 'calypso_a4a_migrations_payout_kb_link_click' ) );
showSupportGuide(
'https://agencieshelp.automattic.com/knowledge-base/automattic-for-agencies-earnings/'
);
} }
href="#"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as my comment above. Let's leave this as is until we refactor all our links to use the core component.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Could we please start a conversation with the design and see how we can address this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sure. I can discuss this with @madebynoam later.

@jkguidaven jkguidaven force-pushed the update/a4a/kb-link-to-point-help-center branch from a2ba9e8 to ede1070 Compare January 14, 2026 14:36
@jkguidaven
Copy link
Contributor Author

@yashwin thanks for the review! 🙏 I've addressed one of your comment can you have another look?

Copy link
Contributor

@yashwin yashwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jkguidaven jkguidaven force-pushed the update/a4a/kb-link-to-point-help-center branch from ede1070 to 62dfc72 Compare January 15, 2026 11:01
@jkguidaven jkguidaven merged commit a214aab into trunk Jan 15, 2026
13 checks passed
@jkguidaven jkguidaven deleted the update/a4a/kb-link-to-point-help-center branch January 15, 2026 11:31
@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 Jan 15, 2026
@a8ci18n
Copy link

a8ci18n commented Jan 15, 2026

Translation for this Pull Request has now been finished.

heydemoura pushed a commit that referenced this pull request Jan 18, 2026
…107829)

* Create a helper function for showing support guide.

* Update KB article links to use Help center.

* Remove all arrow keys.
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.

5 participants