From 3e11bb7d040bc8f0c69e0232e9e2dd8af8809aee Mon Sep 17 00:00:00 2001 From: Andrew Sikowitz Date: Thu, 24 Apr 2025 15:25:37 -0700 Subject: [PATCH] fix(ui): Sort less files first (#13268) --- datahub-web-react/.prettierrc.js | 3 ++- datahub-web-react/src/App.tsx | 5 +++-- datahub-web-react/src/AppConfigProvider.tsx | 3 ++- .../components/SelectItemsPopover/SelectItemPopover.tsx | 3 ++- .../ermodelrelationships/ERModelRelationshipEntity.tsx | 3 ++- .../ERModelRelationship/CreateERModelRelationModal.tsx | 3 ++- .../styled/ERModelRelationship/ERModelRelationPreview.tsx | 3 ++- .../shared/tabs/Dataset/Relationship/RelationshipsTab.tsx | 3 ++- .../tabs/ERModelRelationship/ERModelRelationshipTab.tsx | 3 ++- 9 files changed, 19 insertions(+), 10 deletions(-) diff --git a/datahub-web-react/.prettierrc.js b/datahub-web-react/.prettierrc.js index ebeebb58cb..2de0c74527 100644 --- a/datahub-web-react/.prettierrc.js +++ b/datahub-web-react/.prettierrc.js @@ -6,7 +6,8 @@ module.exports = { tabWidth: 4, plugins: ['@trivago/prettier-plugin-sort-imports'], importOrder: [ - // Third party imports are first automatically, in their own group + '.*\.less$', + '', '^@components/(.*)$', // Have to specify all aliases otherwise they're considered third party '^(@app|@conf|@providers|@utils|@src)/(.*)$', diff --git a/datahub-web-react/src/App.tsx b/datahub-web-react/src/App.tsx index c9f4720284..a913567ac8 100644 --- a/datahub-web-react/src/App.tsx +++ b/datahub-web-react/src/App.tsx @@ -1,3 +1,6 @@ +import '@src/App.less'; +import '@src/AppV2.less'; + import { ApolloClient, ApolloProvider, InMemoryCache, ServerError, createHttpLink } from '@apollo/client'; import { onError } from '@apollo/client/link/error'; import Cookies from 'js-cookie'; @@ -9,8 +12,6 @@ import { Routes } from '@app/Routes'; import { isLoggedInVar } from '@app/auth/checkAuthStatus'; import { ErrorCodes } from '@app/shared/constants'; import { PageRoutes } from '@conf/Global'; -import '@src/App.less'; -import '@src/AppV2.less'; import CustomThemeProvider from '@src/CustomThemeProvider'; import { GlobalCfg } from '@src/conf'; import { useCustomTheme } from '@src/customThemeContext'; diff --git a/datahub-web-react/src/AppConfigProvider.tsx b/datahub-web-react/src/AppConfigProvider.tsx index fb98a76a90..2f555738d6 100644 --- a/datahub-web-react/src/AppConfigProvider.tsx +++ b/datahub-web-react/src/AppConfigProvider.tsx @@ -1,8 +1,9 @@ +import '@src/App.less'; + import React, { useEffect } from 'react'; import { THIRD_PARTY_LOGGING_KEY } from '@app/analytics/analytics'; import { checkAuthStatus } from '@app/auth/checkAuthStatus'; -import '@src/App.less'; import { AppConfigContext, DEFAULT_APP_CONFIG } from '@src/appConfigContext'; import { useAppConfigQuery } from '@graphql/app.generated'; diff --git a/datahub-web-react/src/alchemy-components/components/SelectItemsPopover/SelectItemPopover.tsx b/datahub-web-react/src/alchemy-components/components/SelectItemsPopover/SelectItemPopover.tsx index ebefbf6687..1ca95d3b99 100644 --- a/datahub-web-react/src/alchemy-components/components/SelectItemsPopover/SelectItemPopover.tsx +++ b/datahub-web-react/src/alchemy-components/components/SelectItemsPopover/SelectItemPopover.tsx @@ -1,9 +1,10 @@ +import '@components/components/SelectItemsPopover/select-items-popover.less'; + import { Popover } from 'antd'; import { CheckboxValueType } from 'antd/lib/checkbox/Group'; import React, { ReactNode } from 'react'; import { SelectItems } from '@components/components/SelectItemsPopover/SelectItems'; -import '@components/components/SelectItemsPopover/select-items-popover.less'; import { Entity, EntityType } from '@src/types.generated'; diff --git a/datahub-web-react/src/app/entity/ermodelrelationships/ERModelRelationshipEntity.tsx b/datahub-web-react/src/app/entity/ermodelrelationships/ERModelRelationshipEntity.tsx index 5cb60287f3..079a3cf9f2 100644 --- a/datahub-web-react/src/app/entity/ermodelrelationships/ERModelRelationshipEntity.tsx +++ b/datahub-web-react/src/app/entity/ermodelrelationships/ERModelRelationshipEntity.tsx @@ -1,8 +1,9 @@ +import '@app/entity/ermodelrelationships/preview/ERModelRelationshipAction.less'; + import { DatabaseFilled, DatabaseOutlined } from '@ant-design/icons'; import * as React from 'react'; import { Entity, IconStyleType, PreviewType } from '@app/entity/Entity'; -import '@app/entity/ermodelrelationships/preview/ERModelRelationshipAction.less'; import { ERModelRelationshipPreviewCard } from '@app/entity/ermodelrelationships/preview/ERModelRelationshipPreviewCard'; import { EntityProfile } from '@app/entity/shared/containers/profile/EntityProfile'; import { SidebarAboutSection } from '@app/entity/shared/containers/profile/sidebar/AboutSection/SidebarAboutSection'; diff --git a/datahub-web-react/src/app/entity/shared/components/styled/ERModelRelationship/CreateERModelRelationModal.tsx b/datahub-web-react/src/app/entity/shared/components/styled/ERModelRelationship/CreateERModelRelationModal.tsx index fc29a3ba42..cf3819eee1 100644 --- a/datahub-web-react/src/app/entity/shared/components/styled/ERModelRelationship/CreateERModelRelationModal.tsx +++ b/datahub-web-react/src/app/entity/shared/components/styled/ERModelRelationship/CreateERModelRelationModal.tsx @@ -1,10 +1,11 @@ +import '@app/entity/shared/components/styled/ERModelRelationship/CreateERModelRelationModal.less'; + import { PlusOutlined } from '@ant-design/icons'; import { Button, Form, Input, Modal, Table, message } from 'antd'; import TextArea from 'antd/lib/input/TextArea'; import React, { useState } from 'react'; import { useUserContext } from '@app/context/useUserContext'; -import '@app/entity/shared/components/styled/ERModelRelationship/CreateERModelRelationModal.less'; import { ERModelRelationDataType, checkDuplicateERModelRelation, diff --git a/datahub-web-react/src/app/entity/shared/components/styled/ERModelRelationship/ERModelRelationPreview.tsx b/datahub-web-react/src/app/entity/shared/components/styled/ERModelRelationship/ERModelRelationPreview.tsx index c9b3fa7a06..328795ee31 100644 --- a/datahub-web-react/src/app/entity/shared/components/styled/ERModelRelationship/ERModelRelationPreview.tsx +++ b/datahub-web-react/src/app/entity/shared/components/styled/ERModelRelationship/ERModelRelationPreview.tsx @@ -1,9 +1,10 @@ +import '@app/entity/shared/components/styled/ERModelRelationship/ERModelRelationPreview.less'; + import { RightOutlined } from '@ant-design/icons'; import { Button, Row, Table } from 'antd'; import React, { useState } from 'react'; import { CreateERModelRelationModal } from '@app/entity/shared/components/styled/ERModelRelationship/CreateERModelRelationModal'; -import '@app/entity/shared/components/styled/ERModelRelationship/ERModelRelationPreview.less'; import { getDatasetName } from '@app/entity/shared/components/styled/ERModelRelationship/ERModelRelationUtils'; import { useEntityRegistry } from '@app/useEntityRegistry'; diff --git a/datahub-web-react/src/app/entity/shared/tabs/Dataset/Relationship/RelationshipsTab.tsx b/datahub-web-react/src/app/entity/shared/tabs/Dataset/Relationship/RelationshipsTab.tsx index 43a6e87aea..a6ba2a532d 100644 --- a/datahub-web-react/src/app/entity/shared/tabs/Dataset/Relationship/RelationshipsTab.tsx +++ b/datahub-web-react/src/app/entity/shared/tabs/Dataset/Relationship/RelationshipsTab.tsx @@ -1,3 +1,5 @@ +import '@app/entity/shared/tabs/Dataset/Relationship/RelationshipsTab.less'; + import { ExclamationCircleFilled, LoadingOutlined, PlusOutlined } from '@ant-design/icons'; import { Icon } from '@components'; import { Button, Card, Divider, Empty, Input, Modal, Pagination } from 'antd'; @@ -9,7 +11,6 @@ import { CreateERModelRelationModal } from '@app/entity/shared/components/styled import { ERModelRelationPreview } from '@app/entity/shared/components/styled/ERModelRelationship/ERModelRelationPreview'; import { SearchSelectModal } from '@app/entity/shared/components/styled/search/SearchSelectModal'; import { ANTD_GRAY } from '@app/entity/shared/constants'; -import '@app/entity/shared/tabs/Dataset/Relationship/RelationshipsTab.less'; import { useGetEntityWithSchema } from '@app/entity/shared/tabs/Dataset/Schema/useGetEntitySchema'; import { GetDatasetQuery, useGetDatasetLazyQuery, useGetDatasetSchemaLazyQuery } from '@graphql/dataset.generated'; diff --git a/datahub-web-react/src/app/entity/shared/tabs/ERModelRelationship/ERModelRelationshipTab.tsx b/datahub-web-react/src/app/entity/shared/tabs/ERModelRelationship/ERModelRelationshipTab.tsx index e8eb73ae90..14e77f4cd7 100644 --- a/datahub-web-react/src/app/entity/shared/tabs/ERModelRelationship/ERModelRelationshipTab.tsx +++ b/datahub-web-react/src/app/entity/shared/tabs/ERModelRelationship/ERModelRelationshipTab.tsx @@ -1,9 +1,10 @@ +import '@app/entity/shared/tabs/ERModelRelationship/ERModelRelationshipTab.less'; + import { Divider } from 'antd'; import React from 'react'; import { useEntityData, useRefetch } from '@app/entity/shared/EntityContext'; import { ERModelRelationPreview } from '@app/entity/shared/components/styled/ERModelRelationship/ERModelRelationPreview'; -import '@app/entity/shared/tabs/ERModelRelationship/ERModelRelationshipTab.less'; export const ERModelRelationshipTab = () => { const { entityData } = useEntityData();