From df00d2f3925e9d5383260aefb88188b5eec5d09a Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Tue, 25 Feb 2025 19:38:55 +0530 Subject: [PATCH] #19850: fix the scroll issue for action button in Glossary import (#19965) * fix the scroll issue for action button in Glossary import * minor translation fix * fix sonar issue --- .../BulkImport/BulkEntityImport.component.tsx | 8 ++-- .../GlossaryDetails.component.tsx | 2 +- .../ImportGlossary/ImportGlossary.test.tsx | 5 ++- .../ImportGlossary/ImportGlossary.tsx | 41 +++++++++---------- .../ImportGlossary/import-glossary.less | 6 --- .../GlossaryPage/GlossaryPage.component.tsx | 36 ++++++++-------- 6 files changed, 45 insertions(+), 53 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/BulkImport/BulkEntityImport.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/BulkImport/BulkEntityImport.component.tsx index fffceaffac1..8942237a990 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/BulkImport/BulkEntityImport.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/BulkImport/BulkEntityImport.component.tsx @@ -432,8 +432,8 @@ const BulkEntityImport = ({ - - {activeAsyncImportJob?.jobId && ( + {activeAsyncImportJob?.jobId && ( + - )} - + + )} {activeStep === 0 && ( <> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx index 470709b6648..2729d08ef27 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx @@ -381,7 +381,7 @@ const GlossaryDetails = ({ type={EntityType.GLOSSARY} onUpdate={handleGlossaryUpdate}> jest.fn().mockReturnValue(
Loader
) ); +jest.mock('../../PageLayoutV1/PageLayoutV1', () => { + return jest.fn().mockImplementation(({ children }) =>

{children}

); +}); + jest.mock('../../BulkImport/BulkEntityImport.component', () => jest.fn().mockImplementation(({ onSuccess, onValidateCsvString }) => (
@@ -87,7 +91,6 @@ describe('Import Glossary', () => { render(); expect(await screen.findByTestId('breadcrumb')).toBeInTheDocument(); - expect(await screen.findByTestId('title')).toBeInTheDocument(); expect(screen.getByText('BulkEntityImport')).toBeInTheDocument(); expect(screen.getByText('SuccessButton')).toBeInTheDocument(); expect(screen.getByText('ValidateCsvButton')).toBeInTheDocument(); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/ImportGlossary/ImportGlossary.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/ImportGlossary/ImportGlossary.tsx index 2ae67b4ee5a..b3f7e22401c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/ImportGlossary/ImportGlossary.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/ImportGlossary/ImportGlossary.tsx @@ -10,7 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Col, Row, Typography } from 'antd'; +import { Col, Row } from 'antd'; import { AxiosError } from 'axios'; import React, { FC, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; @@ -22,6 +22,7 @@ import { showErrorToast } from '../../../utils/ToastUtils'; import BulkEntityImport from '../../BulkImport/BulkEntityImport.component'; import TitleBreadcrumb from '../../common/TitleBreadcrumb/TitleBreadcrumb.component'; import { TitleBreadcrumbProps } from '../../common/TitleBreadcrumb/TitleBreadcrumb.interface'; +import PageLayoutV1 from '../../PageLayoutV1/PageLayoutV1'; import './import-glossary.less'; interface Props { @@ -68,26 +69,24 @@ const ImportGlossary: FC = ({ glossaryName }) => { }; return ( - - - - - - - {t('label.import-entity', { - entity: t('label.glossary-term-plural'), - })} - - - - - - + + + + + + + + + + ); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/ImportGlossary/import-glossary.less b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/ImportGlossary/import-glossary.less index 6524ea614f3..b1763131815 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/ImportGlossary/import-glossary.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/ImportGlossary/import-glossary.less @@ -38,12 +38,6 @@ } .import-glossary { - .stepper-container { - max-width: 450px; - margin: auto; - margin-top: 24px; - padding: 0; - } .browse-text { border-bottom: 1px solid; } diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx index 27e57bdde50..3238d7db0f1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx @@ -460,26 +460,22 @@ const GlossaryPage = () => { ); } - const glossaryElement = ( -
- {isRightPanelLoading ? ( - - ) : ( - - )} -
+ const glossaryElement = isRightPanelLoading ? ( + + ) : ( + ); const resizableLayout = isGlossaryActive ? (