Changesets for affected packages.

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2022-05-20 16:51:32 +02:00
parent da72da5dae
commit bff65e6958
3 changed files with 44 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
---
'@backstage/create-app': patch
---
Use of `SidebarContext` has been deprecated and will be removed in a future release. Instead, `useSidebar()` should be used to consume the context and `<SidebarContextProvider>` should be used to provide it.
To prepare your app, update `packages/app/src/components/Root/Root.tsx` as follows:
```diff
import {
Sidebar,
sidebarConfig,
- SidebarContext
SidebarDivider,
// ...
SidebarSpace,
+ useSidebar,
} from '@backstage/core-components';
// ...
const SidebarLogo = () => {
const classes = useSidebarLogoStyles();
- const { isOpen } = useContext(SidebarContext);
+ const { isOpen } = useSidebar();
// ...
};
```
@@ -0,0 +1,7 @@
---
'@backstage/plugin-techdocs': patch
'@backstage/plugin-user-settings': patch
'@techdocs/cli': patch
---
Updated sidebar-related logic to use `<SidebarPinStateContextProvider>` + `useSidebarPinState()` and/or `<SidebarContextProvider>` + `useSidebar()` from `@backstage/core-components`.
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/core-components': patch
---
The `SidebarPinStateContext` and `SidebarContext` have been deprecated and will be removed in a future release. Instead, use `<SidebarPinStateContextProvider>` + `useSidebarPinState()` and/or `<SidebarContextProvider>` + `useSidebar()`.
This was done to ensure that sidebar state can be shared successfully across components exported by different packages, regardless of what version of this package is resolved and installed for each individual package.