-
Notifications
You must be signed in to change notification settings - Fork 22
feat: refine UI for uploading wire cells assets - WPB-17604 #3428
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
base: develop
Are you sure you want to change the base?
Conversation
# Conflicts: # WireCells/Tests/WireCellsUITests/Components/Previews/WireCellsImageAttachmentPreviewTests.swift # WireCells/Tests/WireCellsUITests/Components/UploadPreviews/UploadDocumentPreviewTests.swift # WireDebug/Sources/WireViewsDebugUI/WireCellsUIDebugView.swift # WireMessaging/Sources/WireMessagingUI/WireCells/Components/CircularIconButtonStyle.swift # WireMessaging/Sources/WireMessagingUI/WireCells/Components/DeleteItemButtonViewModifier.swift # WireMessaging/Sources/WireMessagingUI/WireCells/Components/LocalImagePreview.swift # WireMessaging/Sources/WireMessagingUI/WireCells/Components/UploadPreviews/UploadDocumentPreview.swift # WireMessaging/Sources/WireMessagingUI/WireCells/Components/UploadPreviews/UploadImagePreview.swift # WireMessaging/Sources/WireMessagingUI/WireCells/Components/UploadPreviews/UploadVideoPreview.swift # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testColorSchemeVariantsEmptyState.dark.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testColorSchemeVariantsEmptyState.light.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.accessibility1.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.accessibility2.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.accessibility3.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.accessibility4.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.accessibility5.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.large.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.medium.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.small.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.xLarge.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.xSmall.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.xxLarge.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadDocumentPreviewTests/testDynamicTypeVariantsEmptyState.xxxLarge.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testColorSchemeVariantsEmptyState.dark.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testColorSchemeVariantsEmptyState.light.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.accessibility1.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.accessibility2.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.accessibility3.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.accessibility4.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.accessibility5.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.large.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.medium.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.small.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.xLarge.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.xSmall.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.xxLarge.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadImagePreviewTests/testDynamicTypeVariantsEmptyState.xxxLarge.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testColorSchemeVariantsEmptyState.dark.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testColorSchemeVariantsEmptyState.light.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDurationFormatVariantsEmptyState.long-duration.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDurationFormatVariantsEmptyState.short-duration.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.accessibility1.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.accessibility2.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.accessibility3.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.accessibility4.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.accessibility5.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.large.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.medium.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.small.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.xLarge.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.xSmall.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.xxLarge.png # WireMessaging/Tests/WireMessagingTests/Resources/ReferenceImages/UploadVideoPreviewTests/testDynamicTypeVariantsEmptyState.xxxLarge.png # WireMessaging/Tests/WireMessagingTests/WireCells/UITests/Components/UploadPreviews/UploadDocumentPreviewTests.swift # WireMessaging/Tests/WireMessagingTests/WireCells/UITests/Components/UploadPreviews/UploadImagePreviewTests.swift # WireMessaging/Tests/WireMessagingTests/WireCells/UITests/Components/UploadPreviews/UploadVideoPreviewTests.swift
Currently they are not in a target and not running
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 refines the UI for uploading wire cells assets by replacing placeholder boxes with actual preview components for different file types. The changes improve the user experience by providing meaningful visual previews instead of generic placeholders.
- Replaces generic placeholder preview components with specific attachment preview components for images, videos, and documents
- Updates the attachments container height to accommodate the refined UI components
- Adds comprehensive test coverage with snapshot tests for various configuration states
Reviewed Changes
Copilot reviewed 118 out of 157 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
InputBar.swift | Increases attachment container height from 74 to 82 pixels |
ConversationInputBarViewController.swift | Adds WireFoundation import and environment configuration |
ColorTheme.swift | Makes secondary button color properties public for component access |
Multiple test files | Removes old placeholder test files and adds new component-specific tests |
Preview components | Replaces upload preview components with wire cells attachment preview components |
AttachmentsCarousel.swift | Updates carousel to use new preview components with proper styling |
FileIcon.swift | Adds file type icon mapping functionality |
Resource files | Adds file icon assets and reference images for snapshot tests |
} else if value.conforms(to: .audio) { | ||
self = .audio(samples: []) | ||
self = .video(thumbnail: nil) // FIXME: [WPB-19267] Set video thumbnail data | ||
} else if value.conforms(to: .audio, ) { |
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.
There is an extra comma after .audio which will cause a compilation error. Remove the trailing comma.
} else if value.conforms(to: .audio, ) { | |
} else if value.conforms(to: .audio) { |
Copilot uses AI. Check for mistakes.
Test Results2 116 tests 2 088 ✅ 3m 8s ⏱️ Results for commit adcd6d7. |
Issue
This PR refines the UI previews that are shown when uploading assets. Previously only placeholder boxes were shown.
ScreenRecording_08-05-2025.17-00-40_1.mov
Specifically it:
UploadDocumentPreview
has been replaced withWireCellsImageAttachmentPreview
. The naming convention has changed because this same type will likely also be used elsewhere, not just for uploads. See the snapshots prefixedWireCells*
to understand how these previews look.AttachmentsCarousel.swift
to have correct styling and to make use of the above previews.UTType
and a files extension.Additionally this PR moves
channel history
related tests to a correct location.They had accidentally been left in a dead folder and were not part of any test target.My apologies for the size of this PR.
Testing
Play around with the swift UI previews in
AttachmentsCarousel.swift
Checklist
[WPB-XXX]
.