@backstage/create-app 0.0.0-nightly-20220530025009 → 0.0.0-nightly-20220531024457
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @backstage/create-app
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20220531024457
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -47,6 +47,32 @@
|
|
|
47
47
|
);
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
- bff65e6958: Use of `SidebarContext` has been deprecated and will be removed in a future release. Instead, `useSidebarOpenState()` should be used to consume the context and `<SidebarOpenStateProvider>` should be used to provide it.
|
|
51
|
+
|
|
52
|
+
To prepare your app, update `packages/app/src/components/Root/Root.tsx` as follows:
|
|
53
|
+
|
|
54
|
+
```diff
|
|
55
|
+
import {
|
|
56
|
+
Sidebar,
|
|
57
|
+
sidebarConfig,
|
|
58
|
+
- SidebarContext
|
|
59
|
+
SidebarDivider,
|
|
60
|
+
// ...
|
|
61
|
+
SidebarSpace,
|
|
62
|
+
+ useSidebarOpenState,
|
|
63
|
+
} from '@backstage/core-components';
|
|
64
|
+
|
|
65
|
+
// ...
|
|
66
|
+
|
|
67
|
+
const SidebarLogo = () => {
|
|
68
|
+
const classes = useSidebarLogoStyles();
|
|
69
|
+
- const { isOpen } = useContext(SidebarContext);
|
|
70
|
+
+ const { isOpen } = useSidebarOpenState();
|
|
71
|
+
|
|
72
|
+
// ...
|
|
73
|
+
};
|
|
74
|
+
```
|
|
75
|
+
|
|
50
76
|
- 935d8515da: Updated the `--version` flag to output the version of the current backstage release instead of the version of create-app.
|
|
51
77
|
- 1f70704580: Accessibility updates:
|
|
52
78
|
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import React, {
|
|
17
|
+
import React, { PropsWithChildren } from 'react';
|
|
18
18
|
import { Link, makeStyles } from '@material-ui/core';
|
|
19
19
|
import HomeIcon from '@material-ui/icons/Home';
|
|
20
20
|
import ExtensionIcon from '@material-ui/icons/Extension';
|
|
@@ -32,13 +32,13 @@ import { SidebarSearchModal } from '@backstage/plugin-search';
|
|
|
32
32
|
import {
|
|
33
33
|
Sidebar,
|
|
34
34
|
sidebarConfig,
|
|
35
|
-
SidebarContext,
|
|
36
35
|
SidebarDivider,
|
|
37
36
|
SidebarGroup,
|
|
38
37
|
SidebarItem,
|
|
39
38
|
SidebarPage,
|
|
40
39
|
SidebarScrollWrapper,
|
|
41
40
|
SidebarSpace,
|
|
41
|
+
useSidebarOpenState,
|
|
42
42
|
} from '@backstage/core-components';
|
|
43
43
|
import MenuIcon from '@material-ui/icons/Menu';
|
|
44
44
|
import SearchIcon from '@material-ui/icons/Search';
|
|
@@ -60,7 +60,7 @@ const useSidebarLogoStyles = makeStyles({
|
|
|
60
60
|
|
|
61
61
|
const SidebarLogo = () => {
|
|
62
62
|
const classes = useSidebarLogoStyles();
|
|
63
|
-
const { isOpen } =
|
|
63
|
+
const { isOpen } = useSidebarOpenState();
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
66
|
<div className={classes.root}>
|