Skip to content

Conversation

@r-farkhutdinov
Copy link
Contributor

No description provided.

@r-farkhutdinov r-farkhutdinov self-assigned this Oct 30, 2025
@r-farkhutdinov r-farkhutdinov force-pushed the 25_2_file_show_download_button branch from 28e5670 to 7a84cf9 Compare October 30, 2025 15:15
@r-farkhutdinov r-farkhutdinov marked this pull request as ready for review October 30, 2025 15:17
@r-farkhutdinov r-farkhutdinov requested a review from a team as a code owner October 30, 2025 15:17
Copilot AI review requested due to automatic review settings October 30, 2025 15:17
Copy link
Contributor

Copilot AI left a 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 pull request implements conditional rendering of the attachment download button in the Chat component. The download button is now only shown when the onAttachmentDownload callback is provided, preventing users from attempting to download attachments without a proper handler.

Key changes:

  • Introduces showAttachmentDownloadButton option that propagates from Chat through MessageList, MessageGroup, MessageBubble, FileView to File components
  • The option is automatically set based on whether onAttachmentDownload callback is provided
  • Updates tests to explicitly set showDownloadButton: true where download functionality is being tested

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/devextreme/js/__internal/ui/chat/chat.ts Derives showAttachmentDownloadButton from onAttachmentDownload presence and propagates it to MessageList
packages/devextreme/js/__internal/ui/chat/messagelist.ts Adds showAttachmentDownloadButton property and passes it to MessageGroup components
packages/devextreme/js/__internal/ui/chat/messagegroup.ts Adds showAttachmentDownloadButton property and passes it to MessageBubble components
packages/devextreme/js/__internal/ui/chat/messagebubble.ts Adds showAttachmentDownloadButton property, stores FileView reference, and handles runtime option changes
packages/devextreme/js/__internal/ui/chat/file_view/file_view.ts Adds showDownloadButton property and passes it to File components
packages/devextreme/js/__internal/ui/chat/file_view/file.ts Implements conditional button rendering based on showDownloadButton option
packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/messageBubble.tests.js Updates tests to set showAttachmentDownloadButton: true
packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/fileView.tests.js Updates tests to set showDownloadButton: true
packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/file.tests.js Updates test setup and adds guards for button access
packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/file.markup.tests.js Adds tests for showDownloadButton option behavior
packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/chat.tests.js Adds test for button hiding when callback is undefined

@r-farkhutdinov r-farkhutdinov force-pushed the 25_2_file_show_download_button branch from 7a84cf9 to 69e896d Compare October 30, 2025 15:29
Copilot AI review requested due to automatic review settings October 30, 2025 17:07
@r-farkhutdinov r-farkhutdinov marked this pull request as draft October 30, 2025 17:10
@r-farkhutdinov r-farkhutdinov force-pushed the 25_2_file_show_download_button branch from dd2ddae to a2aad1b Compare October 30, 2025 17:12
Copy link
Contributor

Copilot AI left a 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 9 out of 9 changed files in this pull request and generated 4 comments.

@r-farkhutdinov r-farkhutdinov marked this pull request as ready for review October 30, 2025 17:18
@marker-dao marker-dao merged commit 8cc48ff into DevExpress:25_2 Oct 30, 2025
113 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants