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

[front] - refactor(InputBar): attachments #11319

Merged
merged 5 commits into from
Mar 12, 2025
Merged

Conversation

JulesBelveze
Copy link
Contributor

@JulesBelveze JulesBelveze commented Mar 11, 2025

Description

This PR refactors the attachments functionality in the input bar by consolidating the InputBarCitations and InputBarNodeAttachments components into a single unified InputBarAttachments component.

The implementation uses a common Citation component from sparkle to display both file and knowledge attachments consistently.

Screenshot 2025-03-12 at 09 23 59

Risk

Low

Deploy Plan

  • Deploy front-edge
  • Deploy front

…mline input bar attachment components

 - Consolidate file and node attachment handling into a single InputBarAttachments component
 - Remove InputBarNodeAttachments and InputBarCitations components in favor of unified attachment system
 - Introduce InputBarAttachmentsPicker for selecting and uploading attachments with search capabilities

[front/components/assistant/conversation/input_bar/InputBarAttachmentsPicker] - feature: add input bar attachments picker for files and nodes

 - Implement a dropdown menu with search functionality to attach files or nodes to the input bar
 - Enable file uploading directly from the input bar with a new UI component for better user experience
 - Add file path display and improve the tooltip information for node attachments
 - Include a conditional visual based on the dataSource type of attachments
 - Implement a Tooltip component for better clarity and information display
 - Refactor the attachment visual rendering logic to accommodate new features
Copy link
Contributor

@philipperolet philipperolet left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Nit: the picker doesn't close when we upload from computer

…chments

 - Wrap the generation of fileAttachments and nodeAttachments with useMemo to optimize performance
 - Prevent unnecessary recalculations of attachments when props do not change
…er dropdown

 - Added state control to open and close the attachments picker with button click or interaction outside
 - Cleaned the search when closing the dropdown for a neater user experience
 - Auto-closing the dropdown upon node selection or file upload to streamline the UI flow
@JulesBelveze JulesBelveze merged commit efe7596 into main Mar 12, 2025
6 checks passed
@JulesBelveze JulesBelveze deleted the front/polish-attachments branch March 12, 2025 09:33
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