Skip to content

[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

Merged
merged 20 commits into from
Apr 24, 2025
Merged

Conversation

finnar-bin
Copy link
Contributor

Show the appropriate thumbnail for non-image files
Resolves #3206

image

@finnar-bin finnar-bin added bug Something isn't working ready PR is complete and ready for deployment labels Feb 17, 2025
@finnar-bin finnar-bin self-assigned this Feb 17, 2025
@finnar-bin finnar-bin requested a review from agalin920 February 28, 2025 04:54
@finnar-bin finnar-bin requested a review from shrunyan March 11, 2025 08:17
@agalin920 agalin920 self-requested a review March 19, 2025 17:08
@agalin920 agalin920 self-requested a review March 19, 2025 17:12
@finnar-bin finnar-bin requested a review from Copilot March 27, 2025 00:52
Copy link
Contributor

@Copilot Copilot AI left a 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} />

@finnar-bin finnar-bin merged commit 1e9c068 into dev Apr 24, 2025
1 check passed
@finnar-bin finnar-bin deleted the fix/3206-update-thumbnail-component branch April 24, 2025 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready PR is complete and ready for deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content: Multi Page Table - File Type Column - Incorrect File Thumbnails
3 participants