-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Feat/new UI assets management #2270
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
@@ -318,6 +318,8 @@ export class SandboxManager { | |||
|
|||
async writeBinaryFile(path: string, content: Buffer | Uint8Array): Promise<boolean> { | |||
const normalizedPath = normalizePath(path); | |||
console.log('normalizedPath', normalizedPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the debug log (console.log('normalizedPath', normalizedPath)) before merging to production.
console.log('normalizedPath', normalizedPath); |
.../web/client/src/app/project/[id]/_components/left-panel/image-tab/hooks/use-folder-images.ts
Show resolved
Hide resolved
} | ||
|
||
for (const [, subfolder] of folder.children) { | ||
moveSubfolder(subfolder, newPath, session); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recursive call to moveSubfolder in moveFolderContents is not awaited, which might lead to unhandled async behavior. Consider awaiting the call or handling its errors explicitly.
moveSubfolder(subfolder, newPath, session); | |
await moveSubfolder(subfolder, newPath, session); |
...client/src/app/project/[id]/_components/left-panel/image-tab/folder/folder-dropdown-menu.tsx
Outdated
Show resolved
Hide resolved
47d7587
to
ece1850
Compare
apps/web/client/src/app/project/[id]/_components/left-panel/image-tab/image-item.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { useEditorEngine } from '@/components/store/editor'; | ||
import { useImagesContext } from '../providers/images-provider'; | ||
|
||
export const useImageDragDrop = (currentFolder?: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this still needs to be implemented?
editorEngine.state.editorMode = EditorMode.DESIGN; | ||
}, [editorEngine.state]); | ||
|
||
const onImageDragEnd = useCallback(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This specifically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Looks like just missing the drag into canvas part and we're good!
* add folder features * update upload function * add confirm modal
Description
Related Issues
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Important
Introduce new UI for managing image assets with folder and image operations, updating related logic and components.
folder-dropdown-menu.tsx
,folder-dropdown.tsx
,folder-list.tsx
,folder-tab.tsx
, andindex.tsx
.image-dropdown-menu.tsx
,image-item.tsx
, andimage-list.tsx
.folder-create-modal.tsx
,folder-delete-modal.tsx
,folder-move-modal.tsx
, andfolder-rename-modal.tsx
.use-folder-images.ts
,use-folder.ts
,use-image-delete.ts
,use-image-drag-drop.ts
,use-image-loading.ts
,use-image-move.ts
,use-image-rename.ts
,use-image-search.ts
, anduse-image-upload.ts
.IMAGE_FOLDER
default topublic
inconstants/src/editor.ts
.ImageManager
inimage/index.ts
to handle new folder structure.SandboxManager
insandbox/index.ts
to support file renaming and moving.MoveToFolder
icon inicons/index.tsx
.settings-modal
components to use new image management logic.This description was created by
for 06989ad. You can customize this summary. It will automatically update as commits are pushed.