Skip to content

Explore pulling blueprints - #3197

Merged
katinthehatsite merged 11 commits into
trunkfrom
add/blueprints-fetching
Apr 24, 2026
Merged

Explore pulling blueprints#3197
katinthehatsite merged 11 commits into
trunkfrom
add/blueprints-fetching

Conversation

@katinthehatsite

@katinthehatsite katinthehatsite commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

It was used to identify where the fix should be placed.

Proposed Changes

This PR adds a fetching mechanism for blueprints from https://wordpress.github.io/blueprints/ into Studio. It does not handle any blueprint display or UI yet.

Testing Instructions

  • Apply the following diff:
index 923ed44ef..3fdd8afab 100644
--- a/apps/studio/src/components/app.tsx
+++ b/apps/studio/src/components/app.tsx
@@ -25,6 +25,7 @@ import { WhatsNewModal, useWhatsNew } from 'src/modules/whats-new';
 import { useAppDispatch, useRootSelector } from 'src/stores';
 import { selectOnboardingLoading } from 'src/stores/onboarding-slice';
 import { syncOperationsThunks } from 'src/stores/sync';
+import { useGetGalleryBlueprints } from 'src/stores/wpcom-api';
 import 'src/index.css';
 
 export default function App() {
@@ -41,6 +42,22 @@ export default function App() {
        const isEmpty = ! loadingSites && ! localSites.length;
        const shouldShowWhatsNew = showWhatsNew && ! isEmpty;
        const { client } = useAuth();
+       // TODO: remove - temporary test for gallery blueprints fetching
+       const {
+               data: galleryBlueprints,
+               isLoading: isLoadingGallery,
+               error: galleryError,
+       } = useGetGalleryBlueprints();
+       useEffect( () => {
+               console.log(
+                       '[GalleryBlueprints] loading:',
+                       isLoadingGallery,
+                       '| count:',
+                       galleryBlueprints?.length,
+                       '| error:',
+                       galleryError
+               );
+       }, [ galleryBlueprints, isLoadingGallery, galleryError ] );
        const dispatch = useAppDispatch();
 
        // Initialize sync states from in-progress server operations
  • Start Studio with npm start
  • Open the dev tools
  • Confirm that you can see the amount of Blueprints that were fetched:
Screenshot 2026-04-23 at 10 09 02 AM

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@katinthehatsite katinthehatsite self-assigned this Apr 22, 2026
@katinthehatsite
katinthehatsite marked this pull request as draft April 22, 2026 20:20
@wpmobilebot

wpmobilebot commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing e31b5eb vs trunk

app-size

Metric trunk e31b5eb Diff Change
App Size (Mac) 1440.83 MB 1440.83 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk e31b5eb Diff Change
load 1788 ms 1843 ms +55 ms 🔴 3.1%

site-startup

Metric trunk e31b5eb Diff Change
siteCreation 8086 ms 8085 ms 1 ms ⚪ 0.0%
siteStartup 4951 ms 4959 ms +8 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@katinthehatsite
katinthehatsite requested a review from senff April 23, 2026 14:17
@katinthehatsite
katinthehatsite requested a review from a team April 23, 2026 15:56
@katinthehatsite
katinthehatsite marked this pull request as ready for review April 23, 2026 15:56
Comment thread apps/studio/src/stores/wpcom-api.ts Outdated
@katinthehatsite
katinthehatsite merged commit 64f13ba into trunk Apr 24, 2026
12 checks passed
@katinthehatsite
katinthehatsite deleted the add/blueprints-fetching branch April 24, 2026 19:23
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