Skip to content

[Feature] Reduce block registration steps #769

Description

@tomaszpacior

Is your feature request related to a problem? Please describe.
Adding a new block currently requires manual edits to 5 different files:

  1. apps/api-harmonization/package.json - add dependency
  2. apps/frontend/package.json - add dependency
  3. apps/api-harmonization/src/app.module.ts - register module
  4. apps/api-harmonization/src/modules/page/page.model.ts - add to Blocks union type
  5. apps/frontend/src/blocks/renderBlocks.tsx - add to registry/switch

This creates friction and increases the chance of errors when adding new blocks.

Describe the solution you'd like
Reduce the number of manual steps required to register a block. Possible approaches:

  • Auto-generate renderBlocks.tsx from a central registry file or block discovery
  • Auto-generate page.model.ts Blocks union from registered blocks
  • Create a single blocks.config.ts that drives all registrations
  • Extend the Turbo generator to handle registration steps automatically

The solution should work with the approach where blocks can be installable NPM packages.

Additional context (if applicable)

  • Phase: 3 — Configuration & Registration DX
  • Original priority: Medium effort, High impact
  • Need to verify compatibility with installable NPM package blocks


This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting /reward 100 (replace 100 with the amount).
🕵️‍♂️ If someone starts working on this issue to earn the rewards, they can comment /try to let everyone know!
🙌 And when they open the PR, they can comment /claim #769 either in the PR description or in a PR's comment.

🪙 Also, everyone can tip any user commenting /tip 20 @tomaszpacior (replace 20 with the amount, and @tomaszpacior with the user to tip).

📖 If you want to learn more, check out our documentation.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions