Skip to content
Merged

Dev #185

Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
546cbc2
[CMG-214] - Destination Stack | Error message is not showing when max…
sayalijoshi27 Jul 9, 2024
7d6658c
Merge pull request #178 from contentstack/feature/CMG-57
v1shalpatel Jul 9, 2024
2231f01
logs details
RohitKini Jul 10, 2024
9754728
logger
RohitKini Jul 10, 2024
7c24b73
Conflict resolved
sayalijoshi27 Jul 10, 2024
3473dea
Merge branch 'feature/profile-design' of https://github.com/contentst…
sayalijoshi27 Jul 10, 2024
b0ac49b
refactor:resolved duplicate mapper fields
AishDani Jul 10, 2024
2e3782b
refactor:removed console
AishDani Jul 10, 2024
5326ca9
Merge pull request #179 from contentstack/feature/legacy-cms
v1shalpatel Jul 10, 2024
a5e30cd
Merge branch 'dev' of https://github.com/contentstack/migration-v2-no…
sayalijoshi27 Jul 10, 2024
ad2adc9
Test Migration Logger screen completed
sayalijoshi27 Jul 10, 2024
d1531b5
Merge pull request #180 from contentstack/feature/profile-design
v1shalpatel Jul 10, 2024
ef423e9
refactor:legacy cms bugs
AishDani Jul 11, 2024
b04cd02
Merge branch 'dev' of github.com:contentstack/migration-v2-node-serve…
AishDani Jul 11, 2024
01225da
Merge pull request #181 from contentstack/feature/legacy-cms
v1shalpatel Jul 11, 2024
571a1ba
solved functional bugs on dest stack
snehalsankhe Jul 12, 2024
79a9be4
merged from dev
snehalsankhe Jul 12, 2024
29c4c83
Merge pull request #183 from contentstack/layout-changes
v1shalpatel Jul 12, 2024
8da6a61
refactor:destination stack modal bug resolved
AishDani Jul 12, 2024
cddcd75
Merge branch 'dev' of github.com:contentstack/migration-v2-node-serve…
AishDani Jul 12, 2024
520637c
Merge pull request #184 from contentstack/bugs-legacyCMS
v1shalpatel Jul 12, 2024
8d7eb78
refactor:close modal prop added
AishDani Jul 12, 2024
a0c0e38
Merge pull request #186 from contentstack/bugs-legacyCMS
v1shalpatel Jul 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions ui/src/components/Common/AddStack/addStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const AddStack = (props: any): JSX.Element => {
});
props?.closeModal();
} else {
Notification({ notificationContent: { text: 'Failed to create the stack' }, type: 'error' });
Notification({ notificationContent: { text: 'Stack creation failed. Please try again.' }, type: 'error' });
}
setIsProcessing(false);
};
Expand Down Expand Up @@ -102,6 +102,7 @@ const AddStack = (props: any): JSX.Element => {
});
//org id will always be there
}, []);

return (
<>
{isLoading ? (
Expand All @@ -116,9 +117,15 @@ const AddStack = (props: any): JSX.Element => {
keepDirtyOnReinitialize={true}
validate={(values): any => {
const errors: any = {};
if (!values?.name || values?.name?.trim().lenght < 1) {
if (!values?.name || values?.name?.trim().length < 1) {
errors.name = 'Stack name required';
}
if (values?.name && values?.name?.length > 255) {
errors.name = 'Stack name should have a maximum length of 255 character(s).';
}
if (values?.description && values?.description?.length > 512) {
errors.description = 'Description should have a maximum length of 512 character(s).';
}
if (!values?.locale || values?.locale === '') {
errors.locale = 'Required';
}
Expand Down Expand Up @@ -152,7 +159,7 @@ const AddStack = (props: any): JSX.Element => {
testId="cs-stack-create-title-input"
version="v2"
{...input}
onChange={(event: any): any => {
onChange={(event: React.ChangeEvent<HTMLInputElement>): void => {
input?.onChange(event);
}}
name="name"
Expand All @@ -176,7 +183,7 @@ const AddStack = (props: any): JSX.Element => {
</Field>
<Field>
<ReactFinalField name={'description'} type="textarea">
{({ input }): any => {
{({ input, meta }): JSX.Element => {
return (
<div className="input-description">
<Field>
Expand All @@ -193,11 +200,20 @@ const AddStack = (props: any): JSX.Element => {
className="Description-field"
{...input}
name="description"
onChange={(event: any): any => {
onChange={(event: React.ChangeEvent<HTMLInputElement>): void => {
input?.onChange(event);
}}
placeholder={addStackCMSData?.stack_description_placeholder}
error={(meta?.error || meta?.submitError) && meta?.touched}
/>
{meta?.error && meta?.touched && (
<ValidationMessage
version="v2"
testId="cs-stack-create-description-validation"
>
{meta?.error}
</ValidationMessage>
)}
</Field>
</div>
);
Expand All @@ -206,7 +222,7 @@ const AddStack = (props: any): JSX.Element => {
</Field>
<Field>
<ReactFinalField name={'locale'}>
{({ input, meta }): any => {
{({ input, meta }): JSX.Element => {
return (
<>
<FieldLabel
Expand All @@ -221,7 +237,7 @@ const AddStack = (props: any): JSX.Element => {
<Select
value={input?.value}
isSearchable={true}
onChange={(event: any): any => {
onChange={(event: React.ChangeEvent<HTMLInputElement>): void => {
input?.onChange(event);
}}
name="locale"
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/ContentMapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ const ContentMapper = () => {
</span>
<span className='ml-10'>
<Tooltip content="Schema Preview" position="bottom">
<Icon icon="LivePreview" version="v2" onClick={handleSchemaPreview} />
<Icon icon="LivePreview" version="v2" onClick={() => handleSchemaPreview(content?.otherCmsTitle)} />
</Tooltip>
</span>
</div>
Expand Down