Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(ui): Move components to more logical folders #13656

Merged
merged 3 commits into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import styled from 'react-emotion';
import {assignToUser, assignToActor, clearAssignment} from 'app/actionCreators/group';
import {t} from 'app/locale';
import {valueIsEqual, buildUserId, buildTeamId} from 'app/utils';
import ActorAvatar from 'app/components/actorAvatar';
import ActorAvatar from 'app/components/avatar/actorAvatar';
import Avatar from 'app/components/avatar';
import ConfigStore from 'app/stores/configStore';
import DropdownAutoComplete from 'app/components/dropdownAutoComplete';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import moment from 'moment';
import styled from 'react-emotion';

import {t, tct} from 'app/locale';
import ActorAvatar from 'app/components/actorAvatar';
import ActorAvatar from 'app/components/avatar/actorAvatar';
import Alert from 'app/components/alert';
import Hovercard from 'app/components/hovercard';
import InlineSvg from 'app/components/inlineSvg';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {assignToUser, assignToActor} from 'app/actionCreators/group';
import {openCreateOwnershipRule} from 'app/actionCreators/modal';
import {t} from 'app/locale';
import Access from 'app/components/acl/access';
import ActorAvatar from 'app/components/actorAvatar';
import ActorAvatar from 'app/components/avatar/actorAvatar';
import Button from 'app/components/button';
import GuideAnchor from 'app/components/assistant/guideAnchor';
import SentryTypes from 'app/sentryTypes';
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/components/issueList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import createReactClass from 'create-react-class';

import {Panel, PanelBody} from 'app/components/panels';
import withApi from 'app/utils/withApi';
import CompactIssue from 'app/components/compactIssue';
import CompactIssue from 'app/components/issues/compactIssue';
import EmptyMessage from 'app/views/settings/components/emptyMessage';
import LoadingError from 'app/components/loadingError';
import LoadingIndicator from 'app/components/loadingIndicator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {alertHighlight, pulse} from 'app/styles/animations';
import Button from 'app/components/button';
import ConfigStore from 'app/stores/configStore';
import InlineSvg from 'app/components/inlineSvg';
import BookmarkStar from 'app/components/bookmarkStar';
import BookmarkStar from 'app/components/projects/bookmarkStar';
import DropdownAutoComplete from 'app/components/dropdownAutoComplete';
import GlobalSelectionHeaderRow from 'app/components/globalSelectionHeaderRow';
import Highlight from 'app/components/highlight';
Expand Down
6 changes: 4 additions & 2 deletions src/sentry/static/sentry/app/routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import OrganizationStreamOverview from 'app/views/organizationStream/overview';
import ProjectChooser from 'app/views/projectChooser';
import ProjectDataForwarding from 'app/views/projectDataForwarding';
import ProjectDebugFiles from 'app/views/projectDebugFiles';
import ProjectEnvironments from 'app/views/projectEnvironments';
import ProjectEventRedirect from 'app/views/projectEventRedirect';
import ProjectGettingStarted from 'app/views/projectInstall/gettingStarted';
import ProjectInstallOverview from 'app/views/projectInstall/overview';
Expand Down Expand Up @@ -275,7 +274,10 @@ function routes() {
<Route
name="Environments"
path="environments/"
component={errorHandler(ProjectEnvironments)}
componentPromise={() =>
import(/* webpackChunkName: "ProjectEnvironments" */ './views/settings/project/projectEnvironments')
}
component={errorHandler(LazyLoad)}
>
<IndexRoute />
<Route path="hidden/" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Reflux from 'reflux';
import createReactClass from 'create-react-class';
import styled from 'react-emotion';

import BookmarkStar from 'app/components/bookmarkStar';
import BookmarkStar from 'app/components/projects/bookmarkStar';
import {Client} from 'app/api';
import {loadStatsForProject} from 'app/actionCreators/projects';
import IdBadge from 'app/components/idBadge';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import withApi from 'app/utils/withApi';
import LoadingError from 'app/components/loadingError';
import LoadingIndicator from 'app/components/loadingIndicator';
import MemberListStore from 'app/stores/memberListStore';
import MissingProjectMembership from 'app/components/missingProjectMembership';
import MissingProjectMembership from 'app/components/projects/missingProjectMembership';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be local to projectContext?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the 2 files into the same folder, but thought it wasn't necessary to nest too deeply

import ProjectsStore from 'app/stores/projectsStore';
import SentryTypes from 'app/sentryTypes';
import withProjects from 'app/utils/withProjects';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from 'react-emotion';
import React from 'react';
import createReactClass from 'create-react-class';

import BookmarkStar from 'app/components/bookmarkStar';
import BookmarkStar from 'app/components/projects/bookmarkStar';
import Link from 'app/components/links/link';
import ProjectLabel from 'app/components/projectLabel';
import SentryTypes from 'app/sentryTypes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import ProjectsStore from 'app/stores/projectsStore';
import TeamStore from 'app/stores/teamStore';
import IdBadge from 'app/components/idBadge';
import MultiSelectControl from 'app/components/forms/multiSelectControl';
import ActorAvatar from 'app/components/actorAvatar';
import ActorAvatar from 'app/components/avatar/actorAvatar';
import SentryTypes from 'app/sentryTypes';
import Button from 'app/components/button';
import InlineSvg from 'app/components/inlineSvg';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styled from 'react-emotion';
import {PageContent} from 'app/styles/organization';
import {t} from 'app/locale';
import AsyncView from 'app/views/asyncView';
import CompactIssue from 'app/components/compactIssue';
import CompactIssue from 'app/components/issues/compactIssue';
import EmptyStateWarning from 'app/components/emptyStateWarning';
import EventUserFeedback from 'app/components/events/userFeedback';
import GlobalSelectionHeader from 'app/components/organizations/globalSelectionHeader';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {shallow, mount} from 'enzyme';
import ActorAvatar from 'app/components/actorAvatar';
import ActorAvatar from 'app/components/avatar/actorAvatar';
import MemberListStore from 'app/stores/memberListStore';
import TeamStore from 'app/stores/teamStore';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ exports[`BookmarkStar renders 1`] = `
src="icon-star-small-filled"
>
<InlineSvg
className="css-fl9x15-Star e1urz3930"
className="css-fl9x15-Star e5ekdrk0"
isBookmarked={false}
onClick={[Function]}
src="icon-star-small-filled"
>
<StyledSvg
className="css-fl9x15-Star e1urz3930"
className="css-fl9x15-Star e5ekdrk0"
height="1em"
isBookmarked={false}
onClick={[Function]}
viewBox={Object {}}
width="1em"
>
<svg
className="e1urz3930 css-1b9wx8m-StyledSvg-Star e2idor0"
className="e5ekdrk0 css-1b9wx8m-StyledSvg-Star e2idor0"
height="1em"
onClick={[Function]}
viewBox={Object {}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {mount} from 'enzyme';
import React from 'react';

import BookmarkStar from 'app/components/bookmarkStar';
import BookmarkStar from 'app/components/projects/bookmarkStar';

describe('BookmarkStar', function() {
let wrapper, projectMock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,21 +519,21 @@ exports[`OrganizationTeamProjects Should render 1`] = `
src="icon-star-small-filled"
>
<InlineSvg
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e1urz3930"
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e5ekdrk0"
isBookmarked={false}
onClick={[Function]}
src="icon-star-small-filled"
>
<StyledSvg
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e1urz3930"
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e5ekdrk0"
height="1em"
isBookmarked={false}
onClick={[Function]}
viewBox={Object {}}
width="1em"
>
<svg
className="enngb6z1 e1urz3930 css-85qks9-StyledSvg-Star-BookmarkLink e2idor0"
className="enngb6z1 e5ekdrk0 css-85qks9-StyledSvg-Star-BookmarkLink e2idor0"
height="1em"
onClick={[Function]}
viewBox={Object {}}
Expand Down Expand Up @@ -907,21 +907,21 @@ exports[`OrganizationTeamProjects Should render 1`] = `
src="icon-star-small-filled"
>
<InlineSvg
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e1urz3930"
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e5ekdrk0"
isBookmarked={false}
onClick={[Function]}
src="icon-star-small-filled"
>
<StyledSvg
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e1urz3930"
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e5ekdrk0"
height="1em"
isBookmarked={false}
onClick={[Function]}
viewBox={Object {}}
width="1em"
>
<svg
className="enngb6z1 e1urz3930 css-85qks9-StyledSvg-Star-BookmarkLink e2idor0"
className="enngb6z1 e5ekdrk0 css-85qks9-StyledSvg-Star-BookmarkLink e2idor0"
height="1em"
onClick={[Function]}
viewBox={Object {}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,21 +537,21 @@ exports[`ProjectCard renders 1`] = `
src="icon-star-small-filled"
>
<InlineSvg
className="css-fl9x15-Star e1urz3930"
className="css-fl9x15-Star e5ekdrk0"
isBookmarked={false}
onClick={[Function]}
src="icon-star-small-filled"
>
<StyledSvg
className="css-fl9x15-Star e1urz3930"
className="css-fl9x15-Star e5ekdrk0"
height="1em"
isBookmarked={false}
onClick={[Function]}
viewBox={Object {}}
width="1em"
>
<svg
className="e1urz3930 css-1b9wx8m-StyledSvg-Star e2idor0"
className="e5ekdrk0 css-1b9wx8m-StyledSvg-Star e2idor0"
height="1em"
onClick={[Function]}
viewBox={Object {}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,21 +571,21 @@ exports[`OrganizationProjects Should render the projects in the store 1`] = `
src="icon-star-small-filled"
>
<InlineSvg
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e1urz3930"
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e5ekdrk0"
isBookmarked={false}
onClick={[Function]}
src="icon-star-small-filled"
>
<StyledSvg
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e1urz3930"
className="enngb6z1 css-1j5sthu-Star-BookmarkLink e5ekdrk0"
height="1em"
isBookmarked={false}
onClick={[Function]}
viewBox={Object {}}
width="1em"
>
<svg
className="enngb6z1 e1urz3930 css-85qks9-StyledSvg-Star-BookmarkLink e2idor0"
className="enngb6z1 e5ekdrk0 css-85qks9-StyledSvg-Star-BookmarkLink e2idor0"
height="1em"
onClick={[Function]}
viewBox={Object {}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1326,15 +1326,15 @@ exports[`ProjectEnvironments render hidden renders environment list 1`] = `
size="xsmall"
>
<Button
className="css-10adnmx-EnvironmentButton ezuela50"
className="css-10adnmx-EnvironmentButton e1pnz46f0"
disabled={false}
onClick={[Function]}
size="xsmall"
>
<StyledButton
aria-disabled={false}
aria-label="Show"
className="css-10adnmx-EnvironmentButton ezuela50"
className="css-10adnmx-EnvironmentButton e1pnz46f0"
disabled={false}
onClick={[Function]}
role="button"
Expand All @@ -1343,7 +1343,7 @@ exports[`ProjectEnvironments render hidden renders environment list 1`] = `
<ForwardRef
aria-disabled={false}
aria-label="Show"
className="ezuela50 css-1b2zh6x-StyledButton-getColors-EnvironmentButton e12ma6z0"
className="e1pnz46f0 css-1b2zh6x-StyledButton-getColors-EnvironmentButton e12ma6z0"
disabled={false}
onClick={[Function]}
role="button"
Expand All @@ -1352,7 +1352,7 @@ exports[`ProjectEnvironments render hidden renders environment list 1`] = `
<button
aria-disabled={false}
aria-label="Show"
className="ezuela50 css-1b2zh6x-StyledButton-getColors-EnvironmentButton e12ma6z0"
className="e1pnz46f0 css-1b2zh6x-StyledButton-getColors-EnvironmentButton e12ma6z0"
onClick={[Function]}
role="button"
size="xsmall"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import {mount} from 'enzyme';

import EnvironmentStore from 'app/stores/environmentStore';
import ProjectEnvironments from 'app/views/projectEnvironments';
import ProjectEnvironments from 'app/views/settings/project/projectEnvironments';
import recreateRoute from 'app/utils/recreateRoute';
import {ALL_ENVIRONMENTS_KEY} from 'app/constants';

Expand Down