[MT-23017] Match attachment disclosure behavior to Mailtrap#37
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the inline file-chip grid with the falcon sandbox pattern: an "Attachments (N)" link under the date/size in the message header that toggles a right-aligned dropdown. Each row is a full-width download link — filename plus human size in a two-column CSS table, 45px rows — closing on outside click or toggle. Panel and text styling follow SettingsMenu (13px, fg/fg-muted, raised surface) so overlays read the same across the app. The file-type icons from the chip iteration are now unused and removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAttachments are now rendered as a dropdown in the message header. The component handles Escape, blur, outside clicks, and focus restoration, with new fixture and integration tests covering these interactions. ChangesAttachments dropdown
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant MessageHeader
participant Attachments
User->>MessageHeader: Opens the attachment control
MessageHeader->>Attachments: Displays the attachment menu
User->>Attachments: Presses Escape
Attachments->>Attachments: Closes the menu
Attachments->>User: Restores focus to the trigger
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
roman-adamchik
left a comment
There was a problem hiding this comment.
lgtm. could've been used some base-ui component for popup.
What & why
Implements MT-23017, a sub-task of MT-22849.
Attachments now use the Mailtrap-style disclosure list with readable filenames/sizes and full-row download links. The interaction lifecycle closes on outside click, focus leaving, or Escape; Escape restores trigger focus and is consumed before the message view's global navigation handler.
Impact
Attachment downloads are clearer and the disclosure works predictably with mouse and keyboard navigation.
Screenshots
Verification
npm test— 62 tests passednpm run lint— 0 errors; 4 existing warningsnpm run build— passedgit diff --check main...fix/mt-23017-attachments— passedSummary by CodeRabbit
New Features
Accessibility
Tests