Conversation
📊 Performance Test ResultsComparing b0946c6 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change |
There was a problem hiding this comment.
We removed the arrow and the associated aria-label for accessibility.
I'm not sure if it was intentional, so I wanted to flag it.
The learnHow boolean prop isn't very clear in my opinion. Consider using a label prop instead:
export function LearnMoreLink( {
docsLinksKey,
className,
label,
}: {
docsLinksKey: DocsLinkKey;
className?: string;
label?: string;
} ) {
const { __ } = useI18n();
const locale = useI18nLocale();
return (
<Button
className={ className }
onClick={ ( e: React.MouseEvent ) => {
e.stopPropagation();
getIpcApi().openURL( getLocalizedLink( locale, docsLinksKey ) );
} }
variant="link"
>
{ label ?? __( 'Learn more' ) }
</Button>
);
}If we want to restrict labels to specific variants, we could have an internal DocsLink component with two exported wrappers (LearnMoreLink and LearnHowLink).
It was intentional, the main reason is the same as for "Learn more" link - #2317 (comment)
I intentionally wanted to avoid custom labels, to avoid duplications (setting label={ __ ("Learn how") } ) and have consistency across Studio.
This sugesstion is great, thanks, I will go with it 👍 |
| export function LearnHowLink( props: LinkProps ) { | ||
| const { __ } = useI18n(); | ||
|
|
||
| return <MoreLink { ...props } label={ __( 'Learn how' ) } />; |
There was a problem hiding this comment.
Is there any benefit to using 'Learn how' wording instead of 'Learn more'? Should we unify it?



Proposed Changes
Follow up to #2317
@katinthehatsite noticed that we don't have space for "Learn how" link. In the previous PR I didn't see this type of links, so this PR utilizes that component to avoid duplications and make that component reuzabled.
Testing Instructions
Apply the next diff: