From 32a73d5bd3c2991e9b9048a7fdd2e668cf352f06 Mon Sep 17 00:00:00 2001 From: Kiran Murugulla Date: Thu, 16 Jul 2026 17:22:48 -0400 Subject: [PATCH] fix: remove options sheet from blocks.json setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed blocks.json generation from multi-sheet to single-sheet structure, removing hardcoded options. Also removed logic that preserved and re-added existing options during updates. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tools/admin/operations/library.js | 8 ----- tools/admin/utils/doc-generator.js | 47 ++++-------------------------- 2 files changed, 5 insertions(+), 50 deletions(-) diff --git a/tools/admin/operations/library.js b/tools/admin/operations/library.js index 8d77c9b..e2a9e10 100644 --- a/tools/admin/operations/library.js +++ b/tools/admin/operations/library.js @@ -105,14 +105,10 @@ export async function uploadBlockDocs(org, site, blocksToUpload, onProgress) { export async function updateLibraryBlocksJSON(org, site, blockNames) { let existingBlocks = []; - let existingOptions = null; try { const existingBlocksJSON = await fetchBlocksJSON(org, site); existingBlocks = getBlocksArray(existingBlocksJSON); - if (existingBlocksJSON?.options) { - existingOptions = existingBlocksJSON.options; - } } catch (error) { // ignore } @@ -149,10 +145,6 @@ export async function updateLibraryBlocksJSON(org, site, blockNames) { site, ); - if (existingOptions) { - blocksJSON.options = existingOptions; - } - return updateBlocksJSON(org, site, blocksJSON); } diff --git a/tools/admin/utils/doc-generator.js b/tools/admin/utils/doc-generator.js index 0efd0e7..a9053fc 100644 --- a/tools/admin/utils/doc-generator.js +++ b/tools/admin/utils/doc-generator.js @@ -73,49 +73,12 @@ export function generateBlocksJSON(blocks, org, site) { path: block.path || getContentBlockPath(org, site, block.name), })); - const optionsSheet = [ - { - key: 'style', - blocks: 'section-metadata', - values: 'xxs-spacing | xs-spacing | s-spacing | m-spacing | l-spacing | xl-spacing | xxl-spacing | dark | light | quiet', - }, - { - key: 'gap', - blocks: 'ALL', - values: '100 | 200 | 300 | 400 | 500 | 600 | 700 | 800', - }, - { - key: 'background', - blocks: 'section-metadata', - values: 'dark-grey=#676767 | light-grey=#EFEFEF | adobe-red=#FF0000 | blue=#0077B6 | green=#00A36C', - }, - { - key: 'spacing', - blocks: 'section-metadata', - values: '400 | 500 | 600 | 700 | 800', - }, - { - key: 'template', - blocks: 'metadata', - values: 'blog-post | product-page | feature-page', - }, - ]; - return { ':version': 3, - ':names': ['data', 'options'], - ':type': 'multi-sheet', - data: { - total: dataSheet.length, - limit: dataSheet.length, - offset: 0, - data: dataSheet, - }, - options: { - total: optionsSheet.length, - limit: optionsSheet.length, - offset: 0, - data: optionsSheet, - }, + ':type': 'sheet', + total: dataSheet.length, + limit: dataSheet.length, + offset: 0, + data: dataSheet, }; }