Changesets for affected packages.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
@@ -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`.
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user