-
Notifications
You must be signed in to change notification settings - Fork 654
Chat FU: Integrate FileView component #31496
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
Chat FU: Integrate FileView component #31496
Conversation
e01b75f to
0e85dea
Compare
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.
Pull Request Overview
This PR integrates the FileView component into the Chat MessageBubble to support displaying file attachments. The implementation adds an attachments container to message bubbles and introduces the onAttachmentDownload callback that propagates from Chat through MessageList and MessageGroup down to MessageBubble.
Key changes:
- Added FileView integration to MessageBubble with new attachments container and rendering logic
- Implemented
onAttachmentDownloadevent handler propagation through the component hierarchy - Updated styling to use CSS Grid layout for file attachments with configurable spacing
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/messageBubble.tests.js | Added comprehensive tests for FileView rendering, attachments handling, and download callback |
| packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/messageBubble.markup.tests.js | Added test verifying attachments container element exists in markup |
| packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/chat.tests.js | Added tests for onAttachmentDownload event handling at Chat component level |
| packages/devextreme/js/__internal/ui/chat/messagelist.ts | Added onAttachmentDownload property and propagated it to MessageGroup |
| packages/devextreme/js/__internal/ui/chat/messagegroup.ts | Added onAttachmentDownload property and passed it to MessageBubble options |
| packages/devextreme/js/__internal/ui/chat/messagebubble.ts | Core implementation: added attachments container, FileView integration, and attachment rendering logic |
| packages/devextreme/js/__internal/ui/chat/file_view/file_view.ts | Removed unused CHAT_FILE_VIEW_ITEM_CLASS constant |
| packages/devextreme/js/__internal/ui/chat/file_view/file.ts | Exported CHAT_FILE_NAME_CLASS and CHAT_FILE_SIZE_CLASS constants for testing |
| packages/devextreme/js/__internal/ui/chat/chat.ts | Added onAttachmentDownload action creation, handler, and option change handling |
| packages/devextreme-scss/scss/widgets/material/chat/_sizes.scss | Added $chat-file-view-margin-top variable |
| packages/devextreme-scss/scss/widgets/material/chat/_index.scss | Updated chat-fileview mixin call with new parameters |
| packages/devextreme-scss/scss/widgets/generic/chat/_sizes.scss | Added $chat-file-view-margin-top variable |
| packages/devextreme-scss/scss/widgets/generic/chat/_index.scss | Updated chat-fileview mixin call with new parameters |
| packages/devextreme-scss/scss/widgets/fluent/chat/_sizes.scss | Added $chat-file-view-margin-top variable |
| packages/devextreme-scss/scss/widgets/fluent/chat/_index.scss | Updated chat-fileview mixin call with new parameters |
| packages/devextreme-scss/scss/widgets/base/chat/layout/chat-fileview/_mixins.scss | Added margin-top and grid-template-columns to fileview mixin |
| packages/devextreme-scss/scss/widgets/base/chat/layout/chat-fileview/_index.scss | Changed layout from flex to grid display |
packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/messageBubble.markup.tests.js
Show resolved
Hide resolved
packages/devextreme-scss/scss/widgets/base/chat/layout/chat-fileview/_mixins.scss
Outdated
Show resolved
Hide resolved
6cf2481 to
40f613b
Compare
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.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
packages/devextreme/js/__internal/ui/chat/messagegroup.ts:1
- [nitpick] The order of properties has changed without an apparent reason. Properties should maintain consistent ordering to match the original structure and improve code readability.
import type { Format } from '@js/common/core/localization';
40f613b to
aeaba63
Compare
aeaba63 to
af49a16
Compare
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.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/chat.tests.js
Outdated
Show resolved
Hide resolved
af49a16 to
3a6baa1
Compare
3a6baa1 to
9b82cb5
Compare
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.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
dd28590 to
447c0ec
Compare
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.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.
No description provided.