Skip to content

Commit

Permalink
chore(ui): improve file and folder names (#13784)
Browse files Browse the repository at this point in the history
* chore(ui): improve file and folder names

* chore: fix test

* fix: build

* Fix paging (#13821)

* chore(ui): pagesize support for all the pagination

* revamp pagination

* complete pagination update

* fix import

* fix pagination

* fix tests

* fix path

* fix import

* fix import error

---------

Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com>
  • Loading branch information
Sachin-chaurasiya and chirag-madlani authored Nov 10, 2023
1 parent b7e7625 commit 431fbce
Show file tree
Hide file tree
Showing 662 changed files with 2,307 additions and 3,424 deletions.
8 changes: 4 additions & 4 deletions openmetadata-ui/src/main/resources/ui/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
import { render } from '@testing-library/react';
import React from 'react';
import App from './App';
import { AuthContext } from './components/authentication/auth-provider/AuthProvider';
import { IAuthContext } from './components/authentication/auth-provider/AuthProvider.interface';
import { AuthContext } from './components/Auth/AuthProviders/AuthProvider';
import { IAuthContext } from './components/Auth/AuthProviders/AuthProvider.interface';

jest.mock('./components/router/AppRouter', () => {
jest.mock('./components/AppRouter/AppRouter', () => {
return jest.fn().mockReturnValue(<p>AppRouter</p>);
});

jest.mock('./components/authentication/auth-provider/AuthProvider', () => {
jest.mock('./components/Auth/AuthProviders/AuthProvider', () => {
return {
AuthProvider: jest
.fn()
Expand Down
6 changes: 3 additions & 3 deletions openmetadata-ui/src/main/resources/ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ import { Router } from 'react-router-dom';
import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.min.css';
import ApplicationConfigProvider from './components/ApplicationConfigProvider/ApplicationConfigProvider';
import { AuthProvider } from './components/authentication/auth-provider/AuthProvider';
import AppRouter from './components/AppRouter/AppRouter';
import { AuthProvider } from './components/Auth/AuthProviders/AuthProvider';
import DomainProvider from './components/Domain/DomainProvider/DomainProvider';
import { EntityExportModalProvider } from './components/Entity/EntityExportModalProvider/EntityExportModalProvider.component';
import ErrorBoundary from './components/ErrorBoundary/ErrorBoundary';
import GlobalSearchProvider from './components/GlobalSearchProvider/GlobalSearchProvider';
import PermissionProvider from './components/PermissionProvider/PermissionProvider';
import AppRouter from './components/router/AppRouter';
import TourProvider from './components/TourProvider/TourProvider';
import WebSocketProvider from './components/web-scoket/web-scoket.provider';
import WebAnalyticsProvider from './components/WebAnalytics/WebAnalyticsProvider';
import WebSocketProvider from './components/WebSocketProvider/WebSocketProvider';
import { TOAST_OPTIONS } from './constants/Toasts.constants';
import { history } from './utils/HistoryUtils';
import i18n from './utils/i18next/LocalUtil';
Expand Down
2 changes: 1 addition & 1 deletion openmetadata-ui/src/main/resources/ui/src/AppState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import { isEmpty, isNil, isUndefined } from 'lodash';
import { action, makeAutoObservable } from 'mobx';
import { ClientAuth, NewUser } from 'Models';
import { EntityUnion } from './components/Explore/explore.interface';
import { EntityUnion } from './components/Explore/ExplorePage.interface';
import { ResourcePermission } from './generated/entity/policies/accessControl/resourcePermission';
import {
EntityReference as UserTeams,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
getEntityFQN,
getEntityType,
} from '../../../utils/FeedUtils';
import { useAuthContext } from '../../authentication/auth-provider/AuthProvider';
import { useAuthContext } from '../../Auth/AuthProviders/AuthProvider';
import UserPopOverCard from '../../common/PopOverCard/UserPopOverCard';
import ProfilePicture from '../../common/ProfilePicture/ProfilePicture';
import EditAnnouncementModal from '../../Modals/AnnouncementModal/EditAnnouncementModal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jest.mock('../../../../utils/FeedUtils', () => ({
},
}));

jest.mock('../../../common/rich-text-editor/RichTextEditorPreviewer', () => {
jest.mock('../../../common/RichTextEditor/RichTextEditorPreviewer', () => {
return jest.fn().mockReturnValue(<p>RichText Preview</p>);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
getFrontEndFormat,
MarkdownToHTMLConverter,
} from '../../../../utils/FeedUtils';
import RichTextEditorPreviewer from '../../../common/rich-text-editor/RichTextEditorPreviewer';
import RichTextEditorPreviewer from '../../../common/RichTextEditor/RichTextEditorPreviewer';
import Reactions from '../../../Reactions/Reactions';
import ActivityFeedEditor from '../../ActivityFeedEditor/ActivityFeedEditor';
import { FeedBodyProp } from '../ActivityFeedCard.interface';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { isUndefined } from 'lodash';
import React, { useCallback, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import ActivityFeedEditor from '../../../../components/ActivityFeed/ActivityFeedEditor/ActivityFeedEditor';
import RichTextEditorPreviewer from '../../../../components/common/rich-text-editor/RichTextEditorPreviewer';
import RichTextEditorPreviewer from '../../../../components/common/RichTextEditor/RichTextEditorPreviewer';
import { formatDateTime } from '../../../../utils/date-time/DateTimeUtils';
import {
getFrontEndFormat,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const mockUserData: User = {
isAdmin: true,
};

jest.mock('../../authentication/auth-provider/AuthProvider', () => ({
jest.mock('../../Auth/AuthProviders/AuthProvider', () => ({
useAuthContext: jest.fn(() => ({
currentUser: mockUserData,
})),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { REACTION_LIST } from '../../../constants/reactions.constant';
import { ReactionOperation } from '../../../enums/reactions.enum';
import { Post } from '../../../generated/entity/feed/thread';
import { ReactionType } from '../../../generated/type/reaction';
import { useAuthContext } from '../../authentication/auth-provider/AuthProvider';
import { useAuthContext } from '../../Auth/AuthProviders/AuthProvider';
import Reaction from '../../Reactions/Reaction';
import { ConfirmState } from './ActivityFeedCard.interface';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import React, { useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { ReactComponent as ActivityFeedIcon } from '../../../assets/svg/activity-feed.svg';
import { ReactComponent as TaskIcon } from '../../../assets/svg/ic-task.svg';
import ErrorPlaceHolder from '../../../components/common/error-with-placeholder/ErrorPlaceHolder';
import ErrorPlaceHolder from '../../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder';
import Loader from '../../../components/Loader/Loader';
import { ERROR_PLACEHOLDER_TYPE, SIZE } from '../../../enums/common.enum';
import { Thread } from '../../../generated/entity/feed/thread';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import {
import { getEntityFeedLink } from '../../../utils/EntityUtils';
import { getUpdatedThread } from '../../../utils/FeedUtils';
import { showErrorToast } from '../../../utils/ToastUtils';
import { useAuthContext } from '../../authentication/auth-provider/AuthProvider';
import { useAuthContext } from '../../Auth/AuthProviders/AuthProvider';
import ActivityFeedDrawer from '../ActivityFeedDrawer/ActivityFeedDrawer';
import { ActivityFeedProviderContextType } from './ActivityFeedProviderContext.interface';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ import {
ENTITY_LINK_SEPARATOR,
getEntityFeedLink,
} from '../../../utils/EntityUtils';
import { useAuthContext } from '../../authentication/auth-provider/AuthProvider';
import { useAuthContext } from '../../Auth/AuthProviders/AuthProvider';
import Loader from '../../Loader/Loader';
import { TaskTab } from '../../Task/TaskTab/TaskTab.component';
import '../../Widgets/FeedsWidget/FeedsWidget.less';
import '../../Widgets/FeedsWidget/feeds-widget.less';
import ActivityFeedEditor from '../ActivityFeedEditor/ActivityFeedEditor';
import ActivityFeedListV1 from '../ActivityFeedList/ActivityFeedListV1.component';
import FeedPanelBodyV1 from '../ActivityFeedPanel/FeedPanelBodyV1';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import { Paging } from '../../../generated/type/paging';
import { useElementInView } from '../../../hooks/useElementInView';
import { getAllFeeds } from '../../../rest/feedsAPI';
import { showErrorToast } from '../../../utils/ToastUtils';
import { useAuthContext } from '../../authentication/auth-provider/AuthProvider';
import ErrorPlaceHolder from '../../common/error-with-placeholder/ErrorPlaceHolder';
import { useAuthContext } from '../../Auth/AuthProviders/AuthProvider';
import ErrorPlaceHolder from '../../common/ErrorWithPlaceholder/ErrorPlaceHolder';
import Loader from '../../Loader/Loader';
import ConfirmationModal from '../../Modals/ConfirmationModal/ConfirmationModal';
import { ConfirmState } from '../ActivityFeedCard/ActivityFeedCard.interface';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
Thread,
ThreadType,
} from '../../../generated/entity/feed/thread';
import { useAuthContext } from '../../authentication/auth-provider/AuthProvider';
import { useAuthContext } from '../../Auth/AuthProviders/AuthProvider';
import { useActivityFeedProvider } from '../ActivityFeedProvider/ActivityFeedProvider';
import './activity-feed-actions.less';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Typography } from 'antd';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { ReactComponent as AnnouncementIcon } from '../../../assets/svg/announcements-v1.svg';
import './Badge.less';
import './task-badge.less';

const AnnouncementBadge = () => {
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { useTranslation } from 'react-i18next';
import { ReactComponent as IconTaskClose } from '../../../assets/svg/complete.svg';
import { ReactComponent as IconTaskOpen } from '../../../assets/svg/in-progress.svg';
import { ThreadTaskStatus } from '../../../generated/entity/feed/thread';
import './Badge.less';
import './task-badge.less';

const TaskBadge = ({ status }: { status: ThreadTaskStatus }) => {
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ import { createExecutableTestSuite, createTestCase } from '../../rest/testAPI';
import { getEntityBreadcrumbs, getEntityName } from '../../utils/EntityUtils';
import { getEncodedFqn } from '../../utils/StringsUtils';
import { showErrorToast } from '../../utils/ToastUtils';
import { useAuthContext } from '../authentication/auth-provider/AuthProvider';
import SuccessScreen from '../common/success-screen/SuccessScreen';
import TitleBreadcrumb from '../common/title-breadcrumb/title-breadcrumb.component';
import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrumb.interface';
import { useAuthContext } from '../Auth/AuthProviders/AuthProvider';
import SuccessScreen from '../common/SuccessScreen/SuccessScreen';
import TitleBreadcrumb from '../common/TitleBreadcrumb/TitleBreadcrumb.component';
import { TitleBreadcrumbProps } from '../common/TitleBreadcrumb/TitleBreadcrumb.interface';
import IngestionStepper from '../IngestionStepper/IngestionStepper.component';
import { AddDataQualityTestProps } from './AddDataQualityTest.interface';
import RightPanel from './components/RightPanel';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const mockProps: EditTestCaseModalProps = {
onUpdate: jest.fn(),
};

jest.mock('../common/rich-text-editor/RichTextEditor', () => {
jest.mock('../common/RichTextEditor/RichTextEditor', () => {
return forwardRef(
jest.fn().mockImplementation(() => <div>RichTextEditor.component</div>)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import { getTestDefinitionById, updateTestCaseById } from '../../rest/testAPI';
import { getNameFromFQN } from '../../utils/CommonUtils';
import { getEntityFqnFromEntityLink } from '../../utils/TableUtils';
import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
import RichTextEditor from '../common/rich-text-editor/RichTextEditor';
import { EditorContentRef } from '../common/rich-text-editor/RichTextEditor.interface';
import RichTextEditor from '../common/RichTextEditor/RichTextEditor';
import { EditorContentRef } from '../common/RichTextEditor/RichTextEditor.interface';
import Loader from '../Loader/Loader';
import { EditTestCaseModalProps } from './AddDataQualityTest.interface';
import ParameterForm from './components/ParameterForm';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
} from '../../utils/CommonUtils';
import { getIngestionName } from '../../utils/ServiceUtils';
import { showErrorToast } from '../../utils/ToastUtils';
import SuccessScreen from '../common/success-screen/SuccessScreen';
import SuccessScreen from '../common/SuccessScreen/SuccessScreen';
import DeployIngestionLoaderModal from '../Modals/DeployIngestionLoaderModal/DeployIngestionLoaderModal';
import { TestSuiteIngestionProps } from './AddDataQualityTest.interface';
import TestSuiteScheduler from './components/TestSuiteScheduler';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from '../../../mocks/TestSuite.mock';
import ParameterForm from './ParameterForm';

jest.mock('../../../components/schema-editor/SchemaEditor', () => {
jest.mock('../../../components/SchemaEditor/SchemaEditor', () => {
return jest.fn().mockReturnValue(<div>SchemaEditor</div>);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import 'codemirror/addon/fold/foldgutter.css';
import { isUndefined } from 'lodash';
import React from 'react';
import { useTranslation } from 'react-i18next';
import SchemaEditor from '../../../components/schema-editor/SchemaEditor';
import { SUPPORTED_PARTITION_TYPE_FOR_DATE_TIME } from '../../../constants/profiler.constant';
import { CSMode } from '../../../enums/codemirror.enum';
import {
TestCaseParameterDefinition,
TestDataType,
} from '../../../generated/tests/testDefinition';
import SVGIcons, { Icons } from '../../../utils/SvgUtils';
import '../../TableProfiler/tableProfiler.less';
import SchemaEditor from '../../SchemaEditor/SchemaEditor';
import '../../TableProfiler/table-profiler.less';
import { ParameterFormProps } from '../AddDataQualityTest.interface';

const ParameterForm: React.FC<ParameterFormProps> = ({ definition, table }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import { getEntityName } from '../../../utils/EntityUtils';
import { getDecodedFqn } from '../../../utils/StringsUtils';
import { generateEntityLink } from '../../../utils/TableUtils';
import { showErrorToast } from '../../../utils/ToastUtils';
import RichTextEditor from '../../common/rich-text-editor/RichTextEditor';
import { EditorContentRef } from '../../common/rich-text-editor/RichTextEditor.interface';
import RichTextEditor from '../../common/RichTextEditor/RichTextEditor';
import { EditorContentRef } from '../../common/RichTextEditor/RichTextEditor.interface';
import { TestCaseFormProps } from '../AddDataQualityTest.interface';
import ParameterForm from './ParameterForm';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import { IngestionPipeline } from '../../generated/entity/services/ingestionPipe
import { IngestionWorkflowData } from '../../interface/service.interface';
import { getIngestionFrequency } from '../../utils/CommonUtils';
import { getIngestionName } from '../../utils/ServiceUtils';
import { useAuthContext } from '../authentication/auth-provider/AuthProvider';
import SuccessScreen from '../common/success-screen/SuccessScreen';
import { useAuthContext } from '../Auth/AuthProviders/AuthProvider';
import SuccessScreen from '../common/SuccessScreen/SuccessScreen';
import IngestionStepper from '../IngestionStepper/IngestionStepper.component';
import DeployIngestionLoaderModal from '../Modals/DeployIngestionLoaderModal/DeployIngestionLoaderModal';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ import {
import { getEncodedFqn } from '../../utils/StringsUtils';
import { showErrorToast } from '../../utils/ToastUtils';
import AddIngestion from '../AddIngestion/AddIngestion.component';
import { useAuthContext } from '../authentication/auth-provider/AuthProvider';
import { useAuthContext } from '../Auth/AuthProviders/AuthProvider';
import ServiceDocPanel from '../common/ServiceDocPanel/ServiceDocPanel';
import SuccessScreen from '../common/success-screen/SuccessScreen';
import TitleBreadcrumb from '../common/title-breadcrumb/title-breadcrumb.component';
import SuccessScreen from '../common/SuccessScreen/SuccessScreen';
import TitleBreadcrumb from '../common/TitleBreadcrumb/TitleBreadcrumb.component';
import IngestionStepper from '../IngestionStepper/IngestionStepper.component';
import ConnectionConfigForm from '../ServiceConfig/ConnectionConfigForm';
import { AddServiceProps, ServiceConfig } from './AddService.interface';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import { ServiceCategory } from '../../enums/service.enum';
import { CreateIngestionPipeline } from '../../generated/api/services/ingestionPipelines/createIngestionPipeline';
import { DataObj } from '../../interface/service.interface';
import { TitleBreadcrumbProps } from '../common/title-breadcrumb/title-breadcrumb.interface';
import { TitleBreadcrumbProps } from '../common/TitleBreadcrumb/TitleBreadcrumb.interface';

export interface AddServiceProps {
serviceCategory: ServiceCategory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jest.mock('../AddIngestion/AddIngestion.component', () => () => (
<>AddIngestion</>
));

jest.mock('../common/title-breadcrumb/title-breadcrumb.component', () => () => (
jest.mock('../common/TitleBreadcrumb/TitleBreadcrumb.component', () => () => (
<>TitleBreadcrumb.component</>
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { PipelineServiceType } from '../../../generated/entity/services/pipeline
import { errorMsg, getServiceLogo } from '../../../utils/CommonUtils';
import ServiceUtilClassBase from '../../../utils/ServiceUtilClassBase';
import SVGIcons, { Icons } from '../../../utils/SvgUtils';
import Searchbar from '../../common/searchbar/Searchbar';
import Searchbar from '../../common/SearchBarComponent/SearchBar.component';
import './select-service-type.less';
import { SelectServiceTypeProps } from './Steps.interface';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import VirtualList from 'rc-virtual-list';
import React, { UIEventHandler, useCallback, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import Searchbar from '../../components/common/searchbar/Searchbar';
import Loader from '../../components/Loader/Loader';
import { getTableTabPath, PAGE_SIZE } from '../../constants/constants';
import { SearchIndex } from '../../enums/search.enum';
Expand All @@ -29,6 +28,7 @@ import { getNameFromFQN } from '../../utils/CommonUtils';
import { getEntityName } from '../../utils/EntityUtils';
import { replacePlus } from '../../utils/StringsUtils';
import { getEntityFqnFromEntityLink } from '../../utils/TableUtils';
import Searchbar from '../common/SearchBarComponent/SearchBar.component';
import { AddTestCaseModalProps } from './AddTestCaseList.interface';

// Todo: need to help from backend guys for ES query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import { ReactComponent as IconEdit } from '../../../assets/svg/edit-new.svg';
import { ReactComponent as IconDelete } from '../../../assets/svg/ic-delete.svg';
import TitleBreadcrumb from '../../../components/common/title-breadcrumb/title-breadcrumb.component';
import { TitleBreadcrumbProps } from '../../../components/common/title-breadcrumb/title-breadcrumb.interface';
import PageHeader from '../../../components/header/PageHeader.component';
import { HeaderProps } from '../../../components/header/PageHeader.interface';
import {
Effect,
EventSubscription,
Expand All @@ -37,6 +33,10 @@ import {
getFunctionDisplayName,
} from '../../../utils/Alerts/AlertsUtil';
import { getHostNameFromURL } from '../../../utils/CommonUtils';
import TitleBreadcrumb from '../../common/TitleBreadcrumb/TitleBreadcrumb.component';
import { TitleBreadcrumbProps } from '../../common/TitleBreadcrumb/TitleBreadcrumb.interface';
import PageHeader from '../../PageHeader/PageHeader.component';
import { HeaderProps } from '../../PageHeader/PageHeader.interface';

interface AlertDetailsComponentProps {
alerts: EventSubscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jest.mock('../../hooks/authHooks', () => ({
},
}));

jest.mock('../authentication/auth-provider/AuthProvider', () => {
jest.mock('../Auth/AuthProviders/AuthProvider', () => {
return {
useAuthContext: jest.fn(() => ({
isAuthDisabled: false,
Expand All @@ -39,7 +39,7 @@ jest.mock('../authentication/auth-provider/AuthProvider', () => {
};
});

jest.mock('../nav-bar/NavBar', () => {
jest.mock('../NavBar/NavBar', () => {
return jest.fn().mockReturnValue(<p>NavBar</p>);
});

Expand Down
Loading

0 comments on commit 431fbce

Please sign in to comment.