From 82f776506042c25df685e4e7a77a3d4786188082 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Tue, 18 Feb 2025 13:14:17 -0700 Subject: [PATCH] move fonts around --- .../asset_interfaces/datasets/interfaces.ts | 2 +- .../api/asset_interfaces/metric/interfaces.ts | 2 +- .../api/buster_rest/datasets/queryRequests.ts | 20 +++++++++--------- web/src/api/query_keys/datasets.ts | 11 +++++----- web/src/api/query_keys/index.ts | 2 +- web/src/styles/{base/_antd.scss => antd.scss} | 0 .../styles/{base/_fonts.scss => fonts.scss} | 0 .../styles/{base => }/fonts/Roobert-Bold.otf | Bin .../styles/{base => }/fonts/Roobert-Bold.woff | Bin .../{base => }/fonts/Roobert-BoldItalic.otf | Bin .../{base => }/fonts/Roobert-BoldItalic.woff | Bin .../styles/{base => }/fonts/Roobert-Heavy.otf | Bin .../{base => }/fonts/Roobert-Heavy.woff | Bin .../{base => }/fonts/Roobert-HeavyItalic.otf | Bin .../{base => }/fonts/Roobert-HeavyItalic.woff | Bin .../styles/{base => }/fonts/Roobert-Light.otf | Bin .../{base => }/fonts/Roobert-Light.woff | Bin .../{base => }/fonts/Roobert-LightItalic.otf | Bin .../{base => }/fonts/Roobert-LightItalic.woff | Bin .../{base => }/fonts/Roobert-Medium.otf | Bin .../{base => }/fonts/Roobert-Medium.woff | Bin .../{base => }/fonts/Roobert-MediumItalic.otf | Bin .../fonts/Roobert-MediumItalic.woff | Bin .../{base => }/fonts/Roobert-Regular.otf | Bin .../{base => }/fonts/Roobert-Regular.woff | Bin .../fonts/Roobert-RegularItalic.otf | Bin .../fonts/Roobert-RegularItalic.woff | Bin .../{base => }/fonts/Roobert-SemiBold.otf | Bin .../{base => }/fonts/Roobert-SemiBold.woff | Bin .../fonts/Roobert-SemiBoldItalic.otf | Bin .../fonts/Roobert-SemiBoldItalic.woff | Bin .../styles/{base/_reset.scss => reset.scss} | 0 web/src/styles/{base/_sql.scss => sql.scss} | 0 web/src/styles/styles.scss | 17 +++++++-------- .../{base/_tailwind.scss => tailwind.scss} | 6 ------ web/src/styles/transitions.scss | 9 -------- 36 files changed, 26 insertions(+), 43 deletions(-) rename web/src/styles/{base/_antd.scss => antd.scss} (100%) rename web/src/styles/{base/_fonts.scss => fonts.scss} (100%) rename web/src/styles/{base => }/fonts/Roobert-Bold.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-Bold.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-BoldItalic.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-BoldItalic.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-Heavy.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-Heavy.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-HeavyItalic.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-HeavyItalic.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-Light.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-Light.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-LightItalic.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-LightItalic.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-Medium.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-Medium.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-MediumItalic.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-MediumItalic.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-Regular.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-Regular.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-RegularItalic.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-RegularItalic.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-SemiBold.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-SemiBold.woff (100%) rename web/src/styles/{base => }/fonts/Roobert-SemiBoldItalic.otf (100%) rename web/src/styles/{base => }/fonts/Roobert-SemiBoldItalic.woff (100%) rename web/src/styles/{base/_reset.scss => reset.scss} (100%) rename web/src/styles/{base/_sql.scss => sql.scss} (100%) rename web/src/styles/{base/_tailwind.scss => tailwind.scss} (52%) delete mode 100644 web/src/styles/transitions.scss diff --git a/web/src/api/asset_interfaces/datasets/interfaces.ts b/web/src/api/asset_interfaces/datasets/interfaces.ts index ea475a5a4..954353ff9 100644 --- a/web/src/api/asset_interfaces/datasets/interfaces.ts +++ b/web/src/api/asset_interfaces/datasets/interfaces.ts @@ -1,4 +1,4 @@ -import type { DataSourceTypes } from '../datasources'; +import type { DataSourceTypes } from '../datasources/interfaces'; export interface BusterDatasetListItem { id: string; diff --git a/web/src/api/asset_interfaces/metric/interfaces.ts b/web/src/api/asset_interfaces/metric/interfaces.ts index 47b61f71d..c197eee78 100644 --- a/web/src/api/asset_interfaces/metric/interfaces.ts +++ b/web/src/api/asset_interfaces/metric/interfaces.ts @@ -1,5 +1,5 @@ import type { BusterChartConfigProps } from '@/components/charts'; -import { BusterShare, VerificationStatus } from '../share'; +import { type BusterShare, type VerificationStatus } from '../share'; export type BusterMetric = { id: string; diff --git a/web/src/api/buster_rest/datasets/queryRequests.ts b/web/src/api/buster_rest/datasets/queryRequests.ts index 56ddb7b77..f438154e2 100644 --- a/web/src/api/buster_rest/datasets/queryRequests.ts +++ b/web/src/api/buster_rest/datasets/queryRequests.ts @@ -1,8 +1,4 @@ -import { - PREFETCH_STALE_TIME, - useCreateReactMutation, - useCreateReactQuery -} from '@/api/createReactQuery'; +import { useCreateReactMutation, useCreateReactQuery } from '@/api/createReactQuery'; import { createDataset, deployDataset, @@ -17,6 +13,10 @@ import { import { useMemoizedFn } from 'ahooks'; import { QueryClient, useQueryClient } from '@tanstack/react-query'; import { queryKeys } from '@/api/query_keys'; +import { datasetQueryKeys } from '@/api/query_keys/datasets'; + +const options = datasetQueryKeys.datasetsListQueryOptions(); +const baseDatasetQueryKey = options.queryKey; export const useGetDatasets = (params?: Parameters[0]) => { const queryFn = useMemoizedFn(() => { @@ -24,7 +24,7 @@ export const useGetDatasets = (params?: Parameters[0]) => { }); const res = useCreateReactQuery({ - ...queryKeys.datasetsList(params), + ...queryKeys.datasetsListQueryOptions(params), queryFn }); @@ -41,7 +41,7 @@ export const prefetchGetDatasets = async ( const queryClient = queryClientProp || new QueryClient(); await queryClient.prefetchQuery({ - ...queryKeys.datasetsList(params), + ...queryKeys.datasetsListQueryOptions(params), queryFn: () => getDatasets_server(params) }); @@ -84,7 +84,7 @@ export const useCreateDataset = () => { const queryClient = useQueryClient(); const onSuccess = useMemoizedFn(() => { - queryClient.invalidateQueries({ queryKey: queryKeys.datasetsList().queryKey, exact: true }); + queryClient.invalidateQueries({ queryKey: baseDatasetQueryKey, exact: true }); }); return useCreateReactMutation({ @@ -102,7 +102,7 @@ export const useDeployDataset = () => { return useCreateReactMutation({ mutationFn, onSuccess: (data, variables, context) => { - queryClient.invalidateQueries({ queryKey: queryKeys.datasetsList().queryKey, exact: true }); + queryClient.invalidateQueries({ queryKey: baseDatasetQueryKey, exact: true }); } }); }; @@ -116,7 +116,7 @@ export const useUpdateDataset = () => { export const useDeleteDataset = () => { const queryClient = useQueryClient(); const onSuccess = useMemoizedFn(() => { - queryClient.invalidateQueries({ queryKey: queryKeys.datasetsList().queryKey, exact: true }); + queryClient.invalidateQueries({ queryKey: baseDatasetQueryKey, exact: true }); }); return useCreateReactMutation({ mutationFn: deleteDataset, diff --git a/web/src/api/query_keys/datasets.ts b/web/src/api/query_keys/datasets.ts index 2000a457f..1e3a46048 100644 --- a/web/src/api/query_keys/datasets.ts +++ b/web/src/api/query_keys/datasets.ts @@ -1,10 +1,9 @@ -'use client'; - import { queryOptions } from '@tanstack/react-query'; -import type { BusterDataset, BusterDatasetListItem, IDataResult } from '../asset_interfaces'; -import type { GetDatasetsParams } from '../request_interfaces/dataset'; +import type { BusterDataset, BusterDatasetListItem } from '../asset_interfaces/datasets/interfaces'; +import type { IDataResult } from '../asset_interfaces/metric/interfaces'; +import type { GetDatasetsParams } from '../request_interfaces/dataset/interfaces'; -const datasetsList = (params?: GetDatasetsParams) => +const datasetsListQueryOptions = (params?: GetDatasetsParams) => queryOptions({ queryKey: ['datasets', params] }); @@ -21,7 +20,7 @@ const datasetMetadata = (datasetId: string) => }); export const datasetQueryKeys = { - datasetsList, + datasetsListQueryOptions, datasetData, datasetMetadata }; diff --git a/web/src/api/query_keys/index.ts b/web/src/api/query_keys/index.ts index c738d85da..4deb96e77 100644 --- a/web/src/api/query_keys/index.ts +++ b/web/src/api/query_keys/index.ts @@ -11,6 +11,7 @@ import { datasetQueryKeys } from './datasets'; import { permissionGroupQueryKeys } from './permission_groups'; export const queryKeys = { + ...datasetQueryKeys, ...chatQueryKeys, ...collectionQueryKeys, ...userQueryKeys, @@ -20,6 +21,5 @@ export const queryKeys = { ...termsQueryKeys, ...datasourceQueryKeys, ...datasetGroupQueryKeys, - ...datasetQueryKeys, ...permissionGroupQueryKeys }; diff --git a/web/src/styles/base/_antd.scss b/web/src/styles/antd.scss similarity index 100% rename from web/src/styles/base/_antd.scss rename to web/src/styles/antd.scss diff --git a/web/src/styles/base/_fonts.scss b/web/src/styles/fonts.scss similarity index 100% rename from web/src/styles/base/_fonts.scss rename to web/src/styles/fonts.scss diff --git a/web/src/styles/base/fonts/Roobert-Bold.otf b/web/src/styles/fonts/Roobert-Bold.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-Bold.otf rename to web/src/styles/fonts/Roobert-Bold.otf diff --git a/web/src/styles/base/fonts/Roobert-Bold.woff b/web/src/styles/fonts/Roobert-Bold.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-Bold.woff rename to web/src/styles/fonts/Roobert-Bold.woff diff --git a/web/src/styles/base/fonts/Roobert-BoldItalic.otf b/web/src/styles/fonts/Roobert-BoldItalic.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-BoldItalic.otf rename to web/src/styles/fonts/Roobert-BoldItalic.otf diff --git a/web/src/styles/base/fonts/Roobert-BoldItalic.woff b/web/src/styles/fonts/Roobert-BoldItalic.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-BoldItalic.woff rename to web/src/styles/fonts/Roobert-BoldItalic.woff diff --git a/web/src/styles/base/fonts/Roobert-Heavy.otf b/web/src/styles/fonts/Roobert-Heavy.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-Heavy.otf rename to web/src/styles/fonts/Roobert-Heavy.otf diff --git a/web/src/styles/base/fonts/Roobert-Heavy.woff b/web/src/styles/fonts/Roobert-Heavy.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-Heavy.woff rename to web/src/styles/fonts/Roobert-Heavy.woff diff --git a/web/src/styles/base/fonts/Roobert-HeavyItalic.otf b/web/src/styles/fonts/Roobert-HeavyItalic.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-HeavyItalic.otf rename to web/src/styles/fonts/Roobert-HeavyItalic.otf diff --git a/web/src/styles/base/fonts/Roobert-HeavyItalic.woff b/web/src/styles/fonts/Roobert-HeavyItalic.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-HeavyItalic.woff rename to web/src/styles/fonts/Roobert-HeavyItalic.woff diff --git a/web/src/styles/base/fonts/Roobert-Light.otf b/web/src/styles/fonts/Roobert-Light.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-Light.otf rename to web/src/styles/fonts/Roobert-Light.otf diff --git a/web/src/styles/base/fonts/Roobert-Light.woff b/web/src/styles/fonts/Roobert-Light.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-Light.woff rename to web/src/styles/fonts/Roobert-Light.woff diff --git a/web/src/styles/base/fonts/Roobert-LightItalic.otf b/web/src/styles/fonts/Roobert-LightItalic.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-LightItalic.otf rename to web/src/styles/fonts/Roobert-LightItalic.otf diff --git a/web/src/styles/base/fonts/Roobert-LightItalic.woff b/web/src/styles/fonts/Roobert-LightItalic.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-LightItalic.woff rename to web/src/styles/fonts/Roobert-LightItalic.woff diff --git a/web/src/styles/base/fonts/Roobert-Medium.otf b/web/src/styles/fonts/Roobert-Medium.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-Medium.otf rename to web/src/styles/fonts/Roobert-Medium.otf diff --git a/web/src/styles/base/fonts/Roobert-Medium.woff b/web/src/styles/fonts/Roobert-Medium.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-Medium.woff rename to web/src/styles/fonts/Roobert-Medium.woff diff --git a/web/src/styles/base/fonts/Roobert-MediumItalic.otf b/web/src/styles/fonts/Roobert-MediumItalic.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-MediumItalic.otf rename to web/src/styles/fonts/Roobert-MediumItalic.otf diff --git a/web/src/styles/base/fonts/Roobert-MediumItalic.woff b/web/src/styles/fonts/Roobert-MediumItalic.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-MediumItalic.woff rename to web/src/styles/fonts/Roobert-MediumItalic.woff diff --git a/web/src/styles/base/fonts/Roobert-Regular.otf b/web/src/styles/fonts/Roobert-Regular.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-Regular.otf rename to web/src/styles/fonts/Roobert-Regular.otf diff --git a/web/src/styles/base/fonts/Roobert-Regular.woff b/web/src/styles/fonts/Roobert-Regular.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-Regular.woff rename to web/src/styles/fonts/Roobert-Regular.woff diff --git a/web/src/styles/base/fonts/Roobert-RegularItalic.otf b/web/src/styles/fonts/Roobert-RegularItalic.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-RegularItalic.otf rename to web/src/styles/fonts/Roobert-RegularItalic.otf diff --git a/web/src/styles/base/fonts/Roobert-RegularItalic.woff b/web/src/styles/fonts/Roobert-RegularItalic.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-RegularItalic.woff rename to web/src/styles/fonts/Roobert-RegularItalic.woff diff --git a/web/src/styles/base/fonts/Roobert-SemiBold.otf b/web/src/styles/fonts/Roobert-SemiBold.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-SemiBold.otf rename to web/src/styles/fonts/Roobert-SemiBold.otf diff --git a/web/src/styles/base/fonts/Roobert-SemiBold.woff b/web/src/styles/fonts/Roobert-SemiBold.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-SemiBold.woff rename to web/src/styles/fonts/Roobert-SemiBold.woff diff --git a/web/src/styles/base/fonts/Roobert-SemiBoldItalic.otf b/web/src/styles/fonts/Roobert-SemiBoldItalic.otf similarity index 100% rename from web/src/styles/base/fonts/Roobert-SemiBoldItalic.otf rename to web/src/styles/fonts/Roobert-SemiBoldItalic.otf diff --git a/web/src/styles/base/fonts/Roobert-SemiBoldItalic.woff b/web/src/styles/fonts/Roobert-SemiBoldItalic.woff similarity index 100% rename from web/src/styles/base/fonts/Roobert-SemiBoldItalic.woff rename to web/src/styles/fonts/Roobert-SemiBoldItalic.woff diff --git a/web/src/styles/base/_reset.scss b/web/src/styles/reset.scss similarity index 100% rename from web/src/styles/base/_reset.scss rename to web/src/styles/reset.scss diff --git a/web/src/styles/base/_sql.scss b/web/src/styles/sql.scss similarity index 100% rename from web/src/styles/base/_sql.scss rename to web/src/styles/sql.scss diff --git a/web/src/styles/styles.scss b/web/src/styles/styles.scss index 9c73e5a90..2a0dca1d1 100644 --- a/web/src/styles/styles.scss +++ b/web/src/styles/styles.scss @@ -1,13 +1,12 @@ -@import './base/_fonts'; -@import './base/_tailwind'; -@import './base/_antd'; -@import './base/_reset'; -@import './base/_sql'; +@import './tailwind'; +@import './fonts'; +@import './antd'; +@import './reset'; +@import './sql'; @import './loaders'; -@import './transitions.scss'; -@import './animations.scss'; -@import './monaco.scss'; -@import '../components/layout/AppSplitter/SplitPane/themes/default.scss'; +@import './animations'; +@import './monaco'; +@import '../components/layout/AppSplitter/SplitPane/themes/default'; @import 'react-data-grid/lib/styles.css'; h1, diff --git a/web/src/styles/base/_tailwind.scss b/web/src/styles/tailwind.scss similarity index 52% rename from web/src/styles/base/_tailwind.scss rename to web/src/styles/tailwind.scss index fa8d816db..b5c61c956 100644 --- a/web/src/styles/base/_tailwind.scss +++ b/web/src/styles/tailwind.scss @@ -1,9 +1,3 @@ @tailwind base; @tailwind components; @tailwind utilities; - -@layer base { - img { - @apply inline-block; - } -} diff --git a/web/src/styles/transitions.scss b/web/src/styles/transitions.scss deleted file mode 100644 index aadfdaa62..000000000 --- a/web/src/styles/transitions.scss +++ /dev/null @@ -1,9 +0,0 @@ -@keyframes pop { - 0% { - transform: translate3d(var(--translate-x, 0), var(--translate-y, 0), 0) scale(1); - } - 100% { - transform: translate3d(var(--translate-x, 0), var(--translate-y, 0), 0) scale(var(--scale)); - box-shadow: var(--box-shadow); - } -}