You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2025/01/15 07:36:54 UTC
(superset) 02/02: rm component overrides
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch alerts_refactor
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 2e3328b2923ff202bdabfb85cbe0375cc9628f36
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Tue Jan 14 23:36:20 2025 -0800
rm component overrides
---
superset-frontend/spec/helpers/theming.ts | 57 -------------------------------
superset-frontend/src/theme/index.ts | 9 -----
2 files changed, 66 deletions(-)
diff --git a/superset-frontend/spec/helpers/theming.ts b/superset-frontend/spec/helpers/theming.ts
deleted file mode 100644
index e364b41345..0000000000
--- a/superset-frontend/spec/helpers/theming.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import { shallow as enzymeShallow, mount as enzymeMount } from 'enzyme';
-// eslint-disable-next-line no-restricted-imports
-import { supersetTheme } from '@superset-ui/core';
-import { ReactElement } from 'react';
-import { ProviderWrapper } from './ProviderWrapper';
-
-type optionsType = {
- wrappingComponentProps?: any;
- wrappingComponent?: ReactElement;
- context?: any;
-};
-
-export function styledMount(
- component: ReactElement,
- options: optionsType = {},
-) {
- return enzymeMount(component, {
- ...options,
- wrappingComponent: ProviderWrapper,
- wrappingComponentProps: {
- theme: supersetTheme,
- ...options?.wrappingComponentProps,
- },
- });
-}
-
-export function styledShallow(
- component: ReactElement,
- options: optionsType = {},
-) {
- return enzymeShallow(component, {
- ...options,
- wrappingComponent: ProviderWrapper,
- wrappingComponentProps: {
- theme: supersetTheme,
- ...options?.wrappingComponentProps,
- },
- });
-}
diff --git a/superset-frontend/src/theme/index.ts b/superset-frontend/src/theme/index.ts
index 7b61bfdeca..80b971cc8f 100644
--- a/superset-frontend/src/theme/index.ts
+++ b/superset-frontend/src/theme/index.ts
@@ -56,15 +56,6 @@ const baseConfig: ThemeConfig = {
zIndexPopupBase: supersetTheme.zIndex.max,
},
components: {
- Alert: {
- borderRadius: supersetTheme.borderRadius,
- colorBgContainer: supersetTheme.colors.grayscale.light5,
- colorBorder: supersetTheme.colors.grayscale.light3,
- fontSize: supersetTheme.typography.sizes.m,
- fontSizeLG: supersetTheme.typography.sizes.m,
- fontSizeIcon: supersetTheme.typography.sizes.l,
- colorText: supersetTheme.colors.grayscale.dark1,
- },
Avatar: {
containerSize: 32,
fontSize: supersetTheme.typography.sizes.s,