@@ -75,30 +75,6 @@ const WaveAIButton = memo(({ divRef }: { divRef?: React.RefObject<HTMLDivElement
7575} ) ;
7676WaveAIButton . displayName = "WaveAIButton" ;
7777
78- const WidgetsSidebarButton = memo ( ( { divRef } : { divRef ?: React . RefObject < HTMLDivElement > } ) => {
79- const widgetsSidebarVisible = useAtomValue ( WorkspaceLayoutModel . getInstance ( ) . widgetsSidebarVisibleAtom ) ;
80-
81- const onClick = ( ) => {
82- const current = WorkspaceLayoutModel . getInstance ( ) . getWidgetsSidebarVisible ( ) ;
83- WorkspaceLayoutModel . getInstance ( ) . setWidgetsSidebarVisible ( ! current ) ;
84- } ;
85-
86- return (
87- < Tooltip
88- content = "Toggle Widgets Sidebar"
89- placement = "bottom"
90- hideOnClick
91- divClassName = { `flex h-[22px] px-3.5 justify-end mb-1 items-center rounded-md mr-1 box-border cursor-pointer bg-hover hover:bg-hoverbg transition-colors text-[12px] ${ widgetsSidebarVisible ? "text-accent" : "text-secondary" } ` }
92- divStyle = { { WebkitAppRegion : "no-drag" } as React . CSSProperties }
93- divOnClick = { onClick }
94- divRef = { divRef }
95- >
96- < i className = "fa fa-bars" />
97- </ Tooltip >
98- ) ;
99- } ) ;
100- WidgetsSidebarButton . displayName = "WidgetsSidebarButton" ;
101-
10278function strArrayIsEqual ( a : string [ ] , b : string [ ] ) {
10379 // null check
10480 if ( a == null && b == null ) {
@@ -147,7 +123,6 @@ const TabBar = memo(({ workspace, noTabs }: TabBarProps) => {
147123 const rightContainerRef = useRef < HTMLDivElement > ( null ) ;
148124 const workspaceSwitcherRef = useRef < HTMLDivElement > ( null ) ;
149125 const waveAIButtonRef = useRef < HTMLDivElement > ( null ) ;
150- const widgetsSidebarButtonRef = createRef < HTMLDivElement > ( ) ;
151126 const appMenuButtonRef = useRef < HTMLDivElement > ( null ) ;
152127 const tabWidthRef = useRef < number > ( TabDefaultWidth ) ;
153128 const scrollableRef = useRef < boolean > ( false ) ;
@@ -690,7 +665,6 @@ const TabBar = memo(({ workspace, noTabs }: TabBarProps) => {
690665 </ button >
691666 < div className = "flex-1" />
692667 < div ref = { rightContainerRef } className = "flex flex-row gap-1 items-end" >
693- < WidgetsSidebarButton divRef = { widgetsSidebarButtonRef } />
694668 < UpdateStatusBanner />
695669 < div
696670 className = "h-full shrink-0 z-window-drag"
@@ -701,4 +675,4 @@ const TabBar = memo(({ workspace, noTabs }: TabBarProps) => {
701675 ) ;
702676} ) ;
703677
704- export { TabBar , WaveAIButton , WidgetsSidebarButton } ;
678+ export { TabBar , WaveAIButton } ;
0 commit comments