Quellcode durchsuchen

Remove toolbar visibility button (#22519)

GitOrigin-RevId: 51084bf6f21a6ecaf9d38dab33a8e1541bf62bc8
Alf Eaton vor 1 Jahr
Ursprung
Commit
d434a2ba86

+ 0 - 1
services/web/frontend/extracted-translations.json

@@ -1685,7 +1685,6 @@
   "toolbar_toggle_symbol_palette": "",
   "toolbar_undo": "",
   "toolbar_undo_redo_actions": "",
-  "toolbar_visibility": "",
   "tooltip_hide_filetree": "",
   "tooltip_hide_pdf": "",
   "tooltip_show_filetree": "",

+ 0 - 21
services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx

@@ -41,7 +41,6 @@ const Toolbar = memo(function Toolbar() {
   const view = useCodeMirrorViewContext()
 
   const [overflowed, setOverflowed] = useState(false)
-  const [collapsed, setCollapsed] = useState(false)
 
   const overflowedItemsRef = useRef<Set<string>>(new Set())
 
@@ -132,14 +131,6 @@ const Toolbar = memo(function Toolbar() {
     }
   }, [buildOverflow, insideTable, resizeRef])
 
-  const toggleToolbar = useCallback(() => {
-    setCollapsed(value => !value)
-  }, [])
-
-  if (collapsed) {
-    return null
-  }
-
   const showActions = !state.readOnly && !insideTable
 
   return (
@@ -194,18 +185,6 @@ const Toolbar = memo(function Toolbar() {
         <DetacherSynctexControl />
         <DetachCompileButtonWrapper />
       </div>
-      <div
-        className="ol-cm-toolbar-button-group hidden"
-        aria-label={t('toolbar_visibility')}
-      >
-        <ToolbarButton
-          id="toolbar-expand-less"
-          label="Hide Toolbar"
-          command={toggleToolbar}
-          icon={bsVersion({ bs5: 'arrow_drop_up', bs3: 'caret-up' })}
-          hidden // enable this once there's a way to show the toolbar again
-        />
-      </div>
     </div>
   )
 })

+ 0 - 1
services/web/locales/da.json

@@ -2122,7 +2122,6 @@
   "toolbar_toggle_symbol_palette": "Vis/Skjul symbolpalet",
   "toolbar_undo": "Fortryd",
   "toolbar_undo_redo_actions": "Fortryd/gentag handlinger",
-  "toolbar_visibility": "Synlighed af værktøjslinje",
   "tooltip_hide_filetree": "Tryk for at skjule fil-træet",
   "tooltip_hide_pdf": "Tryk for at skjule PDF’en",
   "tooltip_show_filetree": "Tryk for at vise fil-træet",

+ 0 - 1
services/web/locales/en.json

@@ -2299,7 +2299,6 @@
   "toolbar_toggle_symbol_palette": "Toggle Symbol Palette",
   "toolbar_undo": "Undo",
   "toolbar_undo_redo_actions": "Undo/Redo actions",
-  "toolbar_visibility": "Toolbar visibility",
   "tooltip_hide_filetree": "Click to hide the file tree",
   "tooltip_hide_pdf": "Click to hide the PDF",
   "tooltip_show_filetree": "Click to show the file tree",