BaryoDev / BaryoDev/barakoBrew
Blocks and Theme: read renderer limits and theme slots from barakoPress, not constants
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 2
- Avg merge
- 4h 34m
- Merged PRs (30d)
- 60
Description
The console holds the renderer's limits and theme vocabulary as its own constants. `MAX_BLOCKS = 100` and `MAX_DEPTH = 4` are copied from barakoPress (`src/lib/blocks.ts:42-43`, press `src/blocks/schema.ts:112-113`). `COLOR_SLOTS` and `FONT_ROLES` (`src/lib/site-settings.ts:47-69`) copy press's `ThemeColors` and `ThemeFonts` (press `src/theme.ts:19-52`), and the slot names are barakocms.com's own palette (`darkPanel`, `darkPanelChrome`, `codeGreen`). The console already reads press's published block schema (`src/hooks/use-block-schema.ts`), which carries only `version` and `blocks`.
### Why it is too specific
A press that raises the block limit for an agency's long landing pages, or a clinic theme with no code panels that wants `alertBand` instead of `codeGreen`, needs a barakoBrew release to match. Until then the console warns about limits that are not there and treats the clinic's slots as loose site colours.
### The general concept
Press publishes its limits, theme slots and font roles alongside the block schema, and the console reads them from there, keeping the current values only as the fallback when press is unconfigured or older.
### Where it lives
Console, reading from the barakoPress block schema. Needs a change in barakoPress, linked from the umbrella issue.
### Compatibility
No API or stored data change. The block schema gains optional members, so an older press keeps working through the fallback. Stored theme colours are keyed by name and do not move.
### Done when
- A schema reporting a block limit of 200 changes the block editor's warning, with a test that fails before the change.
- The Theme screen lists the slots the schema reports.
- With no press configured, today's constants still apply.
Found in the too specific sweep of 15 September 2026.
Contributor guide
Research direction
Read src/hooks/use-block-schema.ts first, then inspect the copied limits in src/lib/blocks.ts and the theme definitions in src/lib/site-settings.ts alongside the corresponding barakoPress schema, src/blocks/schema.ts, and src/theme.ts. Verify that a schema limit of 200 changes the editor warning, reported theme slots appear on the Theme screen, and the existing constants remain the fallback when no press is configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, react, typescript
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100