Skip to content

Commit c8af88d

Browse files
committed
refactor: moved the migration guide to the version after the next major update
1 parent 7c47514 commit c8af88d

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

docs/migration/v5.x.x-to-v6.0.0.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
## Migration (3.x.x) ➡ 4.0.0
2+
3+
## Refactoring of Header and Navigation
4+
5+
We encountered some problems with the current `DBHeader` as well with the `DBNavigation`.
6+
By splitting the `DBHeader` into 2 components (`DBControlPanelDesktop` & `DBControlPanelMobile`),
7+
we are able to control our navigation based on the device size.
8+
Additionally, we split the `DBNavigationItem` as well to provide a new `DBNavigationItemGroup` instead of
9+
having a Slot with `subNavigation`.
10+
11+
For a detailed migration based on framework checkout those:
12+
13+
- [Angular](300-400/shell/Angular.md)
14+
- [React](300-400/shell/React.md)
15+
- [Vue](300-400/shell/Vue.md)
16+
17+
### Changes in DBPage ➡️ DBShell
18+
19+
- **Mandatory Usage**: The `DBShell` component is now mandatory and replaces the optional `DBPage`.
20+
- **Removed Properties**: The following properties from `DBPage` are no longer supported in `DBShell`:
21+
- `documentOverflow`
22+
- `variant`
23+
- `footer`
24+
- **Slot Changes**:
25+
- The `header` slot has been split into two new slots:
26+
- `controlPanelDesktop`
27+
- `controlPanelMobile`
28+
29+
### Changes in DBHeader ➡️ DBControlPanelDesktop/DBControlPanelMobile
30+
31+
- **Component Split**: The `DBHeader` has been split into two components:
32+
- `DBControlPanelDesktop`
33+
- `DBControlPanelMobile`
34+
- **Slot Wrapping**: The following slots now require additional wrapping components:
35+
- `brand` ➡️ `DBControlPanelBrand`
36+
- `metaNavigation` ➡️ `DBControlPanelMetaNavigation`
37+
- `primaryActions` ➡️ `DBControlPanelPrimaryActions`
38+
- `secondaryActions` ➡️ `DBControlPanelSecondaryActions`
39+
40+
### Changes in Navigation ➡️ NavigationItemGroup
41+
42+
- **Slot Removal**: The `subNavigation` slot in `NavigationItem` has been removed.
43+
- **New Component**: Use the new `NavigationItemGroup` component to group navigation items instead of relying on the `subNavigation` slot.
44+
45+
#### Example Migration
46+
47+
Before:
48+
49+
```html
50+
<NavigationItem><a>Item</a></NavigationItem>
51+
<NavigationItem>
52+
Group
53+
<template slot:sub-navigation>
54+
<NavigationItem><a>Sub Item 1</a></NavigationItem>
55+
<NavigationItem><a>Sub Item 2</a></NavigationItem>
56+
</template>
57+
</NavigationItem>
58+
```
59+
60+
After:
61+
62+
```html
63+
<NavigationItem><a>Item</NavigationItem>
64+
<NavigationItemGroup text="Group">
65+
<NavigationItem><a>Sub Item 1</a></NavigationItem>
66+
<NavigationItem><a>Sub Item 2</a></NavigationItem>
67+
</NavigationItemGroup>
68+
```
69+
70+
## Automate migration via CLI
71+
72+
We provide a CLI tool to auto migrate your source code. Use this command in your repository:
73+
74+
```shell
75+
npx @db-ux/core-migration --type=v200_v300 --src=./src
76+
```

0 commit comments

Comments
 (0)