-
Notifications
You must be signed in to change notification settings - Fork 5
[Content] Improve image thumbnails #3224
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
src/apps/content-editor/src/app/views/ItemList/TableCells/ImageCell.tsx
Outdated
Show resolved
Hide resolved
src/apps/content-editor/src/app/views/ItemList/TableCells/ImageCell.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.
Pull Request Overview
This PR improves the image thumbnail display by introducing file data lookup logic and using a dedicated preview component for non-image files. Key changes include:
- Updating ImageCell to query file details via the media manager and render a FileTypePreview.
- Simplifying the image URL extraction logic in ItemList.
- Correcting the ecoId property to ecoID in the Favicon component.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/apps/content-editor/src/app/views/ItemList/TableCells/ImageCell.tsx | Implements file data retrieval and conditional rendering for image/non-image thumbnails. |
src/apps/content-editor/src/app/views/ItemList/index.tsx | Simplifies image URL extraction by removing legacy resolution logic. |
src/shell/components/Favicon/index.tsx | Updates property name for consistency with store types. |
Comments suppressed due to low confidence (1)
src/apps/content-editor/src/app/views/ItemList/TableCells/ImageCell.tsx:96
- Rendering FileTypePreview without ensuring that fileData is present may lead to UI issues. Consider adding a conditional check to render a placeholder or skeleton until fileData is available.
<FileTypePreview isMediaThumbnail src={fileData?.url} filename={fileData?.filename} updatedAt={fileData?.updated_at} />
Show the appropriate thumbnail for non-image files
Resolves #3206