diff --git a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js index 6496e4ea21..1aff14d101 100644 --- a/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js +++ b/app/client/cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_PropertyPane_spec.js @@ -515,4 +515,19 @@ describe("Table Widget V2 property pane feature validation", function () { cy.backFromPropertyPanel(); cy.makeColumnEditable("orderAmount"); }); + + it("15. Verify default prompt message for min field", function () { + cy.openPropertyPane("tablewidgetv2"); + cy.makeColumnEditable("orderAmount"); + cy.editColumn("orderAmount"); + cy.changeColumnType("Number"); + propPane.UpdatePropertyFieldValue("Min", "test"); + cy.get(".t--property-control-min .t--no-binding-prompt > span").should( + "have.text", + "Access the current cell using {{currentRow.columnName}}", + ); + cy.changeColumnType("Plain Text"); + cy.backFromPropertyPanel(); + cy.makeColumnEditable("orderAmount"); + }); }); diff --git a/app/client/src/ce/constants/messages.ts b/app/client/src/ce/constants/messages.ts index d305b69ed3..afb16e97cd 100644 --- a/app/client/src/ce/constants/messages.ts +++ b/app/client/src/ce/constants/messages.ts @@ -922,6 +922,8 @@ export const NAV_DESCRIPTION = () => `Navigate to any page, widget or file across this project.`; export const ACTION_OPERATION_DESCRIPTION = () => `Create a new Query, API or JS Object`; +export const TABLE_WIDGET_VALIDATION_ASSIST_PROMPT = () => + `Access the current cell using `; export const TRIGGER_ACTION_VALIDATION_ERROR = ( functionName: string, diff --git a/app/client/src/components/propertyControls/TableInlineEditValidPropertyControl.tsx b/app/client/src/components/propertyControls/TableInlineEditValidPropertyControl.tsx index d0740cd5dd..50ed2ddaa1 100644 --- a/app/client/src/components/propertyControls/TableInlineEditValidPropertyControl.tsx +++ b/app/client/src/components/propertyControls/TableInlineEditValidPropertyControl.tsx @@ -7,10 +7,16 @@ import { } from "widgets/TableWidgetV2/constants"; import TableInlineEditValidationControlProperty, { CurlyBraces, + StyledCode, InputText, + PromptMessage, } from "./TableInlineEditValidationControl"; import { isString } from "lodash"; import { JSToString, stringToJS } from "./utils"; +import { + createMessage, + TABLE_WIDGET_VALIDATION_ASSIST_PROMPT, +} from "@appsmith/constants/messages"; const bindingPrefix = `{{ ( @@ -78,11 +84,12 @@ class TableInlineEditValidPropertyControl extends TableInlineEditValidationContr label={label} onChange={this.onTextChange} promptMessage={ - <> - Access the current cell using {"{{"} - currentRow.columnName + + {createMessage(TABLE_WIDGET_VALIDATION_ASSIST_PROMPT)} + {"{{"} + currentRow.columnName {"}}"} - + } theme={theme} value={value} diff --git a/app/client/src/components/propertyControls/TableInlineEditValidationControl.tsx b/app/client/src/components/propertyControls/TableInlineEditValidationControl.tsx index 85aef8ac50..c7e13c6aaf 100644 --- a/app/client/src/components/propertyControls/TableInlineEditValidationControl.tsx +++ b/app/client/src/components/propertyControls/TableInlineEditValidationControl.tsx @@ -20,13 +20,22 @@ import { ORIGINAL_INDEX_KEY, PRIMARY_COLUMN_KEY_VALUE, } from "widgets/TableWidgetV2/constants"; +import { Colors } from "constants/Colors"; +import { + createMessage, + TABLE_WIDGET_VALIDATION_ASSIST_PROMPT, +} from "@appsmith/constants/messages"; -const PromptMessage = styled.span` +export const PromptMessage = styled.span` line-height: 17px; `; + +export const StyledCode = styled.span` + color: ${Colors.PRIMARY_ORANGE}; +`; + export const CurlyBraces = styled.span` - color: ${(props) => props.theme.colors.codeMirror.background.hoverState}; - background-color: #ffffff; + color: ${Colors.PRIMARY_ORANGE}; border-radius: 2px; padding: 2px; margin: 0px 2px; @@ -146,6 +155,14 @@ class TableInlineEditValidationControl extends BaseControl + {createMessage(TABLE_WIDGET_VALIDATION_ASSIST_PROMPT)} + {"{{"} + currentRow.columnName + {"}}"} + + } theme={theme} value={value} />