diff --git a/services/web/frontend/js/features/ide-react/components/editor-and-pdf.tsx b/services/web/frontend/js/features/ide-react/components/editor-and-pdf.tsx index 940e307a86..41f07edc37 100644 --- a/services/web/frontend/js/features/ide-react/components/editor-and-pdf.tsx +++ b/services/web/frontend/js/features/ide-react/components/editor-and-pdf.tsx @@ -60,12 +60,15 @@ export default function EditorAndPdf({ {editorContent} ) : null} - + setPdfIsOpen(!pdfIsOpen)} + > setPdfIsOpen(isOpen)} + setIsOpen={setPdfIsOpen} tooltipWhenOpen={t('tooltip_hide_pdf')} tooltipWhenClosed={t('tooltip_show_pdf')} /> diff --git a/services/web/frontend/js/features/ide-react/components/layout/placeholder/placeholder-editor-and-pdf.tsx b/services/web/frontend/js/features/ide-react/components/layout/placeholder/placeholder-editor-and-pdf.tsx index 3d77a64698..d032fe7b56 100644 --- a/services/web/frontend/js/features/ide-react/components/layout/placeholder/placeholder-editor-and-pdf.tsx +++ b/services/web/frontend/js/features/ide-react/components/layout/placeholder/placeholder-editor-and-pdf.tsx @@ -66,12 +66,12 @@ export default function PlaceholderEditorAndPdf({ ) : null} - + setPdfIsOpen(!pdfIsOpen)}> setPdfIsOpen(pdfIsOpen)} + setIsOpen={setPdfIsOpen} tooltipWhenOpen={t('tooltip_hide_pdf')} tooltipWhenClosed={t('tooltip_show_pdf')} /> diff --git a/services/web/frontend/js/features/ide-react/components/layout/two-column-main-content.tsx b/services/web/frontend/js/features/ide-react/components/layout/two-column-main-content.tsx index a0712c4662..f1f0c0e071 100644 --- a/services/web/frontend/js/features/ide-react/components/layout/two-column-main-content.tsx +++ b/services/web/frontend/js/features/ide-react/components/layout/two-column-main-content.tsx @@ -64,12 +64,15 @@ export default function TwoColumnMainContent({ > {leftColumnIsOpen ? leftColumnContent : null} - + setLeftColumnIsOpen(!leftColumnIsOpen)} + resizable={leftColumnIsOpen} + > setLeftColumnIsOpen(isOpen)} + setIsOpen={setLeftColumnIsOpen} tooltipWhenOpen={t('tooltip_hide_filetree')} tooltipWhenClosed={t('tooltip_show_filetree')} /> diff --git a/services/web/frontend/js/features/ide-react/components/resize/horizontal-resize-handle.tsx b/services/web/frontend/js/features/ide-react/components/resize/horizontal-resize-handle.tsx index 004e326865..a592bd5ec7 100644 --- a/services/web/frontend/js/features/ide-react/components/resize/horizontal-resize-handle.tsx +++ b/services/web/frontend/js/features/ide-react/components/resize/horizontal-resize-handle.tsx @@ -4,9 +4,14 @@ import { useTranslation } from 'react-i18next' import { PanelResizeHandleProps } from 'react-resizable-panels/dist/declarations/src/PanelResizeHandle' import classNames from 'classnames' +type HorizontalResizeHandleOwnProps = { + resizable?: boolean + onDoubleClick?: () => void +} + export const HorizontalResizeHandle: FC< - { resizable?: boolean } & PanelResizeHandleProps -> = ({ children, resizable = true, ...props }) => { + HorizontalResizeHandleOwnProps & PanelResizeHandleProps +> = ({ children, resizable = true, onDoubleClick, ...props }) => { const { t } = useTranslation() return ( @@ -16,6 +21,7 @@ export const HorizontalResizeHandle: FC< 'horizontal-resize-handle-enabled': resizable, })} title={t('resize')} + onDoubleClick={() => onDoubleClick?.()} > {children} diff --git a/services/web/frontend/js/features/ide-react/components/resize/horizontal-toggler.tsx b/services/web/frontend/js/features/ide-react/components/resize/horizontal-toggler.tsx index 0ca790f1f5..ae718e0ae3 100644 --- a/services/web/frontend/js/features/ide-react/components/resize/horizontal-toggler.tsx +++ b/services/web/frontend/js/features/ide-react/components/resize/horizontal-toggler.tsx @@ -6,7 +6,7 @@ type HorizontalTogglerType = 'west' | 'east' type HorizontalTogglerProps = { id: string isOpen: boolean - setIsOpen: (isClosed: boolean) => void + setIsOpen: (isOpen: boolean) => void togglerType: HorizontalTogglerType tooltipWhenOpen: string tooltipWhenClosed: string