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

Feature/55712 file attachment input #366

Merged
merged 11 commits into from
Jan 24, 2024
Merged

Conversation

sushmi21
Copy link
Collaborator

@sushmi21 sushmi21 commented Jan 18, 2024

This PR adds the File attachment input.

  • You should be able to drag and drop the files and attach it.
  • You should be able to click attach button and browse for files to attach
  • If multiple files are added, you should be able to horizontally scroll them. (Scroll bar appears only on hover)
  • Please also try to attach a file with the large name. There are no max-width applied for the file preview chips now. Please let me know if we need to enforce a max-width.
  • Please check Figma prototypes
  • Please also check the failing file upload scenario. No prototype provided for this. We could show the file name in red or show 'Failed Upload' as in version 2 (current implementation in this PR). Please let me know your opinion.

To test, please use configure a file storage provider in your endpoint editor or use this endpoint: https://endpoint-dev.cognigy.ai/36d5dfe244e2bf217d61a7c381b16c16ab25f0aac9a748351937d8ab9aa46452. If you get CORS error, please run cognigy-ai in the cluster and import this package. Create a flow and add this flow to the exported endpoint. And then use the endpoint url in webchat
Endpoint-Web_2024-01-22_13-31-31.zip

@sushmi21 sushmi21 requested review from dshire, kwinto and fabclj January 22, 2024 12:10
Copy link
Member

@dshire dshire left a comment

Choose a reason for hiding this comment

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

The code changes look good to me. I noticed 2 things we need to change:

Screenshot from 2024-01-24 10-57-35

  1. The file preview bubble looks stylistically too different from the others, need rework
  2. If I upload files with a message and send, I only see the message, not the file upload preview

Both need to be changed in chat-components repo I guess? How do you want to tackle this, maybe an immediate follow-up?

@sushmi21
Copy link
Collaborator Author

The code changes look good to me. I noticed 2 things we need to change:

Screenshot from 2024-01-24 10-57-35

  1. The file preview bubble looks stylistically too different from the others, need rework
  2. If I upload files with a message and send, I only see the message, not the file upload preview

Both need to be changed in chat-components repo I guess? How do you want to tackle this, maybe an immediate follow-up?

Yes, the file output has to be handled separately and in the chat components repo. This PR is just about File inputs.

Copy link
Member

@dshire dshire left a comment

Choose a reason for hiding this comment

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

chat-components fixes will follow-up

@sushmi21 sushmi21 merged commit 9af6515 into v3 Jan 24, 2024
1 check failed
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