Skip to content

✨AI Column: Write jQuery Demo#31582

Merged
Raushen merged 36 commits intoDevExpress:25_2from
dmlvr:dg_25_2_ai_column_jquery_demo
Nov 10, 2025
Merged

✨AI Column: Write jQuery Demo#31582
Raushen merged 36 commits intoDevExpress:25_2from
dmlvr:dg_25_2_ai_column_jquery_demo

Conversation

@dmlvr
Copy link
Contributor

@dmlvr dmlvr commented Nov 4, 2025

No description provided.

@dmlvr dmlvr requested a review from a team as a code owner November 4, 2025 12:22
Copilot AI review requested due to automatic review settings November 4, 2025 12:22
@dmlvr dmlvr self-assigned this Nov 4, 2025
@dmlvr dmlvr added the 25_2 label Nov 4, 2025
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 introduces new demo implementations showcasing AI Column integration for DataGrid and TreeList components using jQuery. The demos demonstrate how to integrate Azure OpenAI services with DevExtreme grid components to add AI-powered columns that can automatically populate data based on AI prompts.

Key Changes

  • New jQuery demo implementations for AI Column feature in both DataGrid and TreeList components
  • Integration with Azure OpenAI API for AI-powered column functionality
  • Custom cell templates for displaying vehicle trademark information with images and popovers
  • Shared CSS styling and data files between both demos

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
apps/demos/Demos/TreeList/AIColumn/JQuery/styles.css Styling for trademark display, category badges, AI cells, and license information popovers
apps/demos/Demos/TreeList/AIColumn/JQuery/index.js TreeList implementation with AI column, custom templates, and hierarchical data structure
apps/demos/Demos/TreeList/AIColumn/JQuery/index.html HTML page structure with script imports for TreeList demo
apps/demos/Demos/TreeList/AIColumn/JQuery/data.js Comprehensive vehicle dataset with 70+ entries and Azure OpenAI configuration
apps/demos/Demos/DataGrid/AIColumn/JQuery/styles.css Identical styling as TreeList for consistent appearance
apps/demos/Demos/DataGrid/AIColumn/JQuery/index.js DataGrid implementation with AI column and custom templates
apps/demos/Demos/DataGrid/AIColumn/JQuery/index.html HTML page structure with script imports for DataGrid demo
apps/demos/Demos/DataGrid/AIColumn/JQuery/data.js Identical vehicle dataset and configuration as TreeList

Copilot AI review requested due to automatic review settings November 4, 2025 14:05
@dmlvr dmlvr requested review from a team as code owners November 4, 2025 14:05
@dmlvr dmlvr force-pushed the dg_25_2_ai_column_jquery_demo branch from 07e3ba6 to 3919def Compare November 4, 2025 14:07
@dmlvr dmlvr removed request for a team November 4, 2025 14:08
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dmitry Lavrinovich <52966626+dmlvr@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 5, 2025 11:01
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 3 comments.

Copilot AI review requested due to automatic review settings November 6, 2025 21:05
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.

Copilot AI review requested due to automatic review settings November 10, 2025 07:56
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 13 changed files in this pull request and generated 4 comments.

Copilot AI review requested due to automatic review settings November 10, 2025 08:15
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 13 changed files in this pull request and generated 3 comments.

Comment on lines +141 to +147
const createCategoryTemplate = ({ CategoryName }) => {
if (!CategoryName) {
return $('<div>').text('');
}

return $('<div>').addClass('category__wrapper').text(CategoryName);
};
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The TreeList implementation has proper null handling for CategoryName, but the DataGrid version (line 131) lacks this check. This inconsistency could lead to displaying 'undefined' text. Both implementations should handle missing data consistently.

Copilot uses AI. Check for mistakes.
Comment on lines 16 to 17
<script src="../../../../node_modules/devextreme-dist/js/dx.ai-integration.js"></script>
<script src="data.js"></script>
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The script loading order differs between DataGrid and TreeList implementations. In DataGrid, dx.ai-integration.js is loaded before data.js (lines 16-17), while in TreeList it's loaded after data.js (lines 16-17). This inconsistency could cause confusion and potential loading issues. Standardize the script loading order across both demos.

Suggested change
<script src="../../../../node_modules/devextreme-dist/js/dx.ai-integration.js"></script>
<script src="data.js"></script>
<script src="data.js"></script>
<script src="../../../../node_modules/devextreme-dist/js/dx.ai-integration.js"></script>

Copilot uses AI. Check for mistakes.
Comment on lines +98 to +100
if (Manufacturer) {
return $('<div>').text(Manufacturer);
}
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The TreeList implementation includes special handling for the Manufacturer field (lines 98-100) that is absent in the DataGrid version. This code duplication with variations suggests these functions should be extracted to a shared utility or the difference should be documented, as it's unclear why TreeList requires this additional logic.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings November 10, 2025 08:46
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 13 changed files in this pull request and generated no new comments.

);
};

const popup = $('#popup').dxPopup({
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we explicitly set the showCloseButton option? By default, it has different values ​​in different themes.

);
};

const popup = $('#popup').dxPopup({
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we explicitly set the showCloseButton option? By default, it has different values ​​in different themes.

Copilot AI review requested due to automatic review settings November 10, 2025 14:51
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 13 changed files in this pull request and generated 1 comment.

Comment on lines 1 to 52
#gridContainer .ai__cell {
background-color: var(--dx-color-main-bg);
}

.trademark__wrapper {
display: flex;
align-items: center;
gap: 8px;
}

.trademark__img-wrapper {
width: 40px;
height: 40px;
border: var(--dx-border-width) solid var(--dx-color-border);
border-radius: var(--dx-border-radius);
cursor: pointer;
}

.trademark__img-wrapper img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
border-radius: var(--dx-border-radius);
}

.trademark__text-wrapper {
width: calc(100% - 48px);
}

.trademark__text {
margin: 0;
padding: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.trademark__text--title {
font-weight: 600;
}

.trademark__text--subtitle {
font-weight: 400;
}

.category__wrapper {
display: inline-block;
padding: 2px 8px;
border-radius: 24px;
background-color: var(--dx-color-separator);
}
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The entire styles.css file for DataGrid is identical to the TreeList styles.css file (52 lines). This is code duplication that should be extracted to a shared stylesheet to improve maintainability. Consider creating a common styles file that both demos can reference.

Suggested change
#gridContainer .ai__cell {
background-color: var(--dx-color-main-bg);
}
.trademark__wrapper {
display: flex;
align-items: center;
gap: 8px;
}
.trademark__img-wrapper {
width: 40px;
height: 40px;
border: var(--dx-border-width) solid var(--dx-color-border);
border-radius: var(--dx-border-radius);
cursor: pointer;
}
.trademark__img-wrapper img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
border-radius: var(--dx-border-radius);
}
.trademark__text-wrapper {
width: calc(100% - 48px);
}
.trademark__text {
margin: 0;
padding: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.trademark__text--title {
font-weight: 600;
}
.trademark__text--subtitle {
font-weight: 400;
}
.category__wrapper {
display: inline-block;
padding: 2px 8px;
border-radius: 24px;
background-color: var(--dx-color-separator);
}
@import "../../common/ai-column-shared.css";

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings November 10, 2025 15:21
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 12 out of 16 changed files in this pull request and generated no new comments.

@Raushen Raushen merged commit 952428a into DevExpress:25_2 Nov 10, 2025
127 of 132 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.

3 participants