Skip to content

Add Learn more component and use it for blueprint and CLI#2317

Merged
nightnei merged 12 commits into
trunkfrom
addBlueprintLearnMoreButton
Dec 30, 2025
Merged

Add Learn more component and use it for blueprint and CLI#2317
nightnei merged 12 commits into
trunkfrom
addBlueprintLearnMoreButton

Conversation

@nightnei
Copy link
Copy Markdown
Contributor

@nightnei nightnei commented Dec 24, 2025

Related issues

Proposed Changes

With this PR, we are adding "Learn more" component, so that it will be used across Studio for consistency.
We are starting with Blueprints and CLI texts.

Testing Instructions

  1. Click "Add site" -> "Start from a blueprint"
  2. Assert that you see
    Screenshot 2025-12-30 at 11 47 58
  3. Close popup and open Studio's Settings (top right corner of the window)
  4. Assert that Learn more still looks good
    Screenshot 2025-12-30 at 11 48 37
  5. Open "Import / Export" tab and assert that Learn more button looks good
    Screenshot 2025-12-30 at 11 49 16
  6. Open "AI Assistant" tab and assert that Learn more button looks good
    Screenshot 2025-12-30 at 11 49 55
  7. Open "Add site -> Create a site -> Advanced settings" and assert that Learn more button looks good
    Screenshot 2025-12-30 at 11 50 33
  8. Open "Add site -> Import from a backup" and assert that Learn more button looks good
    Screenshot 2025-12-30 at 11 51 11
  9. Open site settings and click "Edit site" button and assert that Learn more button looks good
    Screenshot 2025-12-30 at 11 51 47
  10. Open "Help" -> "What's new" and assert that it looks good
    Screenshot 2025-12-30 at 11 52 29

@nightnei nightnei requested a review from a team December 24, 2025 21:11
@nightnei nightnei self-assigned this Dec 24, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 24, 2025

📊 Performance Test Results

Comparing 55977fa vs trunk

site-editor

Metric trunk 55977fa Diff Change
load 5963.00 ms 6520.00 ms +557.00 ms 🔴 9.3%

site-startup

Metric trunk 55977fa Diff Change
siteCreation 9073.00 ms 16124.00 ms +7051.00 ms 🔴 77.7%
siteStartup 3956.00 ms 3957.00 ms +1.00 ms 🔴 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

@gavande1
Copy link
Copy Markdown
Contributor

gavande1 commented Dec 26, 2025

Thank you for working on the component, @nightnei. I have tested it, and it looks as described. I think we should wait for Marina's response regarding the button color and arrow icon. Ideally, we should update all "Learn More" buttons across the app to use the newly built component.

@wojtekn
Copy link
Copy Markdown
Contributor

wojtekn commented Dec 29, 2025

Looks good.

The only small thing I see is that now in the default window size there is not enough room for the boxes, so the scrollbar appears.

We could consider reducing spacing somewhere, e.g., in the footer container, from p-6 to p-5, or to p-6 pt-5 pb-5 if we are concerned about the change in side whitespace. Actually, p-5 could work fine, too, as that way, we would align the Continue button with all other elements.

@katinthehatsite
Copy link
Copy Markdown
Contributor

Ideally, we should update all "Learn More" buttons across the app to use the newly built component.

+1 to this one. I think it makes sense to update this everywhere if we are introducing a new component.

@nightnei nightnei force-pushed the addBlueprintLearnMoreButton branch from 8d40066 to 5bbe864 Compare December 29, 2025 10:57
Copy link
Copy Markdown
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

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

@nightnei, great work! I like the new LearnMoreLink component. That will help standardize its look and feel and usage.

I suggest to keep the link inside the translation to keep the order of text and then learn more link, so RTL languages will display it in the right order too.

<Button variant="link" onClick={ () => getIpcApi().openURL( AI_GUIDELINES_URL ) } />
),
} ) }
{ __( 'Powered by experimental AI.' ) } <LearnMoreLink docsLinksKey="a8cAiGuidelines" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@nightnei , let's keep the createInterpolateElement call. That way it will look better for RTL languages. Something like:

Suggested change
{ __( 'Powered by experimental AI.' ) } <LearnMoreLink docsLinksKey="a8cAiGuidelines" />
{ createInterpolateElement( __( 'Powered by experimental AI. <learn_more_link />' ), {
learn_more_link: <LearnMoreLink docsLinksKey="a8cAiGuidelines" />,
} ) }

Copy link
Copy Markdown
Contributor Author

@nightnei nightnei Dec 29, 2025

Choose a reason for hiding this comment

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

Great thought, I will update it 👍

}

interface SiteFormProps {
interface CreateSiteFormProps {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@sejas, JFYI, you suggested to rename it previously in one of my PRs, but I merged it before noticing your suggestion. I had a personal note of your suggestion, to remember and address in some future PR where such change will suite, so addressing it here :)

Copy link
Copy Markdown
Contributor

@wojtekn wojtekn left a comment

Choose a reason for hiding this comment

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

@nightnei I've noticed that earlier I posted commet about arrow but not submitted that - I did that now.

Comment thread src/components/learn-more.tsx Outdated
variant="link"
>
{ __( 'Learn more' ) }
<ArrowIcon />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's remove ArrowIcon for consistency for now, and later we can add it everywhere holistically if we decide it's the way to go.

Copy link
Copy Markdown
Contributor

@wojtekn wojtekn left a comment

Choose a reason for hiding this comment

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

Looks good to merge. We can update screenshots to cover the latest changes, though.

const guideLines = getGuidelinesLink();
expect( guideLines ).toBeVisible();
expect( guideLines ).toHaveTextContent( 'Powered by experimental AI. Learn more' );
expect( guideLines ).toHaveTextContent( 'Powered by experimental AI. Learn more' );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we remove ↗ here?

Copy link
Copy Markdown
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

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

Thanks for keeping the LearnMoreLink inside the translation. I left a comment for the What’s New modal “Learn more” link; I think we can use the new component there too.

{ learnMoreLabel || (
<>
{ __( 'Learn more' ) }
<ArrowIcon />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we use the <LearnMoreLink here? Should we remove the arrow too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should we remove the arrow too?

Removed

Should we use the <LearnMoreLink here?

I was thinking about it and even started to implement, but then reverted changes since:

  1. We should use custom URL instead of DocsLinkKey
  2. The text (learnMoreLabel ) can be also custom

I looked at the code and realized that teh custom url and label make the LearnMoreLink quite dificult and they override everythign inside the component, so I decided to keep this place as exception, to keep code simple. I don't have strong preference, but I whould keep it as is till we receive final decision from Marina about the design.

@nightnei nightnei merged commit 3d7f22f into trunk Dec 30, 2025
11 checks passed
@nightnei nightnei deleted the addBlueprintLearnMoreButton branch December 30, 2025 12:07
@nightnei nightnei mentioned this pull request Jan 5, 2026
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