Skip to content

Make blockGroup required in Deepnote file schema (temporary requirement) #191

@jamesbhobbs

Description

@jamesbhobbs

Context

The blockGroup field is currently optional in the Deepnote file schema, but it's required for proper layout rendering on deepnote.com. This creates issues when files are missing this field.

Changes

Make blockGroup a required field in the Deepnote block schema (packages/blocks/src/deserialize-file/deepnote-file-schema.ts).

Why Temporary?

This is a temporary requirement to ensure all Deepnote files work correctly with the current layout system on deepnote.com. In the future, we plan to:

  • Refactor the layout system to not depend on blockGroup being present
  • Make blockGroup optional again once the dependency is removed

Implementation

  • Changed blockGroup: z.string().optional() to blockGroup: z.string() in the schema
  • Updated all test fixtures to include blockGroup field
  • All existing .deepnote files in the repository already have this field, so no migration needed

Testing

  • ✅ All tests pass (446 tests)
  • ✅ TypeScript type checking passes
  • ✅ All existing .deepnote files in the repo validate successfully

Related

This change ensures consistency across all Deepnote files and prevents layout issues on deepnote.com until the platform can handle missing blockGroup fields gracefully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions