mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
[web] Add a focus mode to the editor (#32245)
* Basic focus mode implementation * Exit button * Toggle between editor pdf mode * Keep the rail and file tree mounted for editor tabs to work properly * Hide Switch to editor button in focus mode * Show shortcuts in layout menu * Gate the feature behind a focus-mode feature flag * Add split test badges in the focus mode dropdown item and top bar * Add analytics tracking for focusMode changes * Cleanup leftover IdeView value * Allow passing focusMode value in layout test provider * Remove redundant listener for focus mode shortcut * Update focus mode and full project search listeners to use the event key * Post-rebase cleanup --------- Co-authored-by: Anna Fields <acfields11@gmail.com> GitOrigin-RevId: 207f8d136fa6662558c474cca4a867a9842191e7
This commit is contained in:
committed by
Copybot
co-authored by
Anna Fields
parent
757735b075
commit
c8a3bdd13f
+3
-1
@@ -1,3 +1,4 @@
|
||||
import { useLayoutContext } from '@/shared/context/layout-context'
|
||||
import { memo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import OLButtonToolbar from '@/shared/components/ol/ol-button-toolbar'
|
||||
@@ -34,6 +35,7 @@ function PdfPreviewHybridToolbar() {
|
||||
}
|
||||
|
||||
function PdfPreviewHybridToolbarInner() {
|
||||
const { focusMode } = useLayoutContext()
|
||||
return (
|
||||
<>
|
||||
<div className="toolbar-pdf-left">
|
||||
@@ -43,7 +45,7 @@ function PdfPreviewHybridToolbarInner() {
|
||||
</div>
|
||||
<div className="toolbar-pdf-right">
|
||||
<div className="toolbar-pdf-controls" id="toolbar-pdf-controls" />
|
||||
<SwitchToEditorButton />
|
||||
{!focusMode && <SwitchToEditorButton />}
|
||||
<DetachedSynctexControl />
|
||||
{/* TODO: should we have code check? */}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user