Skip to content

fix: attachment preview header layout issues - WPB-23931#4491

Open
WilhelmOks wants to merge 4 commits intorelease/cycle-4.17from
fix/WPB-23931-large-attachment-preview-header-padding
Open

fix: attachment preview header layout issues - WPB-23931#4491
WilhelmOks wants to merge 4 commits intorelease/cycle-4.17from
fix/WPB-23931-large-attachment-preview-header-padding

Conversation

@WilhelmOks
Copy link
Copy Markdown
Collaborator

@WilhelmOks WilhelmOks commented Mar 25, 2026

BugWPB-23931 [iOS][Files in conversation] Remove top padding from video and files thumbnails

Issue

In the file attachment header, the space between the first line (file icon and file type) and the second line (file name) was too large.
The issue was that in many places the size was set to take up maximum space, either through maxHeight: .infinity or through Spacer(). Then to reduce the height, an explicit height was set (height: 74).
This not only caused the layout issues but also broke the UI when the font size was set to very large.
I fixed it by removing the indefinite growing and the explicit heights.

Additionally I added a gray background and some padding in SwiftUI Previews to better see if there are issues with the layout.

Testing

Send messages with attachments of different files and check if the header layout is ok.
Especially the space between the file type and the file name should not be too large.
Most important to check are video files and documents.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 2026

Test Results

2 140 tests   2 113 ✅  4m 6s ⏱️
  353 suites     27 💤
    2 files        0 ❌

Results for commit c1574ff.

♻️ This comment has been updated with latest results.

Summary: workflow run #23584918494
Allure report (download zip): html-report-28824-fix_WPB-23931-large-attachment-preview-header-padding

@datadog-wireapp
Copy link
Copy Markdown

datadog-wireapp bot commented Mar 25, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c1574ff | Docs | Was this helpful? Give us feedback!

Copy link
Copy Markdown
Contributor

@jullianm jullianm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does fix the issue in conversation previews however it also changes the layout (height) of draft previews which might be acceptable but I think it's better to keep the draft previews as it was before

@WilhelmOks
Copy link
Copy Markdown
Collaborator Author

WilhelmOks commented Mar 25, 2026

It does fix the issue in conversation previews however it also changes the layout (height) of draft previews which might be acceptable but I think it's better to keep the draft previews as it was before

In the latest commit I changed it for the draft previews to keep the same bubble height as the other elements in the list

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@jullianm jullianm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants