Skip to content

2023-10 target docs#3816

Open
laurelthorburn wants to merge 2 commits into2023-10from
2023-10-target-docs
Open

2023-10 target docs#3816
laurelthorburn wants to merge 2 commits into2023-10from
2023-10-target-docs

Conversation

@laurelthorburn
Copy link

@laurelthorburn laurelthorburn commented Feb 3, 2026

Background

Part of: https://github.com/Shopify/shopify-dev/issues/66648

We want to parse target information for the dev docs for each surface.

Solution

Added scripts for admin and checkout surfaces to pull target information into a format that shopify-dev needs to display that information.

Note: This is the 2023-10 API version branch. Only admin and checkout surfaces exist on this branch (no point-of-sale or customer-account as separate surfaces).

The scripts handle:

  • @private JSDoc tags: Targets marked with @private are excluded from the generated output
  • Pick<> / Omit<> types: Correctly resolved to their component lists
  • API parsing: Extracts API types from RenderExtension<Api, Components> definitions
  • Reverse mappings: Generates API → targets and Component → targets mappings

Key differences for 2023-10:

  • Admin uses extension-targets.ts with ExtensionTargets interface
  • Checkout uses targets.ts with ExtensionTargets interface
  • Checkout has both new . naming (e.g., purchase.checkout.block.render) and deprecated :: naming (e.g., Checkout::Dynamic::Render)
  • Admin has its own 28 components (not shared with checkout)
  • Customer-account order status targets exist in checkout surface (deprecated, moved to separate surface in later versions)

🎩

Run the docs generation scripts (which now include targets.json generation):

# 1. Admin surface (16 targets, 28 components)
yarn docs:admin 2023-10

# 2. Checkout surface (52 targets, 47 components)
yarn docs:checkout 2023-10

Verify that:

  • Admin: 16 targets generated (1 @private excluded: Playground)
  • Checkout: 52 targets generated (multiple @private excluded including gift card and payment method targets)
  • Admin targets have 28 admin-specific components (AdminAction, AdminBlock, etc.)
  • Checkout targets have 47 checkout components (Banner, BlockLayout, etc.)
  • Each target has components and apis arrays
  • Reverse mappings exist for APIs and Components

Checklist

  • I have 🎩'd these changes

Create scripts to generate targets.json for 2023-10 API version:
- Admin: 16 targets, 28 components
- Checkout: 52 targets, 47 components

Updated build-docs.sh to call the targets scripts.
@laurelthorburn laurelthorburn changed the base branch from 2026-04-rc to 2023-10 February 3, 2026 20:48
@laurelthorburn laurelthorburn marked this pull request as ready for review February 3, 2026 20:48
@laurelthorburn laurelthorburn changed the title 2023 10 target docs 2023-10 target docs Feb 3, 2026
@laurelthorburn laurelthorburn self-assigned this Feb 3, 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.

1 participant