From 49a926e08f8a0d9bc8589d56e4fc9a7d059b4a2d Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Thu, 24 Apr 2025 17:54:22 +0530 Subject: [PATCH] fix: Handling erroneous state in Entity item ADS template (#40363) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Handling erroneous state in Entity item ADS template Fixes [#40362](https://github.com/appsmithorg/appsmith/issues/40362) ## Automation /ok-to-test tags="@tag.IDE" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: c9b2437308f4108108ff362f0e8b51220d2dbc17 > Cypress dashboard. > Tags: `@tag.IDE` > Spec: >
Thu, 24 Apr 2025 11:32:13 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Entity names now visually indicate errors by displaying in a distinct color when an error state is present. - **Style** - Enhanced visual feedback for entities with errors, improving clarity when issues occur. --- .../ads/src/Templates/EditableEntityName/EditableEntityName.tsx | 2 ++ .../Templates/EditableEntityName/EditableEntityName.types.ts | 2 ++ .../ads/src/Templates/EntityExplorer/EntityItem/EntityItem.tsx | 2 ++ .../EntityExplorer/EntityListTree/EntityListTree.types.ts | 1 + 4 files changed, 7 insertions(+) diff --git a/app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx b/app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx index 56cfb47d53..c47bf4c2d6 100644 --- a/app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx +++ b/app/client/packages/design-system/ads/src/Templates/EditableEntityName/EditableEntityName.tsx @@ -16,6 +16,7 @@ export const isEllipsisActive = (element: HTMLElement | null) => { export const EditableEntityName = (props: EditableEntityNameProps) => { const { canEdit, + hasError, icon, inputTestId, isEditing, @@ -106,6 +107,7 @@ export const EditableEntityName = (props: EditableEntityNameProps) => { { return ( { normalizeName, onEditComplete, onNameSave, + props.hasError, props.title, startIcon, validateName, diff --git a/app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.types.ts b/app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.types.ts index ba050877e2..a2f01b41b9 100644 --- a/app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.types.ts +++ b/app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.types.ts @@ -6,6 +6,7 @@ export interface EntityListTreeItem { id: string; name: string; type: string; + hasError?: boolean; } export interface EntityListTreeProps {