From 5fde30bda7b3a3a64106b59be70b5b3bf0f81470 Mon Sep 17 00:00:00 2001 From: Sayali Joshi Date: Thu, 27 Mar 2025 15:10:55 +0530 Subject: [PATCH] [CMG-576] - UX suggestions from Docs team --- ui/src/cmsData/content_mapping.json | 2 +- .../components/Common/AddStack/addStack.scss | 11 + .../components/Common/AddStack/addStack.tsx | 275 +++++++++--------- ui/src/components/ContentMapper/index.scss | 12 +- ui/src/components/ContentMapper/index.tsx | 110 ++++--- .../Actions/LoadLanguageMapper.tsx | 2 +- .../DestinationStack/Actions/LoadStacks.tsx | 131 +++++---- .../DestinationStack/DestinationStack.scss | 25 +- ui/src/components/DestinationStack/index.tsx | 40 --- ui/src/pages/Migration/index.tsx | 2 +- ui/src/utilities/constants.ts | 2 +- 11 files changed, 293 insertions(+), 319 deletions(-) diff --git a/ui/src/cmsData/content_mapping.json b/ui/src/cmsData/content_mapping.json index cdf747030..9c267310b 100644 --- a/ui/src/cmsData/content_mapping.json +++ b/ui/src/cmsData/content_mapping.json @@ -143,7 +143,7 @@ "_version": 3 }, "table_search_placeholder": "Search fields", - "search_placeholder": "Search content models", + "search_placeholder": "Search...", "tags": [], "title": "Content Mapping", "updated_at": "2024-01-25T12:13:32.967Z", diff --git a/ui/src/components/Common/AddStack/addStack.scss b/ui/src/components/Common/AddStack/addStack.scss index d768305c2..7ccf3e539 100644 --- a/ui/src/components/Common/AddStack/addStack.scss +++ b/ui/src/components/Common/AddStack/addStack.scss @@ -1,3 +1,5 @@ +@import '../../../scss/App.scss'; + /** * Styles for the ReactModal__add-stack class. */ @@ -26,3 +28,12 @@ .ReactModal__Overlay .ReactModal__Content .ReactModal__Content__body.selectWrapperBody { overflow: visible; } +.stack-creation-warning { + color: $color-font-base; + font-size: $size-font-large; + margin-left: .5rem; + margin-top: .5rem; + .imp-text { + font-weight: $font-weight-semi-bold; + } +} diff --git a/ui/src/components/Common/AddStack/addStack.tsx b/ui/src/components/Common/AddStack/addStack.tsx index 7fc397374..2d0c78417 100644 --- a/ui/src/components/Common/AddStack/addStack.tsx +++ b/ui/src/components/Common/AddStack/addStack.tsx @@ -150,163 +150,162 @@ const AddStack = (props: any): JSX.Element => { }} render={({ handleSubmit }): JSX.Element => { return ( - <> -
-
- - - - - {({ input, meta }): JSX.Element => { - return ( - <> +
+ + + + + + {({ input, meta }): JSX.Element => { + return ( + <> + + {addStackCMSData?.stack_name} + + ): void => { + input?.onChange(event); + }} + name="name" + autoComplete="off" + type="text" + placeholder={addStackCMSData?.stack_name_placeholder} + error={(meta?.error || meta?.submitError) && meta?.touched} + /> + {meta?.error && meta?.touched && ( + + {meta?.error} + + )} + + ); + }} + + + + + {({ input, meta }): JSX.Element => { + return ( +
+ - {addStackCMSData?.stack_name} + {addStackCMSData?.stack_description} - ): void => { + name="description" + onChange={( + event: React.ChangeEvent + ): void => { input?.onChange(event); }} - name="name" - autoComplete="off" - type="text" - placeholder={addStackCMSData?.stack_name_placeholder} + placeholder={addStackCMSData?.stack_description_placeholder} error={(meta?.error || meta?.submitError) && meta?.touched} /> {meta?.error && meta?.touched && ( {meta?.error} )} - - ); - }} - - - - - {({ input, meta }): JSX.Element => { - return ( -
- - - {addStackCMSData?.stack_description} - -