Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove debug menu #508

Merged
merged 2 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/ui/QuadraticUI.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import TopBar from '../ui/menus/TopBar';
import CodeEditor from '../ui/menus/CodeEditor';
import DebugMenu from './menus/DebugMenu/DebugMenu';
import useLocalStorage from '../hooks/useLocalStorage';
import { useRecoilValue } from 'recoil';
import { editorInteractionStateAtom } from '../atoms/editorInteractionStateAtom';
import BottomBar from './menus/BottomBar';
Expand All @@ -23,7 +21,6 @@ import { IS_READONLY_MODE } from '../constants/app';
import { useLocalFiles } from './contexts/LocalFiles';

export default function QuadraticUI({ app, sheetController }: { app: PixiApp; sheetController: SheetController }) {
const [showDebugMenu] = useLocalStorage('showDebugMenu', false);
const editorInteractionState = useRecoilValue(editorInteractionStateAtom);
const { presentationMode } = useGridSettings();
const { hasInitialPageLoadError } = useLocalFiles();
Expand Down Expand Up @@ -52,7 +49,6 @@ export default function QuadraticUI({ app, sheetController }: { app: PixiApp; sh
}}
>
{editorInteractionState.showCellTypeMenu && <CellTypeMenu></CellTypeMenu>}
{showDebugMenu && <DebugMenu sheet={sheetController.sheet} />}
{!presentationMode && <TopBar app={app} sheetController={sheetController} />}
{editorInteractionState.showCommandPalette && <CommandPalette app={app} sheetController={sheetController} />}
{editorInteractionState.showGoToMenu && <GoTo app={app} sheetController={sheetController} />}
Expand Down
15 changes: 0 additions & 15 deletions src/ui/menus/CommandPalette/ListItems/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,6 @@ const ListItems = [
// );
// },
// },
// {
// label: 'View: Show debug menu',
// Component: (props: CommandPaletteListItemSharedProps) => {
// const [showDebugMenu, setShowDebugMenu] = useLocalStorage('showDebugMenu', false);
// return (
// <CommandPaletteListItem
// {...props}
// icon={<CommandPaletteListItemCheckbox checked={showDebugMenu} />}
// action={() => {
// setShowDebugMenu(!showDebugMenu);
// }}
// />
// );
// },
// },
{
label: 'View: Presentation mode',
Component: (props: any) => {
Expand Down
68 changes: 0 additions & 68 deletions src/ui/menus/DebugMenu/DebugMenu.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/ui/menus/TopBar/SubMenus/QuadraticMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Menu, MenuItem, SubMenu, MenuDivider, MenuHeader } from '@szhsin/react-
import { IS_READONLY_MODE } from '../../../../constants/app';
import { useGridSettings } from './useGridSettings';
import { useAuth0 } from '@auth0/auth0-react';
import useLocalStorage from '../../../../hooks/useLocalStorage';
import { Tooltip } from '@mui/material';
import { DOCUMENTATION_URL, BUG_REPORT_URL } from '../../../../constants/urls';
import { SheetController } from '../../../../grid/controller/sheetController';
Expand All @@ -26,7 +25,6 @@ interface Props {

export const QuadraticMenu = (props: Props) => {
const { sheetController } = props;
const [showDebugMenu, setShowDebugMenu] = useLocalStorage('showDebugMenu', false);
const interactionState = useRecoilValue(gridInteractionStateAtom);
const [editorInteractionState, setEditorInteractionState] = useRecoilState(editorInteractionStateAtom);
const settings = useGridSettings();
Expand Down Expand Up @@ -181,15 +179,6 @@ export const QuadraticMenu = (props: Props) => {
Show A1 notation on headings
</MenuItem> */}
<MenuDivider />
<MenuItem
type="checkbox"
checked={showDebugMenu}
onClick={() => {
setShowDebugMenu(!showDebugMenu);
}}
>
Show debug menu
</MenuItem>
</SubMenu>

{isAuthenticated && (
Expand Down