-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from contentstack/staging
DX | 09-09-2024 | Release
- Loading branch information
Showing
7 changed files
with
1,743 additions
and
1,277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
## Migrating from v2 to v3 | ||
This document outlines the necessary changes to separate nested modular blocks into distinct interfaces. This update will affect how modular blocks are structured and used throughout the codebase. | ||
|
||
## Before | ||
```typescript | ||
export interface Test { | ||
/** Version */ | ||
_version?: 2; | ||
/** Title */ | ||
title: string; | ||
/** Modular Blocks */ | ||
modular_blocks?: { | ||
test: { | ||
/** Multi Line Textbox */ | ||
multi_line?: string; | ||
/** Rich Text Editor */ | ||
rich_text_editor?: string; | ||
/** Modular Blocks1 */ | ||
modular_blocks1?: { | ||
test1: { | ||
/** Multi Line Textbox */ | ||
multi_line?: string; | ||
}; | ||
}[]; | ||
}; | ||
}[]; | ||
} | ||
``` | ||
|
||
|
||
## After | ||
```typescript | ||
export interface Test { | ||
/** Version */ | ||
_version: 2; | ||
/** Title */ | ||
title: string; | ||
/** Modular Blocks */ | ||
modular_blocks?: ModularBlocks[]; | ||
} | ||
|
||
|
||
export interface ModularBlocks { | ||
/** Multi Line Textbox */ | ||
multi_line?: string; | ||
/** Rich Text Editor */ | ||
rich_text_editor?: string; | ||
/** Modular Blocks1 */ | ||
modular_blocks1?: ModularBlocks1[]; | ||
} | ||
|
||
export interface ModularBlocks1 { | ||
/** Multi Line Textbox */ | ||
multi_line?: string; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.