From 05c939d41eebca73125a1ae793b00dc498660cbc Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 23 Aug 2023 21:15:09 +1000 Subject: [PATCH] feat(ui): remove canvas beta layout --- .../SettingsModal/SettingsModal.tsx | 22 +------ .../UnifiedCanvas/UnifiedCanvasContent.tsx | 60 ++----------------- 2 files changed, 5 insertions(+), 77 deletions(-) diff --git a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx index 2db0b9551a..9f9f9fc58a 100644 --- a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx +++ b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx @@ -31,7 +31,6 @@ import { } from 'features/system/store/systemSlice'; import { setShouldShowProgressInViewer, - setShouldUseCanvasBetaLayout, setShouldUseSliders, } from 'features/ui/store/uiSlice'; import { isEqual } from 'lodash-es'; @@ -69,18 +68,13 @@ const selector = createSelector( shouldUseWatermarker, } = system; - const { - shouldUseCanvasBetaLayout, - shouldUseSliders, - shouldShowProgressInViewer, - } = ui; + const { shouldUseSliders, shouldShowProgressInViewer } = ui; const { shouldShowAdvancedOptions } = generation; return { shouldConfirmOnDelete, enableImageDebugging, - shouldUseCanvasBetaLayout, shouldUseSliders, shouldShowProgressInViewer, consoleLogLevel, @@ -99,7 +93,6 @@ const selector = createSelector( type ConfigOptions = { shouldShowDeveloperSettings: boolean; shouldShowResetWebUiText: boolean; - shouldShowBetaLayout: boolean; shouldShowAdvancedOptionsSettings: boolean; shouldShowClearIntermediates: boolean; shouldShowLocalizationToggle: boolean; @@ -116,7 +109,6 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => { const { t } = useTranslation(); const [countdown, setCountdown] = useState(3); - const shouldShowBetaLayout = config?.shouldShowBetaLayout ?? true; const shouldShowDeveloperSettings = config?.shouldShowDeveloperSettings ?? true; const shouldShowResetWebUiText = config?.shouldShowResetWebUiText ?? true; @@ -158,7 +150,6 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => { const { shouldConfirmOnDelete, enableImageDebugging, - shouldUseCanvasBetaLayout, shouldUseSliders, shouldShowProgressInViewer, consoleLogLevel, @@ -306,17 +297,6 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => { ) } /> - {shouldShowBetaLayout && ( - ) => - dispatch(setShouldUseCanvasBetaLayout(e.target.checked)) - } - /> - )} {shouldShowLocalizationToggle && ( { + [stateSelector], + ({ canvas }) => { const { doesCanvasNeedScaling } = canvas; - const { shouldUseCanvasBetaLayout } = ui; return { doesCanvasNeedScaling, - shouldUseCanvasBetaLayout, }; }, defaultSelectorOptions @@ -37,8 +32,7 @@ const droppableData: CanvasInitialImageDropData = { const UnifiedCanvasContent = () => { const dispatch = useAppDispatch(); - const { doesCanvasNeedScaling, shouldUseCanvasBetaLayout } = - useAppSelector(selector); + const { doesCanvasNeedScaling } = useAppSelector(selector); const { isOver, @@ -59,52 +53,6 @@ const UnifiedCanvasContent = () => { return () => window.removeEventListener('resize', resizeCallback); }, [dispatch]); - if (shouldUseCanvasBetaLayout) { - return ( - - - - - - - {doesCanvasNeedScaling ? : } - {isValidDrop(droppableData, active) && ( - - )} - - - - - ); - } - return (