Skip to content

Commit

Permalink
fix(vision): upgrade react-split-pane to v1.0.0 (#8061)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars authored Dec 16, 2024
1 parent 9f4875f commit 8996689
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
2 changes: 1 addition & 1 deletion packages/@sanity/vision/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@juggle/resize-observer": "^3.3.1",
"@lezer/highlight": "^1.0.0",
"@rexxars/react-json-inspector": "^9.0.1",
"@rexxars/react-split-pane": "^0.1.93",
"@rexxars/react-split-pane": "^1.0.0",
"@sanity/color": "^3.0.0",
"@sanity/icons": "^3.5.3",
"@sanity/ui": "^2.10.10",
Expand Down
6 changes: 2 additions & 4 deletions packages/@sanity/vision/src/components/VisionGui.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable complexity */
import SplitPane from '@rexxars/react-split-pane'
import {SplitPane} from '@rexxars/react-split-pane'
import {type ListenEvent, type MutationEvent, type SanityClient} from '@sanity/client'
import {CopyIcon, ErrorOutlineIcon, PlayIcon, StopIcon} from '@sanity/icons'
import {
Expand Down Expand Up @@ -809,7 +809,6 @@ export class VisionGui extends PureComponent<VisionGuiProps, VisionGuiState> {
</Grid>
</Header>
<SplitpaneContainer flex="auto">
{/* @ts-expect-error: https://github.com/tomkp/react-split-pane/pull/819 */}
<SplitPane
// eslint-disable-next-line @sanity/i18n/no-attribute-string-literals
split={narrowBreakpoint() ? 'vertical' : 'horizontal'}
Expand All @@ -828,10 +827,9 @@ export class VisionGui extends PureComponent<VisionGuiProps, VisionGuiState> {
- Disables resize if the container height is less then 500px
This should ensure that we mostly avoid a pane to take up all the room, and for the controls to not be eaten up by the pane
*/}
{/* @ts-expect-error: https://github.com/tomkp/react-split-pane/pull/819 */}
<SplitPane
className="sidebarPanes"
split={'horizontal'}
split="horizontal"
defaultSize={
narrowBreakpoint() ? paneSizeOptions.defaultSize : paneSizeOptions.minSize
}
Expand Down
29 changes: 7 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8996689

Please sign in to comment.