diff --git a/excalidraw-app/components/AppMainMenu.tsx b/excalidraw-app/components/AppMainMenu.tsx index 7db2f47811..cd0aca2683 100644 --- a/excalidraw-app/components/AppMainMenu.tsx +++ b/excalidraw-app/components/AppMainMenu.tsx @@ -37,7 +37,6 @@ export const AppMainMenu: React.FC<{ )} - diff --git a/packages/element/src/binding.ts b/packages/element/src/binding.ts index f2e57b9b85..292f118b74 100644 --- a/packages/element/src/binding.ts +++ b/packages/element/src/binding.ts @@ -1,8 +1,6 @@ import { KEYS, arrayToMap, - debugDrawLine, - debugDrawPoint, getFeatureFlag, invariant, isTransparent, diff --git a/packages/excalidraw/components/LayerUI.tsx b/packages/excalidraw/components/LayerUI.tsx index 23d80abaaf..ea489887bd 100644 --- a/packages/excalidraw/components/LayerUI.tsx +++ b/packages/excalidraw/components/LayerUI.tsx @@ -63,7 +63,6 @@ import { ImageExportDialog } from "./ImageExportDialog"; import { Island } from "./Island"; import { JSONExportDialog } from "./JSONExportDialog"; import { LaserPointerButton } from "./LaserPointerButton"; -import { Settings } from "./Settings"; import "./LayerUI.scss"; import "./Toolbar.scss"; @@ -555,7 +554,6 @@ const LayerUI = ({ /> )} - {appState.openDialog?.name === "elementLinkSelector" && ( { - switch (category) { - case DEFAULT_SETTINGS_CATEGORIES.experimental: - return 1; - default: - return 10; - } -}; - -type SettingItem = { - label: string; - category: string; - flagKey: "COMPLEX_BINDINGS"; - getValue: () => boolean; - setValue: (value: boolean) => void; -}; - -export const Settings = () => { - const uiAppState = useUIAppState(); - const setAppState = useExcalidrawSetAppState(); - - const settings: SettingItem[] = [ - { - label: t("settings.binding"), - category: DEFAULT_SETTINGS_CATEGORIES.experimental, - flagKey: "COMPLEX_BINDINGS", - getValue: () => getFeatureFlag("COMPLEX_BINDINGS"), - setValue: (value: boolean) => { - const flagsIntegration = - Sentry.getClient()?.getIntegrationByName( - "FeatureFlags", - ); - if (flagsIntegration) { - flagsIntegration.addFeatureFlag("COMPLEX_BINDINGS", value); - } - - setFeatureFlag("COMPLEX_BINDINGS", value); - }, - }, - ]; - - const [settingStates, setSettingStates] = useState>( - () => { - const initialStates: Record = {}; - settings.forEach((setting) => { - initialStates[setting.flagKey] = setting.getValue(); - }); - return initialStates; - }, - ); - - if (uiAppState.openDialog?.name !== "settings") { - return null; - } - - const closeSettings = () => { - setAppState({ - openDialog: null, - }); - }; - - const handleToggle = (setting: SettingItem, checked: boolean) => { - setting.setValue(checked); - setSettingStates((prev) => ({ - ...prev, - [setting.flagKey]: checked, - })); - }; - - const settingsByCategory = settings - .sort( - (a, b) => - getCategoryOrder(a.category) - getCategoryOrder(b.category) || - a.label.localeCompare(b.label), - ) - .reduce((acc, setting) => { - if (!acc[setting.category]) { - acc[setting.category] = []; - } - acc[setting.category].push(setting); - return acc; - }, {} as Record); - - return ( - - -
- {Object.entries(settingsByCategory).map(([category, items]) => ( -
-
{category}
-
- {items.map((setting) => ( -
- handleToggle(setting, checked)} - > - {setting.label} - -
- ))} -
-
- ))} -
-
- ); -}; diff --git a/packages/excalidraw/components/Settings/index.tsx b/packages/excalidraw/components/Settings/index.tsx deleted file mode 100644 index 7d229fa5f4..0000000000 --- a/packages/excalidraw/components/Settings/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { Settings } from "./Settings"; diff --git a/packages/excalidraw/components/icons.tsx b/packages/excalidraw/components/icons.tsx index f5f09058c7..fcc5785598 100644 --- a/packages/excalidraw/components/icons.tsx +++ b/packages/excalidraw/components/icons.tsx @@ -522,16 +522,6 @@ export const ExportIcon = createIcon( modifiedTablerIconProps, ); -// tabler-icons: settings -export const settingsIcon = createIcon( - - - - - , - tablerIconProps, -); - export const HelpIcon = createIcon( diff --git a/packages/excalidraw/components/main-menu/DefaultItems.tsx b/packages/excalidraw/components/main-menu/DefaultItems.tsx index 173e3d7ff2..29a2761a10 100644 --- a/packages/excalidraw/components/main-menu/DefaultItems.tsx +++ b/packages/excalidraw/components/main-menu/DefaultItems.tsx @@ -40,7 +40,6 @@ import { MoonIcon, save, searchIcon, - settingsIcon, SunIcon, TrashIcon, usersIcon, @@ -171,26 +170,6 @@ export const SearchMenu = (opts?: { className?: string }) => { }; SearchMenu.displayName = "SearchMenu"; -export const SettingsMenu = (opts?: { className?: string }) => { - const { t } = useI18n(); - const setAppState = useExcalidrawSetAppState(); - - return ( - { - setAppState({ openDialog: { name: "settings" } }); - }} - aria-label={t("settings.title")} - className={opts?.className} - > - {t("settings.title")} - - ); -}; -SettingsMenu.displayName = "SettingsMenu"; - export const Help = () => { const { t } = useI18n(); diff --git a/packages/excalidraw/locales/en.json b/packages/excalidraw/locales/en.json index 963a57d0aa..d6fd2654bf 100644 --- a/packages/excalidraw/locales/en.json +++ b/packages/excalidraw/locales/en.json @@ -198,11 +198,6 @@ "frames": "Frames", "texts": "Texts" }, - "settings": { - "title": "Settings", - "experimental": "Experimental", - "binding": "Complex bindings" - }, "buttons": { "clearReset": "Reset the canvas", "exportJSON": "Export to file",