Skip to content

Commit 387859d

Browse files
Merge pull request #869 from contentstack/cms/hot-fix
fix: Correct destination stack ID in migration service and enhance Co…
2 parents f2bae0c + 5d3f0a0 commit 387859d

File tree

3 files changed

+60
-9
lines changed

3 files changed

+60
-9
lines changed

api/src/services/migration.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ const startMigration = async (req: Request): Promise<any> => {
695695
break;
696696
}
697697
case CMS.AEM: {
698-
await aemService.createAssets({ projectId, packagePath, destinationStackId: project?.current_test_stack_id });
698+
await aemService.createAssets({ projectId, packagePath, destinationStackId: project?.destination_stack_id });
699699
await aemService.createEntry({
700700
packagePath,
701701
contentTypes,

ui/src/components/ContentMapper/index.scss

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,4 +425,47 @@ div .table-row {
425425
.advanced-setting-button,
426426
.table-row button {
427427
flex-shrink: 0;
428+
}
429+
430+
// Prevent header wrapping
431+
.nowrap-header {
432+
white-space: nowrap;
433+
display: inline-block;
434+
}
435+
436+
// Make sure table and save button stay fully visible
437+
.table-wrapper {
438+
position: relative;
439+
padding-bottom: 70px;
440+
}
441+
442+
// Sticky footer for Save button
443+
.mapper-footer {
444+
position: sticky;
445+
bottom: 0;
446+
background: #fff;
447+
padding: 12px 18px;
448+
border-top: 1px solid #e5e5e5;
449+
display: flex;
450+
justify-content: space-between;
451+
align-items: center;
452+
z-index: 100;
453+
}
454+
455+
// Ensure Save button is never clipped
456+
.saveButton {
457+
min-width: 90px;
458+
}
459+
460+
// Prevent bottom overflow issues with InfiniteScrollTable
461+
.infinite-scroll-table,
462+
.infinite-scroll-table-wrapper {
463+
overflow-y: auto !important;
464+
}
465+
466+
// Safety for small screens
467+
@media (max-height: 800px) {
468+
.mapper-footer {
469+
padding: 10px;
470+
}
428471
}

ui/src/components/ContentMapper/index.tsx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,10 +2381,12 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref:
23812381
const columns = [
23822382
{
23832383
disableSortBy: true,
2384-
Header: `${newMigrationData?.legacy_cms?.selectedCms?.title}: ${otherCmsTitle}`,
2384+
Header: (
2385+
<span className="nowrap-header">
2386+
{`${newMigrationData?.legacy_cms?.selectedCms?.title}: ${otherCmsTitle}`}
2387+
</span>
2388+
),
23852389
accessor: accessorCall,
2386-
// accessor: 'otherCmsField',
2387-
default: false,
23882390
id: 'uuid'
23892391
}
23902392
];
@@ -2394,19 +2396,25 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref:
23942396
if (!isNewStack) {
23952397
columns?.push({
23962398
disableSortBy: true,
2397-
Header: `Contentstack: ${isOtherContentType ? otherContentType?.label : otherCmsTitle}`,
2399+
Header: (
2400+
<span className="nowrap-header">
2401+
{`Contentstack: ${isOtherContentType ? otherContentType?.label : otherCmsTitle}`}
2402+
</span>
2403+
),
23982404
// accessor: 'ct_field',
23992405
accessor: SelectAccessorOfColumn,
24002406
id: 'contentstack_field',
2401-
default: false
24022407
});
24032408
} else {
24042409
columns?.push({
24052410
disableSortBy: true,
2406-
Header: `Contentstack: ${isNewStack ? otherCmsTitle : otherContentType?.label ?? ''}`,
2411+
Header: (
2412+
<span className="nowrap-header">
2413+
{`Contentstack: ${isNewStack ? otherCmsTitle : otherContentType?.label ?? ''}`}
2414+
</span>
2415+
),
24072416
accessor: SelectAccessor,
24082417
id: 'contentstack_cms_field',
2409-
default: false
24102418
});
24112419
}
24122420

@@ -2680,7 +2688,7 @@ const ContentMapper = forwardRef(({ handleStepChange }: contentMapperProps, ref:
26802688
plural: `${totalCounts === 0 ? 'Count' : ''}`
26812689
}}
26822690
/>
2683-
<div className='d-flex align-items-center justify-content-between my-2 mx-3 px-1 py-1'>
2691+
<div className="mapper-footer">
26842692
<div>Total Fields: <strong>{totalCounts}</strong></div>
26852693
<Button
26862694
className="saveButton"

0 commit comments

Comments
 (0)