Unverified Commit 43f3ce9d authored by Marcos Iglesias's avatar Marcos Iglesias Committed by GitHub

refactor: Moving common folder down into the components folder (#817)

* Moving alert component
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moving SVGIcons
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moving announcements
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moving AvatarLabel
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moving BadgeList and Bookmarks
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moving Breadcrumb
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moving Card component
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moved EditableSection
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moves EditableText, EntityCard, Flag, FlashMessage
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moves EntityCard, InfoButton, Inputs and PopularTables
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moves LoadingSpinner, OwnerEditor, PopularTables, Preloader, SearchBar
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moves ResourceList, ResourceStatusMarker
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moves SearcBar, ShimmeringResourceLoader, ShimmeringTagListLoader, StorySection
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Moves Table, TabsComponent and Tags
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>

* Updates betterer results
Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>
parent e1f4cf0d
......@@ -10,7 +10,7 @@ import { Badge } from 'interfaces/Badges';
import * as UtilMethods from 'ducks/utilMethods';
import Flag from 'components/common/Flag';
import Flag from 'components/Flag';
import BadgeList, { BadgeListProps } from '.';
......
......@@ -2,14 +2,13 @@
// SPDX-License-Identifier: Apache-2.0
import * as React from 'react';
import { shallow } from 'enzyme';
import { mocked } from 'ts-jest/utils';
import globalState from 'fixtures/globalState';
import { ResourceType } from 'interfaces';
import PaginatedResourceList from 'components/common/ResourceList/PaginatedResourceList';
import TabsComponent from 'components/common/TabsComponent';
import PaginatedResourceList from 'components/ResourceList/PaginatedResourceList';
import TabsComponent from 'components/TabsComponent';
import { indexDashboardsEnabled } from 'config/config-utils';
import {
BOOKMARK_TITLE,
......
......@@ -3,17 +3,17 @@
import * as React from 'react';
import { connect } from 'react-redux';
import { GlobalState } from 'ducks/rootReducer';
import './styles.scss';
import { Bookmark, ResourceType, ResourceDict } from 'interfaces';
import {
getDisplayNameByResource,
indexDashboardsEnabled,
} from 'config/config-utils';
import PaginatedResourceList from 'components/common/ResourceList/PaginatedResourceList';
import TabsComponent, { TabInfo } from 'components/common/TabsComponent';
import ShimmeringResourceLoader from 'components/common/ShimmeringResourceLoader';
import PaginatedResourceList from 'components/ResourceList/PaginatedResourceList';
import TabsComponent, { TabInfo } from 'components/TabsComponent';
import ShimmeringResourceLoader from 'components/ShimmeringResourceLoader';
import {
BOOKMARK_TITLE,
BOOKMARKS_PER_PAGE,
......@@ -21,6 +21,8 @@ import {
MY_BOOKMARKS_SOURCE_NAME,
} from './constants';
import './styles.scss';
interface StateFromProps {
myBookmarks: ResourceDict<Bookmark[]>;
isLoaded: boolean;
......
......@@ -4,7 +4,7 @@
import * as React from 'react';
import { shallow } from 'enzyme';
import TagInput from 'components/common/Tags/TagInput';
import TagInput from 'components/Tags/TagInput';
import { ResourceType } from 'interfaces/Resources';
import EditableSection, { EditableSectionProps } from '.';
......
......@@ -3,7 +3,6 @@
import * as React from 'react';
import * as ReactMarkdown from 'react-markdown';
import * as autosize from 'autosize';
import { shallow } from 'enzyme';
import {
......@@ -11,7 +10,7 @@ import {
REFRESH_BUTTON_TEXT,
REFRESH_MESSAGE,
UPDATE_BUTTON_TEXT,
} from 'components/common/EditableText/constants';
} from 'components/EditableText/constants';
import EditableText, { EditableTextProps } from '.';
describe('EditableText', () => {
......
......@@ -5,9 +5,7 @@ import * as autosize from 'autosize';
import * as React from 'react';
import * as ReactMarkdown from 'react-markdown';
// TODO: Use css-modules instead of 'import'
import './styles.scss';
import { EditableSectionChildProps } from 'components/common/EditableSection';
import { EditableSectionChildProps } from 'components/EditableSection';
import {
CANCEL_BUTTON_TEXT,
REFRESH_BUTTON_TEXT,
......@@ -15,6 +13,8 @@ import {
UPDATE_BUTTON_TEXT,
} from './constants';
import './styles.scss';
export interface StateFromProps {
refreshValue?: string;
}
......
......@@ -5,7 +5,7 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import InfoButton from 'components/common/InfoButton';
import InfoButton from 'components/InfoButton';
import EntityCardSection, { EntityCardSectionProps } from '.';
describe('EntityCardSection', () => {
......
......@@ -2,9 +2,10 @@
// SPDX-License-Identifier: Apache-2.0
import * as React from 'react';
import InfoButton from 'components/common/InfoButton';
import InfoButton from 'components/InfoButton';
import { IconSizes } from 'interfaces';
import './styles.scss';
export interface EntityCardSectionProps {
......
......@@ -2,9 +2,8 @@
// SPDX-License-Identifier: Apache-2.0
import * as React from 'react';
import { connect } from 'react-redux';
import 'components/common/Inputs/styles.scss';
import 'components/Inputs/styles.scss';
export interface CheckBoxItemProps {
checked?: boolean;
......
......@@ -2,11 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
import * as React from 'react';
import { mount } from 'enzyme';
import globalState from 'fixtures/globalState';
import AvatarLabel from 'components/common/AvatarLabel';
import AvatarLabel from 'components/AvatarLabel';
import { ResourceType } from 'interfaces';
......
......@@ -6,18 +6,17 @@ import { Link } from 'react-router-dom';
import { Modal } from 'react-bootstrap';
import AppConfig from 'config/config';
import AvatarLabel, { AvatarLabelProps } from 'components/common/AvatarLabel';
import LoadingSpinner from 'components/common/LoadingSpinner';
import AvatarLabel, { AvatarLabelProps } from 'components/AvatarLabel';
import LoadingSpinner from 'components/LoadingSpinner';
import { ResourceType, UpdateMethod, UpdateOwnerPayload } from 'interfaces';
// TODO: Use css-modules instead of 'import'
import './styles.scss';
import { EditableSectionChildProps } from 'components/common/EditableSection';
import { EditableSectionChildProps } from 'components/EditableSection';
import { logClick } from 'ducks/utilMethods';
import * as Constants from './constants';
import './styles.scss';
export interface DispatchFromProps {
onUpdateList: (
updateArray: UpdateOwnerPayload[],
......
......@@ -4,8 +4,8 @@
import * as React from 'react';
import { shallow } from 'enzyme';
import InfoButton from 'components/common/InfoButton';
import PaginatedResourceList from 'components/common/ResourceList/PaginatedResourceList';
import InfoButton from 'components/InfoButton';
import PaginatedResourceList from 'components/ResourceList/PaginatedResourceList';
import globalState from 'fixtures/globalState';
import {
POPULAR_TABLES_INFO_TEXT,
......
......@@ -5,9 +5,9 @@ import * as React from 'react';
import { TableResource } from 'interfaces';
import InfoButton from 'components/common/InfoButton';
import PaginatedResourceList from 'components/common/ResourceList/PaginatedResourceList';
import ShimmeringResourceLoader from 'components/common/ShimmeringResourceLoader';
import InfoButton from 'components/InfoButton';
import PaginatedResourceList from 'components/ResourceList/PaginatedResourceList';
import ShimmeringResourceLoader from 'components/ShimmeringResourceLoader';
import { getPopularTables } from 'ducks/popularTables/reducer';
import { GetPopularTablesRequest } from 'ducks/popularTables/types';
......
......@@ -3,14 +3,12 @@
import * as React from 'react';
import Pagination from 'react-js-pagination';
import { shallow } from 'enzyme';
import { ResourceType } from 'interfaces';
import ResourceListItem from 'components/common/ResourceListItem/index';
import ResourceListItem from 'components/ResourceListItem/index';
import PaginatedApiResourceList, { PaginatedApiResourceListProps } from '.';
import * as CONSTANTS from '../constants';
describe('PaginatedApiResourceList', () => {
const setStateSpy = jest.spyOn(
......
......@@ -3,7 +3,7 @@
import * as React from 'react';
import Pagination from 'react-js-pagination';
import ResourceListItem from 'components/common/ResourceListItem';
import ResourceListItem from 'components/ResourceListItem';
import { Resource } from 'interfaces';
import * as Constants from '../constants';
......
......@@ -3,14 +3,12 @@
import * as React from 'react';
import Pagination from 'react-js-pagination';
import { shallow } from 'enzyme';
import { ResourceType } from 'interfaces';
import ResourceListItem from 'components/common/ResourceListItem/index';
import ResourceListItem from 'components/ResourceListItem/index';
import PaginatedResourceList, { PaginatedResourceListProps } from '.';
import * as CONSTANTS from '../constants';
describe('PaginatedResourceList', () => {
const setStateSpy = jest.spyOn(PaginatedResourceList.prototype, 'setState');
......
......@@ -3,7 +3,8 @@
import * as React from 'react';
import Pagination from 'react-js-pagination';
import ResourceListItem from 'components/common/ResourceListItem';
import ResourceListItem from 'components/ResourceListItem';
import { Resource } from 'interfaces';
import * as Constants from '../constants';
......
......@@ -2,11 +2,10 @@
// SPDX-License-Identifier: Apache-2.0
import * as React from 'react';
import { shallow } from 'enzyme';
import { ResourceType } from 'interfaces';
import ResourceListItem from 'components/common/ResourceListItem/index';
import ResourceListItem from 'components/ResourceListItem/index';
import ResourceList, { ResourceListProps } from '.';
import * as CONSTANTS from './constants';
......
......@@ -2,7 +2,8 @@
// SPDX-License-Identifier: Apache-2.0
import * as React from 'react';
import ResourceListItem from 'components/common/ResourceListItem';
import ResourceListItem from 'components/ResourceListItem';
import { Resource } from 'interfaces';
import * as Constants from './constants';
......
......@@ -2,18 +2,17 @@
// SPDX-License-Identifier: Apache-2.0
import * as React from 'react';
import { shallow } from 'enzyme';
import { Link } from 'react-router-dom';
import BookmarkIcon from 'components/common/Bookmark/BookmarkIcon';
import BookmarkIcon from 'components/Bookmark/BookmarkIcon';
import { ResourceType } from 'interfaces';
import * as ConfigUtils from 'config/config-utils';
import * as DateUtils from 'utils/dateUtils';
import { dashboardSummary } from 'fixtures/metadata/dashboard';
import { NO_TIMESTAMP_TEXT } from '../../../../constants';
import { NO_TIMESTAMP_TEXT } from '../../../constants';
import * as Constants from './constants';
import DashboardListItem, { DashboardListItemProps } from './index';
......
......@@ -4,7 +4,7 @@
import * as React from 'react';
import { Link } from 'react-router-dom';
import BookmarkIcon from 'components/common/Bookmark/BookmarkIcon';
import BookmarkIcon from 'components/Bookmark/BookmarkIcon';
import { getSourceDisplayName, getSourceIconClass } from 'config/config-utils';
import { buildDashboardURL } from 'utils/navigationUtils';
......@@ -12,7 +12,7 @@ import { formatDate } from 'utils/dateUtils';
import { ResourceType, DashboardResource } from 'interfaces';
import { NO_TIMESTAMP_TEXT } from '../../../../constants';
import { NO_TIMESTAMP_TEXT } from '../../../constants';
import * as Constants from './constants';
import { LoggingParams } from '../types';
......
......@@ -2,14 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
import * as React from 'react';
import { shallow } from 'enzyme';
import { OverlayTrigger, Popover } from 'react-bootstrap';
import SchemaInfo, {
SchemaInfoProps,
} from 'components/common/ResourceListItem/SchemaInfo';
} from 'components/ResourceListItem/SchemaInfo';
describe('SchemaInfo', () => {
const setup = (propOverrides?: Partial<SchemaInfoProps>) => {
......
......@@ -2,13 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
import * as React from 'react';
import { shallow } from 'enzyme';
import { Link } from 'react-router-dom';
import BookmarkIcon from 'components/common/Bookmark/BookmarkIcon';
import SchemaInfo from 'components/common/ResourceListItem/SchemaInfo';
import { ResourceType, TagType } from 'interfaces';
import BookmarkIcon from 'components/Bookmark/BookmarkIcon';
import SchemaInfo from 'components/ResourceListItem/SchemaInfo';
import { ResourceType } from 'interfaces';
import * as ConfigUtils from 'config/config-utils';
import BadgeList from 'features/BadgeList';
......
......@@ -6,12 +6,12 @@ import { Link } from 'react-router-dom';
import { ResourceType, TableResource } from 'interfaces';
import BookmarkIcon from 'components/common/Bookmark/BookmarkIcon';
import BookmarkIcon from 'components/Bookmark/BookmarkIcon';
import { getSourceDisplayName, getSourceIconClass } from 'config/config-utils';
import BadgeList from 'features/BadgeList';
import SchemaInfo from 'components/common/ResourceListItem/SchemaInfo';
import SchemaInfo from 'components/ResourceListItem/SchemaInfo';
import { LoggingParams } from '../types';
export interface TableListItemProps {
......
......@@ -6,11 +6,9 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import * as Avatar from 'react-avatar';
import Flag from 'components/common/Flag';
import { Link } from 'react-router-dom';
import { ResourceType } from 'interfaces';
import { BadgeStyle } from 'config/config-types';
import UserListItem, { UserListItemProps } from '.';
describe('UserListItem', () => {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment