Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
afd3ba4
feat: add collapsible object field groups with headers
bobbwal Feb 3, 2026
00d9e1f
feat: add collapsed option for object groups
bobbwal Feb 3, 2026
d6270e5
feat: adjust grouped field and block collapse behavior
bobbwal Feb 4, 2026
2a291bc
style: match repeater item controls to block UI
bobbwal Feb 4, 2026
9030516
style: make block and repeater titles toggle collapse
bobbwal Feb 4, 2026
9a63567
style: refine block and repeater toggle behavior
bobbwal Feb 4, 2026
aa7b96b
fix: align group toggle chevron rotation with -rotate-90
bobbwal Feb 4, 2026
b1a99ad
fix: persist block media selections
bobbwal Feb 6, 2026
2c1afe7
fix: preserve nested structured values on repeated saves
bobbwal Feb 9, 2026
eb57e7d
test: add stable hero CTA persistence e2e coverage
bobbwal Feb 10, 2026
53dee1d
test: stabilize block media persistence e2e
bobbwal Feb 10, 2026
2320ae2
docs: clarify objectLayout and collapsed behavior for object fields
bobbwal Feb 12, 2026
3d90ef7
feat: add objectLayout support for object fields and cover with e2e
bobbwal Feb 12, 2026
54354c6
feat: persist collapsible state per document for objects, repeaters, …
bobbwal Feb 26, 2026
65a69a3
fix: reveal collapsed validation errors on submit without realtime si…
bobbwal Feb 26, 2026
d3ac423
Merge branch 'fix/structured-object-serialization' into fix/grouped-f…
bobbwal Feb 26, 2026
79e2c89
Merge branch 'fix/block-media-persist' into fix/grouped-fields-ui
bobbwal Feb 26, 2026
faac564
fix: scope collapsible UI state by collection and preserve __INDEX__ …
bobbwal Feb 26, 2026
3ef4e57
fix: stabilize collapsible state scoping and block media e2e baseurl …
bobbwal Feb 26, 2026
9d43ce0
fix: restore nested object serialization and harden collapsible e2e f…
bobbwal Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions my-sonicjs-app/src/collections/page-blocks.collection.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,82 @@
import type { CollectionConfig } from '@sonicjs-cms/core'

const heroBlock = {
label: 'Hero',
properties: {
heading: { type: 'string', title: 'Heading', required: true },
height: {
type: 'radio',
title: 'Height',
enum: ['small', 'medium', 'full'],
enumLabels: ['Small', 'Medium', 'Full'],
default: 'medium',
inline: true,
},
subheading: { type: 'textarea', title: 'Subheading', maxLength: 600 },
image: { type: 'media', title: 'Background/Image' },
imageAlt: { type: 'string', title: 'Image Alt' },

ctaPrimary: {
title: 'Primary CTA',
type: 'object',
properties: {
label: { type: 'string', title: 'Label' },
link: {
title: 'Link',
type: 'object',
properties: {
mode: {
type: 'select',
title: 'Link type',
enum: ['none', 'internal', 'external'],
enumLabels: ['None', 'Internal', 'External'],
default: 'none',
},
reference: { type: 'reference', title: 'Internal reference', collection: 'pages' },
url: { type: 'url', title: 'External URL' },
},
},
style: {
type: 'select',
title: 'Button style',
enum: ['primary', 'secondary'],
enumLabels: ['Primary', 'Secondary'],
default: 'primary',
},
},
},
ctaSecondary: {
title: 'Secondary CTA',
type: 'object',
properties: {
label: { type: 'string', title: 'Label' },
link: {
title: 'Link',
type: 'object',
properties: {
mode: {
type: 'select',
title: 'Type',
enum: ['none', 'internal', 'external'],
enumLabels: ['None', 'Internal', 'External'],
default: 'none',
},
reference: { type: 'reference', title: 'Internal reference', collection: 'pages' },
url: { type: 'url', title: 'External URL' },
},
},
style: {
type: 'select',
title: 'Button style',
enum: ['primary', 'secondary'],
enumLabels: ['Primary', 'Secondary'],
default: 'primary',
},
},
},
},
}

const pageBlocksCollection: CollectionConfig = {
name: 'page_blocks',
displayName: 'Page Blocks',
Expand Down Expand Up @@ -28,6 +105,7 @@ const pageBlocksCollection: CollectionConfig = {
seo: {
type: 'object',
title: 'SEO',
objectLayout: 'flat',
properties: {
title: { type: 'string', title: 'SEO title' },
description: { type: 'textarea', title: 'SEO description' },
Expand Down Expand Up @@ -60,6 +138,7 @@ const pageBlocksCollection: CollectionConfig = {
type: 'object',
discriminator: 'blockType',
blocks: {
hero: heroBlock,
text: {
label: 'Text',
properties: {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-27AOVQTR.js.map

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ function buildQuery(table, filter) {
// package.json
var package_default = {
name: "@sonicjs-cms/core",
version: "2.7.0",
version: "2.8.0",
description: "Core framework for SonicJS headless CMS - Edge-first, TypeScript-native CMS built for Cloudflare Workers",
type: "module",
main: "./dist/index.cjs",
Expand Down Expand Up @@ -617,5 +617,5 @@ exports.renderTemplate = renderTemplate;
exports.sanitizeInput = sanitizeInput;
exports.sanitizeObject = sanitizeObject;
exports.templateRenderer = templateRenderer;
//# sourceMappingURL=chunk-DMZI7OU3.cjs.map
//# sourceMappingURL=chunk-DMZI7OU3.cjs.map
//# sourceMappingURL=chunk-5HMR2SJW.cjs.map
//# sourceMappingURL=chunk-5HMR2SJW.cjs.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion packages/core/dist/chunk-5PH7K7YR.js.map

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/dist/chunk-5TO3OUFT.cjs.map

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/dist/chunk-6STHJAKU.cjs.map

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/dist/chunk-7DU5PUKL.js.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2108,5 +2108,5 @@ var MigrationService = class {
};

exports.MigrationService = MigrationService;
//# sourceMappingURL=chunk-2YRNPIU4.cjs.map
//# sourceMappingURL=chunk-2YRNPIU4.cjs.map
//# sourceMappingURL=chunk-C2S5X6CO.cjs.map
//# sourceMappingURL=chunk-C2S5X6CO.cjs.map

Large diffs are not rendered by default.

Loading