Skip to content

Commit 6ae596a

Browse files
committed
docs: improve migration docs
1 parent c4f96b7 commit 6ae596a

5 files changed

Lines changed: 36 additions & 27 deletions

File tree

docs/migrations/migration-to-9.x.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ The `GridService` has CRUD methods that were sometime returning a single item an
136136

137137
## Future Changes (next major)
138138
### Code being Deprecated (to be removed in the future, not before another year)
139-
#### You can start using new properties and options shown below in v9.0 and above.
139+
#### You can start using these new properties and options (shown below) in v9.0 and above.
140140

141-
So when I created the project, I used a few TypeScript Enums and I though this was great but it turns out that all of these Enums end up in the final transpiled JS bundle. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (`type` instead of `enum` because `type` aren't transpiled and `enum` are). So you should consider using string types as much and as soon as possible in all your new grids. Note that at the moment, they are only deprecations, and will only be dropped in the future (not now, but you should still consider this for the future), for example:
141+
So when I created the project, I used a few TypeScript Enums and I thought that it was great but it turns out that all of these Enums end up in the final transpiled JS bundle and that takes space. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (`type` instead of `enum` because `type` aren't transpiled and `enum` are). So you should consider using string types as much and as soon as possible in all your new grids and eventually make the changes in your older grids. Note that at the moment, those are only deprecations and they will only be dropped in the future (not now, but you should still consider this for the near future), for example:
142142

143143
```diff
144144
columns = [{
@@ -147,7 +147,8 @@ columns = [{
147147
+ type: 'number',
148148
}];
149149
```
150-
> Note that migrating from `FieldType` to string types was already doable for the past couple years, so this one is far from new.
150+
151+
> Note that using the string types (ie: `'number'`) instead of `FieldType` was already doable for the past couple years, so this is far from new.
151152
152153
Below are a list of Enums being deprecated and you should think about migrating them eventually because they will be removed in the next major release (whenever that happens, but that won't be before another year). Note that the list below are only a summary of these deprecations and replacements.
153154

@@ -173,7 +174,7 @@ Below are a list of Enums being deprecated and you should think about migrating
173174
| | `SortDirection.DESC` | `'DESC'` or `'desc'` |
174175
| - | - | - |
175176

176-
##### deprecating `editorOptions` and `filterOptions`, they are being renamed as simply `options`
177+
##### deprecating `editorOptions` and `filterOptions`, they are being renamed as a more generic `options` name
177178

178179
in order to make it easier to merge and simplify editor/filter options, I'm renaming the options to a single `options` property which will make it more easily transportable (you will be able to reuse the same `options` for both the editor/filter if you wanted). You can start using `options` in v9.0 and above (or keep using `editorOptions`, `filterOptions`).
179180

frameworks/angular-slickgrid/docs/migrations/migration-to-9.x.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ function angularGridReady(angularGrid: AngularGridInstance) {
5353
export class Component {
5454
gridOptions = {
5555
enableRowDetailView: true,
56-
rowTopOffsetRenderType: 'top', // RowDetail and/or RowSpan don't render well with "transform", you should use "top"
56+
// RowDetail and/or RowSpan don't render well with "transform", you should use "top"
57+
rowTopOffsetRenderType: 'top',
5758
rowDetailView: {
5859
- onAsyncResponse: (e, args) => console.log('before toggling row detail', args.itemDetail),
5960
+ onAsyncResponse: (e, args) => console.log('before toggling row detail', args.item),
@@ -157,9 +158,9 @@ The `GridService` has CRUD methods that were sometime returning a single item an
157158

158159
## Future Changes (next major)
159160
### Code being Deprecated (to be removed in the future, not before another year)
160-
#### You can start using new properties and options shown below in v9.0 and above.
161+
#### You can start using these new properties and options (shown below) in v9.0 and above.
161162

162-
So when I created the project, I used a few TypeScript Enums and I though this was great but it turns out that all of these Enums end up in the final transpiled JS bundle. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (`type` instead of `enum` because `type` aren't transpiled and `enum` are). So you should consider using string types as much and as soon as possible in all your new grids. Note that at the moment, they are only deprecations, and will only be dropped in the future (not now, but you should still consider this for the future), for example:
163+
So when I created the project, I used a few TypeScript Enums and I thought that it was great but it turns out that all of these Enums end up in the final transpiled JS bundle and that takes space. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (`type` instead of `enum` because `type` aren't transpiled and `enum` are). So you should consider using string types as much and as soon as possible in all your new grids and eventually make the changes in your older grids. Note that at the moment, those are only deprecations and they will only be dropped in the future (not now, but you should still consider this for the near future), for example:
163164

164165
```diff
165166
columns = [{
@@ -168,7 +169,8 @@ columns = [{
168169
+ type: 'number',
169170
}];
170171
```
171-
> Note that migrating from `FieldType` to string types was already doable for the past couple years, so this one is far from new.
172+
173+
> Note that using the string types (ie: `'number'`) instead of `FieldType` was already doable for the past couple years, so this is far from new.
172174
173175
Below are a list of Enums being deprecated and you should think about migrating them eventually because they will be removed in the next major release (whenever that happens, but that won't be before another year). Note that the list below are only a summary of these deprecations and replacements.
174176

@@ -194,7 +196,7 @@ Below are a list of Enums being deprecated and you should think about migrating
194196
| | `SortDirection.DESC` | `'DESC'` or `'desc'` |
195197
| - | - | - |
196198

197-
##### deprecating `editorOptions` and `filterOptions`, they are being renamed as simply `options`
199+
##### deprecating `editorOptions` and `filterOptions`, they are being renamed as a more generic `options` name
198200

199201
in order to make it easier to merge and simplify editor/filter options, I'm renaming the options to a single `options` property which will make it more easily transportable (you will be able to reuse the same `options` for both the editor/filter if you wanted). You can start using `options` in v9.0 and above (or keep using `editorOptions`, `filterOptions`).
200202

frameworks/aurelia-slickgrid/docs/migrations/migration-to-9.x.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ function aureliaGridReady(aureliaGrid: AureliaGridInstance) {
5252
export class Component {
5353
gridOptions = {
5454
enableRowDetailView: true,
55-
rowTopOffsetRenderType: 'top', // RowDetail and/or RowSpan don't render well with "transform", you should use "top"
55+
// RowDetail and/or RowSpan don't render well with "transform", you should use "top"
56+
rowTopOffsetRenderType: 'top',
5657
rowDetailView: {
5758
- onAsyncResponse: (e, args) => console.log('before toggling row detail', args.itemDetail),
5859
+ onAsyncResponse: (e, args) => console.log('before toggling row detail', args.item),
@@ -158,9 +159,9 @@ The `GridService` has CRUD methods that were sometime returning a single item an
158159

159160
## Future Changes (next major)
160161
### Code being Deprecated (to be removed in the future, not before another year)
161-
#### You can start using new properties and options shown below in v9.0 and above.
162+
#### You can start using these new properties and options (shown below) in v9.0 and above.
162163

163-
So when I created the project, I used a few TypeScript Enums and I though this was great but it turns out that all of these Enums end up in the final transpiled JS bundle. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (`type` instead of `enum` because `type` aren't transpiled and `enum` are). So you should consider using string types as much and as soon as possible in all your new grids. Note that at the moment, they are only deprecations, and will only be dropped in the future (not now, but you should still consider this for the future), for example:
164+
So when I created the project, I used a few TypeScript Enums and I thought that it was great but it turns out that all of these Enums end up in the final transpiled JS bundle and that takes space. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (`type` instead of `enum` because `type` aren't transpiled and `enum` are). So you should consider using string types as much and as soon as possible in all your new grids and eventually make the changes in your older grids. Note that at the moment, those are only deprecations and they will only be dropped in the future (not now, but you should still consider this for the near future), for example:
164165

165166
```diff
166167
columns = [{
@@ -169,7 +170,8 @@ columns = [{
169170
+ type: 'number',
170171
}];
171172
```
172-
> Note that migrating from `FieldType` to string types was already doable for the past couple years, so this one is far from new.
173+
174+
> Note that using the string types (ie: `'number'`) instead of `FieldType` was already doable for the past couple years, so this is far from new.
173175
174176
Below are a list of Enums being deprecated and you should think about migrating them eventually because they will be removed in the next major release (whenever that happens, but that won't be before another year). Note that the list below are only a summary of these deprecations and replacements.
175177

@@ -195,7 +197,7 @@ Below are a list of Enums being deprecated and you should think about migrating
195197
| | `SortDirection.DESC` | `'DESC'` or `'desc'` |
196198
| - | - | - |
197199

198-
##### deprecating `editorOptions` and `filterOptions`, they are being renamed as simply `options`
200+
##### deprecating `editorOptions` and `filterOptions`, they are being renamed as a more generic `options` name
199201

200202
in order to make it easier to merge and simplify editor/filter options, I'm renaming the options to a single `options` property which will make it more easily transportable (you will be able to reuse the same `options` for both the editor/filter if you wanted). You can start using `options` in v9.0 and above (or keep using `editorOptions`, `filterOptions`).
201203

frameworks/slickgrid-react/docs/migrations/migration-to-9.x.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ function reactGridReady(reactGrid: SlickgridReactInstance) {
5757
```diff
5858
const gridOptions = {
5959
enableRowDetailView: true,
60-
rowTopOffsetRenderType: 'top', // RowDetail and/or RowSpan don't render well with "transform", you should use "top"
60+
// RowDetail and/or RowSpan don't render well with "transform", you should use "top"
61+
rowTopOffsetRenderType: 'top',
6162
rowDetailView: {
6263
- onAsyncResponse: (e, args) => console.log('before toggling row detail', args.itemDetail),
6364
+ onAsyncResponse: (e, args) => console.log('before toggling row detail', args.item),
@@ -184,18 +185,19 @@ The `GridService` has CRUD methods that were sometime returning a single item an
184185

185186
## Future Changes (next major)
186187
### Code being Deprecated (to be removed in the future, not before another year)
187-
#### You can start using new properties and options shown below in v9.0 and above.
188+
#### You can start using these new properties and options (shown below) in v9.0 and above.
188189

189-
So when I created the project, I used a few TypeScript Enums and I though this was great but it turns out that all of these Enums end up in the final transpiled JS bundle. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (`type` instead of `enum` because `type` aren't transpiled and `enum` are). So you should consider using string types as much and as soon as possible in all your new grids. Note that at the moment, they are only deprecations, and will only be dropped in the future (not now, but you should still consider this for the future), for example:
190+
So when I created the project, I used a few TypeScript Enums and I thought that it was great but it turns out that all of these Enums end up in the final transpiled JS bundle and that takes space. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (`type` instead of `enum` because `type` aren't transpiled and `enum` are). So you should consider using string types as much and as soon as possible in all your new grids and eventually make the changes in your older grids. Note that at the moment, those are only deprecations and they will only be dropped in the future (not now, but you should still consider this for the near future), for example:
190191

191192
```diff
192-
setColumns([{
193+
columns = [{
193194
id: 'age', ...
194195
- type: FieldType.number,
195196
+ type: 'number',
196-
}]);
197+
}];
197198
```
198-
> Note that migrating from `FieldType` to string types was already doable for the past couple years, so this one is far from new.
199+
200+
> Note that using the string types (ie: `'number'`) instead of `FieldType` was already doable for the past couple years, so this is far from new.
199201
200202
Below are a list of Enums being deprecated and you should think about migrating them eventually because they will be removed in the next major release (whenever that happens, but that won't be before another year). Note that the list below are only a summary of these deprecations and replacements.
201203

@@ -221,7 +223,7 @@ Below are a list of Enums being deprecated and you should think about migrating
221223
| | `SortDirection.DESC` | `'DESC'` or `'desc'` |
222224
| - | - | - |
223225

224-
##### deprecating `editorOptions` and `filterOptions`, they are being renamed as simply `options`
226+
##### deprecating `editorOptions` and `filterOptions`, they are being renamed as a more generic `options` name
225227

226228
in order to make it easier to merge and simplify editor/filter options, I'm renaming the options to a single `options` property which will make it more easily transportable (you will be able to reuse the same `options` for both the editor/filter if you wanted). You can start using `options` in v9.0 and above (or keep using `editorOptions`, `filterOptions`).
227229

frameworks/slickgrid-vue/docs/migrations/migration-to-9.x.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ function vueGridReady(sgv: SlickgridVueInstance) {
5858
```diff
5959
gridOptions.value = {
6060
enableRowDetailView: true,
61-
rowTopOffsetRenderType: 'top', // RowDetail and/or RowSpan don't render well with "transform", you should use "top"
61+
// RowDetail and/or RowSpan don't render well with "transform", you should use "top"
62+
rowTopOffsetRenderType: 'top',
6263
rowDetailView: {
6364
- onAsyncResponse: (e, args) => console.log('before toggling row detail', args.itemDetail),
6465
+ onAsyncResponse: (e, args) => console.log('before toggling row detail', args.item),
@@ -149,18 +150,19 @@ The `GridService` has CRUD methods that were sometime returning a single item an
149150

150151
## Future Changes (next major)
151152
### Code being Deprecated (to be removed in the future, not before another year)
152-
#### You can start using new properties and options shown below in v9.0 and above.
153+
#### You can start using these new properties and options (shown below) in v9.0 and above.
153154

154-
So when I created the project, I used a few TypeScript Enums and I though this was great but it turns out that all of these Enums end up in the final transpiled JS bundle. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (`type` instead of `enum` because `type` aren't transpiled and `enum` are). So you should consider using string types as much and as soon as possible in all your new grids. Note that at the moment, they are only deprecations, and will only be dropped in the future (not now, but you should still consider this for the future), for example:
155+
So when I created the project, I used a few TypeScript Enums and I thought that it was great but it turns out that all of these Enums end up in the final transpiled JS bundle and that takes space. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (`type` instead of `enum` because `type` aren't transpiled and `enum` are). So you should consider using string types as much and as soon as possible in all your new grids and eventually make the changes in your older grids. Note that at the moment, those are only deprecations and they will only be dropped in the future (not now, but you should still consider this for the near future), for example:
155156

156157
```diff
157-
columns.value = [{
158+
columns = [{
158159
id: 'age', ...
159160
- type: FieldType.number,
160161
+ type: 'number',
161162
}];
162163
```
163-
> Note that migrating from `FieldType` to string types was already doable for the past couple years, so this one is far from new.
164+
165+
> Note that using the string types (ie: `'number'`) instead of `FieldType` was already doable for the past couple years, so this is far from new.
164166
165167
Below are a list of Enums being deprecated and you should think about migrating them eventually because they will be removed in the next major release (whenever that happens, but that won't be before another year). Note that the list below are only a summary of these deprecations and replacements.
166168

@@ -186,7 +188,7 @@ Below are a list of Enums being deprecated and you should think about migrating
186188
| | `SortDirection.DESC` | `'DESC'` or `'desc'` |
187189
| - | - | - |
188190

189-
##### deprecating `editorOptions` and `filterOptions`, they are being renamed as simply `options`
191+
##### deprecating `editorOptions` and `filterOptions`, they are being renamed as a more generic `options` name
190192

191193
in order to make it easier to merge and simplify editor/filter options, I'm renaming the options to a single `options` property which will make it more easily transportable (you will be able to reuse the same `options` for both the editor/filter if you wanted). You can start using `options` in v9.0 and above (or keep using `editorOptions`, `filterOptions`).
192194

0 commit comments

Comments
 (0)