Skip to content

Commit

Permalink
chore: Moves the Menu to views/components folder
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Dec 30, 2021
1 parent 8ebec60 commit bc96aff
Show file tree
Hide file tree
Showing 27 changed files with 28 additions and 23 deletions.
1 change: 1 addition & 0 deletions superset-frontend/src/common/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export {
Divider,
Dropdown,
Form,
Grid,
Empty,
Typography,
Tree,
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { ThemeProvider } from '@superset-ui/core';
import { DynamicPluginProvider } from 'src/components/DynamicPlugins';
import ErrorBoundary from 'src/components/ErrorBoundary';
import Loading from 'src/components/Loading';
import Menu from 'src/components/Menu/Menu';
import Menu from 'src/views/components/Menu';
import FlashProvider from 'src/components/FlashProvider';
import { theme } from 'src/preamble';
import ToastContainer from 'src/components/MessageToasts/ToastContainer';
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/alert/AlertList.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { styledMount as mount } from 'spec/helpers/theming';
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
import { Switch } from 'src/components/Switch';
import ListView from 'src/components/ListView';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';
import AlertList from 'src/views/CRUD/alert/AlertList';
import IndeterminateCheckbox from 'src/components/IndeterminateCheckbox';
import { act } from 'react-dom/test-utils';
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/alert/AlertList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import ListView, {
Filters,
ListViewProps,
} from 'src/components/ListView';
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
import SubMenu, { SubMenuProps } from 'src/views/components/SubMenu';
import { Switch } from 'src/components/Switch';
import { DATETIME_WITH_TIME_ZONE } from 'src/constants';
import withToasts from 'src/components/MessageToasts/withToasts';
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/alert/ExecutionLog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import moment from 'moment';
import React, { useEffect, useMemo } from 'react';
import { Link, useParams } from 'react-router-dom';
import ListView from 'src/components/ListView';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';
import withToasts from 'src/components/MessageToasts/withToasts';
import { fDuration } from 'src/modules/dates';
import AlertStatusIcon from 'src/views/CRUD/alert/components/AlertStatusIcon';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import AnnotationList from 'src/views/CRUD/annotation/AnnotationList';
import DeleteModal from 'src/components/DeleteModal';
import IndeterminateCheckbox from 'src/components/IndeterminateCheckbox';
import ListView from 'src/components/ListView';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';

import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
import { act } from 'react-dom/test-utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import moment from 'moment';
import { useListViewResource } from 'src/views/CRUD/hooks';
import { createFetchRelated, createErrorHandler } from 'src/views/CRUD/utils';
import withToasts from 'src/components/MessageToasts/withToasts';
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
import SubMenu, { SubMenuProps } from 'src/views/components/SubMenu';
import ActionsBar, { ActionProps } from 'src/components/ListView/ActionsBar';
import ListView, {
ListViewProps,
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/chart/ChartList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
} from 'src/views/CRUD/hooks';
import handleResourceExport from 'src/utils/export';
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
import SubMenu, { SubMenuProps } from 'src/views/components/SubMenu';
import FaveStar from 'src/components/FaveStar';
import ListView, {
Filter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import fetchMock from 'fetch-mock';
import { styledMount as mount } from 'spec/helpers/theming';

import CssTemplatesList from 'src/views/CRUD/csstemplates/CssTemplatesList';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';
import ListView from 'src/components/ListView';
import Filters from 'src/components/ListView/Filters';
import DeleteModal from 'src/components/DeleteModal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import * as featureFlags from 'src/featureFlags';
import DatabaseList from 'src/views/CRUD/data/database/DatabaseList';
import DatabaseModal from 'src/views/CRUD/data/database/DatabaseModal';
import DeleteModal from 'src/components/DeleteModal';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';
import ListView from 'src/components/ListView';
import Filters from 'src/components/ListView/Filters';
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import { useListViewResource } from 'src/views/CRUD/hooks';
import { createErrorHandler } from 'src/views/CRUD/utils';
import withToasts from 'src/components/MessageToasts/withToasts';
import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
import SubMenu, { SubMenuProps } from 'src/views/components/SubMenu';
import DeleteModal from 'src/components/DeleteModal';
import { Tooltip } from 'src/components/Tooltip';
import Icons from 'src/components/Icons';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import Loading from 'src/components/Loading';
import SubMenu, {
SubMenuProps,
ButtonProps,
} from 'src/components/Menu/SubMenu';
} from 'src/views/components/SubMenu';
import { commonMenuData } from 'src/views/CRUD/data/common';
import Owner from 'src/types/Owner';
import withToasts from 'src/components/MessageToasts/withToasts';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { QueryParamProvider } from 'use-query-params';
import { act } from 'react-dom/test-utils';
import * as featureFlags from 'src/featureFlags';
import SavedQueryList from 'src/views/CRUD/data/savedquery/SavedQueryList';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';
import ListView from 'src/components/ListView';
import Filters from 'src/components/ListView/Filters';
import ActionsBar from 'src/components/ListView/ActionsBar';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import handleResourceExport from 'src/utils/export';
import SubMenu, {
SubMenuProps,
ButtonProps,
} from 'src/components/Menu/SubMenu';
} from 'src/views/components/SubMenu';
import ListView, {
ListViewProps,
Filters,
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { styled, t } from '@superset-ui/core';
import { setItem, LocalStorageKeys } from 'src/utils/localStorageHelpers';

import ListViewCard from 'src/components/ListViewCard';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';
import { ActivityData, LoadingCards } from 'src/views/CRUD/welcome/Welcome';
import {
CardContainer,
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/welcome/ChartTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import Chart from 'src/types/Chart';
import handleResourceExport from 'src/utils/export';
import Loading from 'src/components/Loading';
import ErrorBoundary from 'src/components/ErrorBoundary';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';
import EmptyState from './EmptyState';
import { WelcomeTable } from './types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import withToasts from 'src/components/MessageToasts/withToasts';
import Loading from 'src/components/Loading';
import PropertiesModal from 'src/dashboard/components/PropertiesModal';
import DashboardCard from 'src/views/CRUD/dashboard/DashboardCard';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';
import EmptyState from './EmptyState';
import { WelcomeTable } from './types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import configureStore from 'redux-mock-store';
import { act } from 'react-dom/test-utils';

import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';
import SavedQueries from 'src/views/CRUD/welcome/SavedQueries';

// store needed for withToasts(DashboardTable)
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { copyQueryLink, useListViewResource } from 'src/views/CRUD/hooks';
import ListViewCard from 'src/components/ListViewCard';
import DeleteModal from 'src/components/DeleteModal';
import Icons from 'src/components/Icons';
import SubMenu from 'src/components/Menu/SubMenu';
import SubMenu from 'src/views/components/SubMenu';
import EmptyState from './EmptyState';
import {
CardContainer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ import { styled, css } from '@superset-ui/core';
import { debounce } from 'lodash';
import { Global } from '@emotion/react';
import { getUrlParam } from 'src/utils/urlUtils';
import { MainNav as DropdownMenu, MenuMode } from 'src/common/components';
import {
MainNav as DropdownMenu,
MenuMode,
Row,
Col,
Grid,
} from 'src/common/components';
import { Tooltip } from 'src/components/Tooltip';
import { Link } from 'react-router-dom';
import { Row, Col, Grid } from 'antd';
import Icons from 'src/components/Icons';
import { URL_PARAMS } from 'src/constants';
import RightMenu from './MenuRight';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import { Link, useHistory } from 'react-router-dom';
import { styled } from '@superset-ui/core';
import cx from 'classnames';
import { debounce } from 'lodash';
import { Row } from 'antd';
import { Menu, MenuMode } from 'src/common/components';
import { Menu, MenuMode, Row } from 'src/common/components';
import Button, { OnClickHandler } from 'src/components/Button';

const StyledHeader = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import ReactDOM from 'react-dom';
import { CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache';
import { ThemeProvider } from '@superset-ui/core';
import Menu from 'src/components/Menu/Menu';
import Menu from 'src/views/components/Menu';
import { theme } from 'src/preamble';

import { Provider } from 'react-redux';
Expand Down

0 comments on commit bc96aff

Please sign in to comment.