Skip to content
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

Merged
merged 8 commits into from
Feb 19, 2025

Conversation

FadhlanR
Copy link
Contributor

Screenshot 2025-02-17 at 16 13 34

Copy link

github-actions bot commented Feb 17, 2025

Host Test Results

    1 files  ±0      1 suites  ±0   23m 12s ⏱️ +31s
769 tests ±0  767 ✔️ ±0  2 💤 ±0  0 ±0 
774 runs  ±0  772 ✔️ ±0  2 💤 ±0  0 ±0 

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.
Chrome 133.0 ‑ Acceptance | AI Assistant tests: can display and remove auto attached card
Chrome 133.0 ‑ Acceptance | AI Assistant tests: can display and remove auto attached file

♻️ This comment has been updated with latest results.

@FadhlanR FadhlanR marked this pull request as ready for review February 17, 2025 09:30
@FadhlanR FadhlanR requested review from jurgenwerk and a team February 17, 2025 09:31
Copy link
Contributor

@lukemelia lukemelia left a 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.

@FadhlanR
Copy link
Contributor Author

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).

Copy link
Contributor

@jurgenwerk jurgenwerk 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 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>
Copy link
Contributor

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.

@FadhlanR
Copy link
Contributor Author

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?

@jurgenwerk here's the screenshot:

Screenshot 2025-02-18 at 19 06 39

@jurgenwerk
Copy link
Contributor

jurgenwerk commented Feb 18, 2025

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.

Copy link
Contributor

@burieberry burieberry left a 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

@FadhlanR FadhlanR merged commit 76d880a into main Feb 19, 2025
48 checks passed
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.

4 participants