修复上传素材切换侧栏

上传到画布后保持当前左侧侧栏状态。

补充上传工作流和画布 drop 回归断言。

更新跟踪记录并完成浏览器回归。
This commit is contained in:
2026-06-17 14:59:02 +08:00
parent 84818f9bd5
commit 7a77ab4df7
5 changed files with 14 additions and 13 deletions

View File

@@ -17,7 +17,6 @@ import type {
EditorAsset,
EditorAssetFolder,
GenerateDialogState,
SidebarPanel,
UploadTarget,
} from './ImageCanvasEditorTypes';
import { isImageFile, readImageFileAsDataUrl } from './ImageCanvasFileModel';
@@ -45,7 +44,6 @@ type UseImageCanvasUploadWorkflowOptions = {
setAssets: Dispatch<SetStateAction<EditorAsset[]>>;
setLayers: Dispatch<SetStateAction<CanvasLayer[]>>;
setGenerateDialog: Dispatch<SetStateAction<GenerateDialogState | null>>;
setActiveSidebarPanel: Dispatch<SetStateAction<SidebarPanel | null>>;
appendCanvasLayersWithResources: (nextLayers: CanvasLayer[]) => void;
selectSingleLayer: (layerId: string | null) => void;
};
@@ -78,7 +76,6 @@ export function useImageCanvasUploadWorkflow({
setAssets,
setLayers,
setGenerateDialog,
setActiveSidebarPanel,
appendCanvasLayersWithResources,
selectSingleLayer,
}: UseImageCanvasUploadWorkflowOptions) {
@@ -316,7 +313,6 @@ export function useImageCanvasUploadWorkflow({
if (options.addToCanvas) {
appendCanvasLayersWithResources([nextLayer]);
selectSingleLayer(nextLayer.id);
setActiveSidebarPanel('layers');
}
setAssets((currentAssets) =>
@@ -445,7 +441,6 @@ export function useImageCanvasUploadWorkflow({
canvasSize.width,
openEditorLoginModal,
selectSingleLayer,
setActiveSidebarPanel,
setAssetFolders,
setAssets,
setLayers,