diff --git a/frontend/src/Editor/LeftSidebar/SidebarDebugger.jsx b/frontend/src/Editor/LeftSidebar/SidebarDebugger.jsx index fe7ce533a7..f2d4e0935b 100644 --- a/frontend/src/Editor/LeftSidebar/SidebarDebugger.jsx +++ b/frontend/src/Editor/LeftSidebar/SidebarDebugger.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState } from 'react'; import Popover from '@/_ui/Popover'; import { Button, HeaderSection } from '@/_ui/LeftSidebar'; import { LeftSidebarItem } from './SidebarItem'; @@ -16,6 +16,7 @@ export const LeftSidebarDebugger = ({ currentPageId, }) => { const { t } = useTranslation(); + const [pinned, setPinned] = useState(false); const [errorLogs, setErrorLogs] = React.useState([]); const [errorHistory, setErrorHistory] = React.useState({ appLevel: [], pageLevel: [] }); const [unReadErrorCount, setUnReadErrorCount] = React.useState({ read: 0, unread: 0 }); @@ -92,6 +93,18 @@ export const LeftSidebarDebugger = ({ + @@ -115,6 +128,7 @@ export const LeftSidebarDebugger = ({ handleToggle={(open) => { if (!open) setSelectedSidebarItem(''); }} + {...(pinned && { open: true })} popoverContentClassName="p-0 sidebar-h-100-popover" side="right" popoverContent={popoverContent} diff --git a/frontend/src/Editor/LeftSidebar/SidebarInspector.jsx b/frontend/src/Editor/LeftSidebar/SidebarInspector.jsx index 47f59fd8e7..cbd7be1234 100644 --- a/frontend/src/Editor/LeftSidebar/SidebarInspector.jsx +++ b/frontend/src/Editor/LeftSidebar/SidebarInspector.jsx @@ -1,6 +1,6 @@ -import React, { useMemo } from 'react'; +import React, { useMemo, useState } from 'react'; import { LeftSidebarItem } from './SidebarItem'; -import { HeaderSection } from '@/_ui/LeftSidebar'; +import { Button, HeaderSection } from '@/_ui/LeftSidebar'; import JSONTreeViewer from '@/_ui/JSONTreeViewer'; import _ from 'lodash'; import RunjsIcon from '../Icons/runjs.svg'; @@ -21,6 +21,7 @@ export const LeftSidebarInspector = ({ runQuery, dataSources, }) => { + const [pinned, setPinned] = useState(false); const componentDefinitions = JSON.parse(JSON.stringify(appDefinition))['components']; const queryDefinitions = appDefinition['queries']; const selectedComponent = React.useMemo(() => { @@ -159,7 +160,22 @@ export const LeftSidebarInspector = ({ const popoverContent = (