8000 refactor: remove DevTools component and related styles · coderamp-labs/pad.ws@02cfd91 · GitHub
[go: up one dir, main page]

Skip to content

Commit 02cfd91

Browse files
committed
refactor: remove DevTools component and related styles
- Deleted the DevTools component and its associated SCSS file to streamline the codebase. - Updated the CustomEmbeddableRenderer to remove references to DevTools, enhancing clarity and maintainability. - Removed DevTools entry from the pad index file and MainMenu, simplifying the user interface.
1 parent 61b7e1c commit 02cfd91

File tree

5 files changed

+1
-163
lines changed

5 files changed

+1
-163
lines changed

src/frontend/src/CustomEmbeddableRenderer.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
ControlButton,
1010
Editor,
1111
Terminal,
12-
DevTools,
1312
} from './pad';
1413
import { ActionButton } from './pad/buttons';
1514
import "./CustomEmbeddableRenderer.scss";
@@ -36,7 +35,7 @@ export const renderCustomEmbeddable = (
3635
title = "HTML Editor";
3736
break;
3837
case 'editor':
39-
content = <Editor element={element} appState={appState} excalidrawAPI={excalidrawAPI} />;
38+
content = <Editor element={element} excalidrawAPI={excalidrawAPI} />;
4039
title = "Code Editor";
4140
break;
4241
case 'terminal':
@@ -64,10 +63,6 @@ export const renderCustomEmbeddable = (
6463
content = <Dashboard element={element} appState={appState} excalidrawAPI={excalidrawAPI} />;
6564
title = "Dashboard";
6665
break;
67-
case 'dev':
68-
content = <DevTools element={element} appState={appState} excalidrawAPI={excalidrawAPI} />;
69-
title = "Dev Tools";
70-
break;
7166
default:
7267
title = "Untitled";
7368
return null;

src/frontend/src/pad/DevTools.scss

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/frontend/src/pad/DevTools.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/frontend/src/pad/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ export * from './Dashboard';
55
export * from './Terminal';
66
export * from './buttons';
77
export * from './editors';
8-
export * from './DevTools';
98

109
// Default exports
1110
export { default as ControlButton } from './buttons/ControlButton';
1211
export { default as StateIndicator } from './StateIndicator';
1312
export { default as Dashboard } from './Dashboard';
1413
export { default as Terminal } from './Terminal';
15-
export { default as DevTools } from './DevTools';

src/frontend/src/ui/MainMenu.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,6 @@ export const MainMenuConfig: React.FC<MainMenuConfigProps> = ({
6767
});
6868
};
6969

70-
const handleDevToolsClick = () => {
71-
if (!excalidrawAPI) return;
72-
73-
const devToolsElement = ExcalidrawElementFactory.createEmbeddableElement({
74-
link: "!dev",
75-
width: 800,
76-
height: 500
77-
});
78-
79-
ExcalidrawElementFactory.placeInScene(devToolsElement, excalidrawAPI, {
80-
mode: PlacementMode.NEAR_VIEWPORT_CENTER,
81-
bufferPercentage: 10,
82-
scrollToView: true
83-
});
84-
};
85-
8670
const handleInsertButtonClick = () => {
8771
if (!excalidrawAPI) return;
8872

@@ -262,12 +246,6 @@ export const MainMenuConfig: React.FC<MainMenuConfigProps> = ({
262246
>
263247
Action Button
264248
</MainMenu.Item>
265-
<MainMenu.Item
266-
icon={<FlaskConical />}
267-
onClick={handleDevToolsClick}
268-
>
269-
Dev. Tools
270-
</MainMenu.Item>
271249
</MainMenu.Group>
272250

273251
<MainMenu.Separator />

0 commit comments

Comments
 (0)
0