mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
refactor: import emotion-theming methods from @superset-ui/style (#10157)
This makes the code cleaner and fixes missing theme variables when `npm link @superset-ui/style`.
This commit is contained in:
@@ -125,7 +125,6 @@
|
||||
"dnd-core": "^2.6.0",
|
||||
"dom-to-image": "^2.6.0",
|
||||
"dompurify": "^2.0.7",
|
||||
"emotion-theming": "^10.0.27",
|
||||
"geolib": "^2.0.24",
|
||||
"immutable": "^3.8.2",
|
||||
"interweave": "^11.2.0",
|
||||
|
||||
@@ -28,8 +28,7 @@ import ListViewFilters from 'src/components/ListView/Filters';
|
||||
import ListViewPagination from 'src/components/ListView/Pagination';
|
||||
import Pagination from 'src/components/Pagination';
|
||||
import { areArraysShallowEqual } from 'src/reduxUtils';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
|
||||
export function makeMockLocation(query) {
|
||||
const queryStr = encodeURIComponent(query);
|
||||
|
||||
@@ -21,8 +21,7 @@ import { mount } from 'enzyme';
|
||||
import thunk from 'redux-thunk';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
|
||||
import ChartList from 'src/views/chartList/ChartList';
|
||||
import ListView from 'src/components/ListView/ListView';
|
||||
|
||||
@@ -21,8 +21,7 @@ import { mount } from 'enzyme';
|
||||
import thunk from 'redux-thunk';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
|
||||
import DashboardList from 'src/views/dashboardList/DashboardList';
|
||||
import ListView from 'src/components/ListView/ListView';
|
||||
|
||||
@@ -24,8 +24,7 @@ import fetchMock from 'fetch-mock';
|
||||
|
||||
import DatasetList from 'src/views/datasetList/DatasetList';
|
||||
import ListView from 'src/components/ListView/ListView';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
|
||||
// store needed for withToasts(datasetTable)
|
||||
const mockStore = configureStore([thunk]);
|
||||
|
||||
@@ -21,8 +21,7 @@ import { mount } from 'enzyme';
|
||||
import thunk from 'redux-thunk';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
|
||||
import ListView from 'src/components/ListView/ListView';
|
||||
import DashboardTable from 'src/welcome/DashboardTable';
|
||||
|
||||
@@ -21,8 +21,7 @@ import { createStore, compose, applyMiddleware } from 'redux';
|
||||
import { Provider } from 'react-redux';
|
||||
import thunkMiddleware from 'redux-thunk';
|
||||
import { hot } from 'react-hot-loader/root';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
import {
|
||||
initFeatureFlags,
|
||||
isFeatureEnabled,
|
||||
|
||||
@@ -23,8 +23,7 @@ import { connect } from 'react-redux';
|
||||
import $ from 'jquery';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import throttle from 'lodash/throttle';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
import TabbedSqlEditors from './TabbedSqlEditors';
|
||||
import QueryAutoRefresh from './QueryAutoRefresh';
|
||||
import QuerySearch from './QuerySearch';
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import { hot } from 'react-hot-loader/root';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
import setupApp from '../setup/setupApp';
|
||||
import setupPlugins from '../setup/setupPlugins';
|
||||
import AddSliceContainer from './AddSliceContainer';
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import React, { useState } from 'react';
|
||||
import styled from '@superset-ui/style';
|
||||
import { withTheme } from 'emotion-theming';
|
||||
import { styled, withTheme } from '@superset-ui/style';
|
||||
|
||||
import {
|
||||
Select,
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
import { hot } from 'react-hot-loader/root';
|
||||
import React from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
|
||||
import setupApp from '../setup/setupApp';
|
||||
import setupPlugins from '../setup/setupPlugins';
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
import React from 'react';
|
||||
import { hot } from 'react-hot-loader/root';
|
||||
import { Provider } from 'react-redux';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import styled, { supersetTheme } from '@superset-ui/style';
|
||||
import { styled, supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
import ToastPresenter from '../messageToasts/containers/ToastPresenter';
|
||||
import ExploreViewContainer from './components/ExploreViewContainer';
|
||||
import setupApp from '../setup/setupApp';
|
||||
|
||||
@@ -21,8 +21,7 @@ import { hot } from 'react-hot-loader/root';
|
||||
import thunk from 'redux-thunk';
|
||||
import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
|
||||
import { Provider } from 'react-redux';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
import App from './components/App';
|
||||
import messageToastReducer from '../messageToasts/reducers';
|
||||
import { initEnhancer } from '../reduxUtils';
|
||||
|
||||
@@ -23,10 +23,9 @@ import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
|
||||
import { Provider } from 'react-redux';
|
||||
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
|
||||
import { QueryParamProvider } from 'use-query-params';
|
||||
import { ThemeProvider } from 'emotion-theming';
|
||||
|
||||
import { initFeatureFlags } from 'src/featureFlags';
|
||||
import { supersetTheme } from '@superset-ui/style';
|
||||
import { supersetTheme, ThemeProvider } from '@superset-ui/style';
|
||||
import ErrorBoundary from 'src/components/ErrorBoundary';
|
||||
import Menu from 'src/components/Menu/Menu';
|
||||
import FlashProvider from 'src/components/FlashProvider';
|
||||
|
||||
Reference in New Issue
Block a user