Skip to content

Commit

Permalink
Merge branch 'next' into create-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
snorrees authored Oct 22, 2024
2 parents 02990c2 + 6c1d4c8 commit cfa2c71
Show file tree
Hide file tree
Showing 8 changed files with 341 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dev/test-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@sanity/util": "workspace:*",
"@sanity/uuid": "^3.0.1",
"@sanity/vision": "workspace:*",
"@sanity/visual-editing": "2.2.1",
"@sanity/visual-editing": "2.2.2",
"@turf/helpers": "^6.0.1",
"@turf/points-within-polygon": "^5.1.5",
"@vercel/stega": "0.1.2",
Expand Down
90 changes: 89 additions & 1 deletion dev/test-studio/schema/standard/objects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export default defineType({
)
},
},
fieldsets: [{name: 'recursive', title: 'Recursive', options: {collapsible: true}}],
fieldsets: [
{name: 'recursive', title: 'Recursive', options: {collapsible: true}},
{name: 'readOnly', title: 'Read only', options: {collapsible: true}},
],
fields: [
{
type: 'object',
Expand Down Expand Up @@ -231,5 +234,90 @@ export default defineType({
},
],
},
{
name: 'readOnlyObject',
title: 'Read only object',
type: 'object',
fieldset: 'readOnly',
readOnly: true,
fields: [
{
name: 'selfDefinedReadOnlyField',
title: 'Read only field',
description: 'ReadOnly defined in field',
type: 'string',
readOnly: true,
},
{
name: 'inheritedReadOnlyField',
title: 'Read only field',
description: 'ReadOnly inherited from object',
type: 'string',
},
],
},
{
name: 'sections',
title: 'Sections',
type: 'array',
fieldset: 'readOnly',
of: [
{
type: 'object',
name: 'blocks',
fields: [
{
type: 'array',
name: 'blocks',
title: 'Grid',
of: [{type: 'playlistTrack'}],
},
],
},
{
type: 'object',
name: 'textBlocks',
fields: [
{
type: 'text',
name: 'text',
title: 'Text',
},
],
},
],
},
{
name: 'sectionsReadOnly',
title: 'Sections (read only)',
type: 'array',
readOnly: true,
fieldset: 'readOnly',
of: [
{
type: 'object',
name: 'blocks',
fields: [
{
type: 'array',
name: 'blocks',
title: 'Grid',
of: [{type: 'playlistTrack'}],
},
],
},
{
type: 'object',
name: 'textBlocks',
fields: [
{
type: 'text',
name: 'text',
title: 'Text',
},
],
},
],
},
],
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"@sanity/client": "^6.22.2",
"@sanity/eslint-config-i18n": "1.0.0",
"@sanity/eslint-config-studio": "^4.0.0",
"@sanity/mutate": "^0.10.0",
"@sanity/mutate": "^0.10.1",
"@sanity/pkg-utils": "6.11.4",
"@sanity/prettier-config": "^1.0.2",
"@sanity/test": "0.0.1-alpha.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"dependencies": {
"@sanity/client": "^6.22.2",
"@sanity/mutate": "^0.10.0",
"@sanity/mutate": "^0.10.1",
"@sanity/types": "3.61.0",
"@sanity/util": "3.61.0",
"arrify": "^2.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export const CopyPasteProvider: React.FC<{

const targetSchemaTypeTitle = targetSchemaType.title || targetSchemaType.name
const transferValueOptions = {
targetDocumentSchemaType: targetDocumentSchemaType,
sourceRootSchemaType: sourceSchemaType,
sourcePath: [],
sourceRootPath: clipboardItem.valuePath,
Expand Down
Loading

0 comments on commit cfa2c71

Please sign in to comment.