-
-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Toggling the navigation or editor panels causes layout flickering and pane size jumps.
How to Reproduce
glitching.mp4
Steps to reproduce the issue. Attach all resources that can help us understand the issue:
(attached video)
- Navigation open, enable Editor: Layout flickers while the editor is opening
- Only Preview visible, enable Navigation: Pane sizes jump and the layout glitches
- Only Preview visiblem enable Editor: Flickering occurs during the transition
Expected behavior
change.mp4
Proposed Changes
File : Content.tsx
- Wrap Content with
React.memoto prevent unnecessary re-renders. - Use
useMemoforsecondPaneSizeandsecondPaneMaxSize, returning 0 when both panels are disabled. - Memoize
localStorageLeftPaneSizeandlocalStorageRightPaneSize. - Extract pane resize handlers with
useCallback. - Memoize
navigationAndEditorJSX and pane styles. - Set inner
SplitPaneprimary="first"for consistent behavior.
Happy to open a PR for this if the maintainers approve.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Backlog