Skip to content

feat: Update AttachmentList to support Illustrations for preview and update invalid styling for preview only - #10452

Merged
LFDanLu merged 8 commits into
mainfrom
update_attachments_testing
Aug 12, 2026
Merged

feat: Update AttachmentList to support Illustrations for preview and update invalid styling for preview only#10452
LFDanLu merged 8 commits into
mainfrom
update_attachments_testing

Conversation

@LFDanLu

@LFDanLu LFDanLu commented Aug 11, 2026

Copy link
Copy Markdown
Member

From testing + local testing. Updates AttachmentList to use Illustrations instead of Icons for previews, updates invalid styling for preview only attachments (opacity + adds invalid icon to center of the attachment), and removes reliance on HorizontalCard since that isn't meant have the same styling (S2 vs AI styling)

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Test the "Mixed attachments" story across invalid/in progress upload/etc. Also test isInvalid + only image preview via the "AI attachments" story.

🧢 Your Project:

RSP

@rspbot

rspbot commented Aug 11, 2026

Copy link
Copy Markdown

@snowystinger snowystinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

fully delete the HorizontalCard file?

couple quick things

Comment thread packages/@react-spectrum/ai/src/AttachmentList.tsx Outdated
Comment thread packages/@react-spectrum/ai/src/AttachmentList.tsx
Comment thread packages/@react-spectrum/ai/src/AttachmentList.tsx Outdated
@rspbot

rspbot commented Aug 12, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Aug 12, 2026

Copy link
Copy Markdown

Agent Skills Changes

Modified (2)
Install

React Spectrum S2:

npx skills add https://d1pzu54gtk2aed.cloudfront.net/pr/cff01057bbcc19d0513daf08b0c33037e6b434ca/

React Aria:

npx skills add https://d5iwopk28bdhl.cloudfront.net/pr/cff01057bbcc19d0513daf08b0c33037e6b434ca/

@snowystinger snowystinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks pretty good. I assume the invalid to the right of the text is by design? It'd be nice if it replaced the thumb/icon just like the square ones, it'd take up less space and wouldn't shift things if it became invalid then valid or vice versa

@LFDanLu

LFDanLu commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

@snowystinger I actually can't find the design for the invalid state when there is text in the attachment (or the designs for the attachment at all haha). The replacing thumb/icon with the error icon was made up by me btw haha, but if ppl like it I think we could roll with that across the board. One thing to keep in mind though is that Coworker has a "valid" state too to signify that validation has been carried out which occupies a similar position and I can see an argument of not replacing the thumbnail in that case
image

@LFDanLu
LFDanLu added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit 059134e Aug 12, 2026
31 checks passed
@LFDanLu
LFDanLu deleted the update_attachments_testing branch August 12, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants