diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js index 8bf400b94a..91eb1cde6e 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Naming_conflict_spec.js @@ -4,6 +4,7 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const dsl = require("../../../../fixtures/basicTabledsl.json"); const pages = require("../../../../locators/Pages.json"); +const apiwidget = require("../../../../locators/apiWidgetslocator.json"); const tabname = "UpdatedTab"; describe("Tab widget test", function() { @@ -18,6 +19,10 @@ describe("Tab widget test", function() { cy.NavigateToAPI_Panel(); cy.log("Navigation to API Panel screen successful"); cy.CreateApiAndValidateUniqueEntityName(apiName); + cy.get(apiwidget.apiTxt) + .clear() + .type(tableName, { force: true }) + .should("have.value", tableName); }); it("Rename Table widget with api name validation test", function() { diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index efadde0626..152b51b26c 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -995,7 +995,7 @@ Cypress.Commands.add("CreationOfUniqueAPIcheck", (apiname) => { .focus() .type(apiname, { force: true, delay: 500 }) .should("have.value", apiname); - cy.get(".error-message").should(($x) => { + cy.get(".t--action-name-edit-error").should(($x) => { expect($x).contain( apiname.concat(" is already being used or is a restricted keyword."), ); @@ -1082,7 +1082,7 @@ Cypress.Commands.add("CreateApiAndValidateUniqueEntityName", (apiname) => { .clear() .type(apiname, { force: true }) .should("have.value", apiname); - cy.get(".t--nameOfApi .error-message").should(($x) => { + cy.get(".t--action-name-edit-error").should(($x) => { expect($x).contain( apiname.concat(" is already being used or is a restricted keyword."), ); diff --git a/app/client/src/components/ads/EditableTextSubComponent.tsx b/app/client/src/components/ads/EditableTextSubComponent.tsx index 673f3a303b..0fbb39be1b 100644 --- a/app/client/src/components/ads/EditableTextSubComponent.tsx +++ b/app/client/src/components/ads/EditableTextSubComponent.tsx @@ -145,8 +145,8 @@ const TextContainer = styled.div<{ height: ${(props) => props.theme.spaces[14] + 1}px; padding: ${(props) => props.theme.spaces[4]}px ${(props) => props.theme.spaces[5]}px; - width: calc(100% - 40px); background-color: ${(props) => props.bgColor}; + width: calc(100% - 40px); } .icon-wrapper { diff --git a/app/client/src/components/ads/SearchInput.tsx b/app/client/src/components/ads/SearchInput.tsx index 0bea6b9268..a52b0561c3 100644 --- a/app/client/src/components/ads/SearchInput.tsx +++ b/app/client/src/components/ads/SearchInput.tsx @@ -28,13 +28,30 @@ export type TextInputProps = CommonComponentProps & { const SearchInputWrapper = styled.div` & > div { border: none; + + & > .left-icon { + margin-left: 8px; + + & span { + margin-right: 0; + } + } + + & > .right-icon { + position: relative; + right: 0; + } + + & input { + padding: 0 8px; + } } `; const CloseIcon = styled.div` .${Classes.ICON} { margin-right: ${(props) => props.theme.spaces[4]}px; - margin-left: ${(props) => props.theme.spaces[4]}px; + margin-left: 0; } `; diff --git a/app/client/src/components/ads/TextInput.tsx b/app/client/src/components/ads/TextInput.tsx index a97aadf137..b47a9eb7e5 100644 --- a/app/client/src/components/ads/TextInput.tsx +++ b/app/client/src/components/ads/TextInput.tsx @@ -419,7 +419,7 @@ const TextInput = forwardRef( props.helperText.length > 0 && HelperMessage} {ErrorMessage} - + {props.rightSideComponent} diff --git a/app/client/src/components/ads/Toggle.tsx b/app/client/src/components/ads/Toggle.tsx index de911a9dad..2515f22390 100644 --- a/app/client/src/components/ads/Toggle.tsx +++ b/app/client/src/components/ads/Toggle.tsx @@ -116,7 +116,7 @@ const StyledToggle = styled.label<{ `; export default function Toggle(props: ToggleProps) { - const [value, setValue] = useState(false); + const [value, setValue] = useState(props.value); useEffect(() => { setValue(props.value); diff --git a/app/client/src/components/editorComponents/ActionNameEditor.tsx b/app/client/src/components/editorComponents/ActionNameEditor.tsx index 92a638d16a..9f151bcc27 100644 --- a/app/client/src/components/editorComponents/ActionNameEditor.tsx +++ b/app/client/src/components/editorComponents/ActionNameEditor.tsx @@ -16,11 +16,6 @@ import { getExistingPageNames } from "sagas/selectors"; import { saveActionName } from "actions/pluginActionActions"; import { Spinner } from "@blueprintjs/core"; import { checkCurrentStep } from "sagas/OnboardingSagas"; -import { - EditableText as NewEditableText, - EditInteractionKind as NewEditInteractionKind, - SavingState, -} from "components/ads/EditableText"; import { Classes } from "@blueprintjs/core"; import { OnboardingStep } from "constants/OnboardingConstants"; import log from "loglevel"; @@ -163,45 +158,29 @@ export function ActionNameEditor(props: ActionNameEditorProps) { return ( - {props.page === "API_PANE" ? ( - + - ) : ( -
- - {saveStatus.isSaving && } -
- )} + {saveStatus.isSaving && } +
); } diff --git a/app/client/src/components/editorComponents/EditableText.tsx b/app/client/src/components/editorComponents/EditableText.tsx index 370f99b02a..6e69f12b2b 100644 --- a/app/client/src/components/editorComponents/EditableText.tsx +++ b/app/client/src/components/editorComponents/EditableText.tsx @@ -31,6 +31,7 @@ type EditableTextProps = { minimal?: boolean; onBlur?: (value?: string) => void; beforeUnmount?: (value?: string) => void; + errorTooltipClass?: string; }; const EditableTextWrapper = styled.div<{ @@ -84,6 +85,7 @@ export function EditableText(props: EditableTextProps) { className, defaultValue, editInteractionKind, + errorTooltipClass, forceDefault, hideEditIcon, isEditingDefault, @@ -171,7 +173,11 @@ export function EditableText(props: EditableTextProps) { editInteractionKind === EditInteractionKind.DOUBLE ? edit : _.noop } > - + diff --git a/app/client/src/pages/Editor/APIEditor/Form.tsx b/app/client/src/pages/Editor/APIEditor/Form.tsx index dba5eba32d..40d3fdcbff 100644 --- a/app/client/src/pages/Editor/APIEditor/Form.tsx +++ b/app/client/src/pages/Editor/APIEditor/Form.tsx @@ -255,7 +255,6 @@ interface APIFormProps { type Props = APIFormProps & InjectedFormProps; export const NameWrapper = styled.div` - width: 49%; display: flex; align-items: center; input {