- Translate to English every doc the code branches did not touch: AGENT.md, developer guide, vibe, CHANGELOG, docs index, module pages, all skills except ipal-seo-check (14 pages follow after the security/SEO merge). Placeholder marker is now [TO FILL: …]; skill resources renamed to section-code.md / nav-code.md. AGENT.md and the ipal-skills pointer block say the docs are in English. - docs/seeding.md: create-only, natural keys, never delete, no users or secrets, empty-field globals, fallbackLocale: false, dry run, backup and restore, production update guard, seeds vs migrations, Coolify Terminal. Seed templates gain --dry-run, the SEED_UPDATE production guard (IPAL_SEED_ALLOW_PROD_UPDATE), skip of edited records and a summary. "Seeding on production" rule block in AGENT.md. - Coolify is the single deployment path (deployment, env, developer guide, ipal-setup): build vs runtime env, migrations on container start (prodMigrations), health check and rolling updates, rollback, backups and restore, DNS/Let's Encrypt/CAA. R2: custom domain needs a Cloudflare zone; default is media served by the app (R2_PUBLIC_URL empty). - docsConsistency: no Polish prose outside code/quoted data (pending pages listed); IPAL_* names may also be read by shipped skill templates. Co-Authored-By: Claude Opus 5.5 <[email protected]>
3.9 KiB
3.9 KiB
name, description
| name | description |
|---|---|
| ipal-block | Builds or refactors one page section (Payload block + React component) in an ipal-kit project the correct way — a clean editor panel (repeatable things as "+ Add …" arrays with rowLabel, never cta1/cta2 slots, short English labels, no empty spare fields), shared fields from the plugin (buildSectionHeaderField, buildLinksField, buildLinkField, buildSectionSettingsField), UI primitives (Section, SectionHeader, Media, CMSLink), fixed field vocabulary, max ~80 lines of JSX, subcomponents for repeated items, registry wiring. Use when creating a new section/block (hero, features, CTA, FAQ, gallery, pricing, testimonials…), changing a block's fields, or fixing a block with ctaLabel/buttonUrl/pdfUrl fields or a monolithic component. |
ipal-block
One section per use of this skill. Details and ready code:
node_modules/@intecion/ipal-kit/docs/agent/AGENT.md §6.
0. Prerequisites
Check that these exist: src/components/ui/{CMSLink,Button,Media,Section,SectionHeader}.tsx.
Old src/fields/sectionHeader.ts / sectionSettings.ts → replace with the plugin import and delete them (blocks.md, no migration).
Links (buildLinkField, buildLinksField, resolveLink) and section fields (buildSectionHeaderField, buildSectionSettingsField) come from the plugin — do not create them in the project.
Missing → first create them 1:1 from resources/section-code.md (this skill)
(and tell the user). Do not write your own versions.
1. Plan (write 3–5 points, then go straight to code — AGENT.md §0a)
- block slug (camelCase), folder name (PascalCase),
- the field list, only from the AGENT.md §6.5 vocabulary:
header,media,links,link,items(+heading,text,content),settings, - whether
itemsget a<Name>Card.tsxsubcomponent, - whether interaction is needed → a separate
'use client'file (try<details>/<dialog>first), - whether the section is a variant of an existing block (then a
variant: selectfield, not a new block).
2. Code
File patterns (Hero, FeatureGrid + FeatureCard): resources/section-code.md.
src/blocks/<Name>/config.ts—interfaceName: '<Name>Block', fields from the plan, alwaysbuildSectionSettingsField(). CTA =buildLinksField(), nevercta*/button*fields. A downloadable file = a link of typefile. Panel per AGENT.md §6.5a:- repeatable → an array with
labels: { singular, plural }+admin: { initCollapsed: true, components: rowLabel('heading', '<Singular>') },maxRowsfrom the design; - no numbered fields (
cta1,feature2Title,image3) and no spare fields "just in case"; - EN labels of 1–3 words,
descriptiononly when needed (≤ 80 chars, what/where, an example); - dependent fields use
admin.condition, a variant = avariantselect, > ~10 fields →tabs; - block:
labels: { singular: 'Feature grid', plural: 'Feature grids' }.
- repeatable → an array with
src/blocks/<Name>/Component.tsx— named export, type from@/payload-types(<Name>Block & { locale: string }), structure:<Section settings>→<SectionHeader header>→ content with<Media>,<CMSLink>,items.map(<Card/>). No text,href,<img>, hex colors or inline SVG.- Subcomponents go in the same folder; shared by 2+ sections →
src/components/ui/. - Add
config.tstolayoutinsrc/collections/Pages.ts, and the component tosrc/blocks/registry.ts(key = slug). pnpm generate:types.
3. Check
Component.tsx≤ ~80 lines of JSX.- Empty block test in the panel: ≤ 6 items at the start, everything in English,
"+ Add Button / Add Feature", collapsed rows showing their content, every field shows something.
First
rowLabelin the project →pnpm payload generate:importmap. - Run the ipal-audit skill (
--quick), fix every[ERROR]. - Refactoring an existing block with renamed fields: migrate the data first (old field → new), and only then remove the old fields (AGENT.md §6.7).