-
Notifications
You must be signed in to change notification settings - Fork 9
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
Show the attached file in message bubble #2153
Show the attached file in message bubble #2153
Conversation
FadhlanR
commented
Feb 17, 2025
Host Test Results 1 files ±0 1 suites ±0 23m 12s ⏱️ +31s Results for commit 91bbe05. ± Comparison against base commit 22ebcca. This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
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.
I'm not sure how practical it is, but since FileDef and CardDef have a common base class, it would be nice to use polymorphism as much as possible to avoid having to repeat patterns for each, like CardPill/FilePill.
We decided to have a separate component for this because we'll be pulling data from different fields, and we want to avoid too many conditions. @jurgenwerk and I discussed it here: #2126 (comment). |
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.
Looks good just a minor comment. Can you also show a screenshot of how it looks like when there are both cards and files present?
@@ -215,6 +218,14 @@ export default class AiAssistantMessage extends Component<Signature> { | |||
</div> | |||
{{/if}} | |||
|
|||
{{#if @resources.files.length}} | |||
<div class='cards' data-test-message-files> |
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.
Class name cards implies there will be cards here, but actually there are files. Would be good to rename the class.
@jurgenwerk here's the screenshot: |
The vertical and horizontal padding between pills is different which can be improved. And this looks different compared to how this collection is shown in the attachment picker. The pills are displayed inline there, regardless of its type. I would expect it to look the same here. |
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.
Agree with @jurgenwerk about the visual treatment, otherwise looks good