Skip to content

Commit 4285fa0

Browse files
committed
Move Nav and Toolbar files into new Header folder
1 parent 31e64d5 commit 4285fa0

15 files changed

+37
-40
lines changed

client/components/Nav.jsx renamed to client/modules/IDE/components/Header/Nav.jsx

+15-18
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,23 @@ import React from 'react';
44
import { withTranslation } from 'react-i18next';
55
import { connect } from 'react-redux';
66
import { Link } from 'react-router-dom';
7-
import { availableLanguages, languageKeyToLabel } from '../i18n';
8-
import * as IDEActions from '../modules/IDE/actions/ide';
9-
import * as toastActions from '../modules/IDE/actions/toast';
10-
import * as projectActions from '../modules/IDE/actions/project';
11-
import {
12-
setAllAccessibleOutput,
13-
setLanguage
14-
} from '../modules/IDE/actions/preferences';
15-
import { logoutUser } from '../modules/User/actions';
7+
import { availableLanguages, languageKeyToLabel } from '../../../../i18n';
8+
import * as IDEActions from '../../actions/ide';
9+
import * as toastActions from '../../actions/toast';
10+
import * as projectActions from '../../actions/project';
11+
import { setAllAccessibleOutput, setLanguage } from '../../actions/preferences';
12+
import { logoutUser } from '../../../User/actions';
1613

17-
import getConfig from '../utils/getConfig';
18-
import { metaKeyName, metaKey } from '../utils/metaKey';
19-
import { getIsUserOwner } from '../modules/IDE/selectors/users';
20-
import { selectSketchPath } from '../modules/IDE/selectors/project';
14+
import getConfig from '../../../../utils/getConfig';
15+
import { metaKeyName, metaKey } from '../../../../utils/metaKey';
16+
import { getIsUserOwner } from '../../selectors/users';
17+
import { selectSketchPath } from '../../selectors/project';
2118

22-
import CaretLeftIcon from '../images/left-arrow.svg';
23-
import LogoIcon from '../images/p5js-logo-small.svg';
24-
import NavDropdownMenu from './Nav/NavDropdownMenu';
25-
import NavMenuItem from './Nav/NavMenuItem';
26-
import NavBar from './Nav/NavBar';
19+
import CaretLeftIcon from '../../../../images/left-arrow.svg';
20+
import LogoIcon from '../../../../images/p5js-logo-small.svg';
21+
import NavDropdownMenu from '../../../../components/Nav/NavDropdownMenu';
22+
import NavMenuItem from '../../../../components/Nav/NavMenuItem';
23+
import NavBar from '../../../../components/Nav/NavBar';
2724

2825
class Nav extends React.PureComponent {
2926
constructor(props) {

client/components/Nav.unit.test.jsx renamed to client/modules/IDE/components/Header/Nav.unit.test.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { render, reduxRender } from '../test-utils';
2+
import { render, reduxRender } from '../../../../test-utils';
33

44
import Nav, { NavComponent } from './Nav';
55

client/modules/IDE/components/Toolbar.jsx renamed to client/modules/IDE/components/Header/Toolbar.jsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import { connect } from 'react-redux';
44
import { Link } from 'react-router-dom';
55
import classNames from 'classnames';
66
import { withTranslation } from 'react-i18next';
7-
import * as IDEActions from '../actions/ide';
8-
import * as preferenceActions from '../actions/preferences';
9-
import * as projectActions from '../actions/project';
10-
11-
import PlayIcon from '../../../images/play.svg';
12-
import StopIcon from '../../../images/stop.svg';
13-
import PreferencesIcon from '../../../images/preferences.svg';
14-
import EditProjectNameIcon from '../../../images/pencil.svg';
7+
import * as IDEActions from '../../actions/ide';
8+
import * as preferenceActions from '../../actions/preferences';
9+
import * as projectActions from '../../actions/project';
10+
11+
import PlayIcon from '../../../../images/play.svg';
12+
import StopIcon from '../../../../images/stop.svg';
13+
import PreferencesIcon from '../../../../images/preferences.svg';
14+
import EditProjectNameIcon from '../../../../images/pencil.svg';
1515

1616
class Toolbar extends React.Component {
1717
constructor(props) {

client/modules/IDE/components/Toolbar.unit.test.jsx renamed to client/modules/IDE/components/Header/Toolbar.unit.test.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import lodash from 'lodash';
33

4-
import { fireEvent, render, screen, waitFor } from '../../../test-utils';
4+
import { fireEvent, render, screen, waitFor } from '../../../../test-utils';
55
import { ToolbarComponent } from './Toolbar';
66

77
const renderComponent = (extraProps = {}) => {

client/modules/IDE/pages/IDEView.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import SplitPane from 'react-split-pane';
99
import Editor from '../components/Editor';
1010
import Sidebar from '../components/Sidebar';
1111
import PreviewFrame from '../components/PreviewFrame';
12-
import Toolbar from '../components/Toolbar';
12+
import Toolbar from '../components/Header/Toolbar';
1313
import Preferences from '../components/Preferences/index';
1414
import NewFileModal from '../components/NewFileModal';
1515
import NewFolderModal from '../components/NewFolderModal';
1616
import UploadFileModal from '../components/UploadFileModal';
1717
import ShareModal from '../components/ShareModal';
1818
import KeyboardShortcutModal from '../components/KeyboardShortcutModal';
1919
import ErrorModal from '../components/ErrorModal';
20-
import Nav from '../../../components/Nav';
20+
import Nav from '../components/Header/Nav';
2121
import Console from '../components/Console';
2222
import Toast from '../components/Toast';
2323
import * as FileActions from '../actions/files';

client/modules/IDE/pages/Legal.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import PrivacyPolicy from './PrivacyPolicy';
77
import TermsOfUse from './TermsOfUse';
88
import CodeOfConduct from './CodeOfConduct';
99
import RootPage from '../../../components/RootPage';
10-
import Nav from '../../../components/Nav';
10+
import Nav from '../components/Header/Nav';
1111
import { remSize, prop } from '../../../theme';
1212

1313
const StyledTabList = styled(TabList)`

client/modules/User/pages/AccountView.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { createApiKey, removeApiKey } from '../actions';
99
import AccountForm from '../components/AccountForm';
1010
import SocialAuthButton from '../components/SocialAuthButton';
1111
import APIKeyForm from '../components/APIKeyForm';
12-
import Nav from '../../../components/Nav';
12+
import Nav from '../../IDE/components/Header/Nav';
1313
import ErrorModal from '../../IDE/components/ErrorModal';
1414
import Overlay from '../../App/components/Overlay';
1515
import Toast from '../../IDE/components/Toast';

client/modules/User/pages/CollectionView.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
import { connect } from 'react-redux';
44
import { withTranslation } from 'react-i18next';
55

6-
import Nav from '../../../components/Nav';
6+
import Nav from '../../IDE/components/Header/Nav';
77
import RootPage from '../../../components/RootPage';
88

99
import CollectionCreate from '../components/CollectionCreate';

client/modules/User/pages/DashboardView.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { withTranslation } from 'react-i18next';
55

66
import browserHistory from '../../../browserHistory';
77
import Button from '../../../common/Button';
8-
import Nav from '../../../components/Nav';
8+
import Nav from '../../IDE/components/Header/Nav';
99
import Overlay from '../../App/components/Overlay';
1010
import AssetList from '../../IDE/components/AssetList';
1111
import AssetSize from '../../IDE/components/AssetSize';

client/modules/User/pages/EmailVerificationView.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { withTranslation } from 'react-i18next';
66
import { Helmet } from 'react-helmet';
77
import browserHistory from '../../../browserHistory';
88
import { verifyEmailConfirmation } from '../actions';
9-
import Nav from '../../../components/Nav';
9+
import Nav from '../../IDE/components/Header/Nav';
1010
import RootPage from '../../../components/RootPage';
1111

1212
class EmailVerificationView extends React.Component {

client/modules/User/pages/LoginView.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Helmet } from 'react-helmet';
44
import { useTranslation } from 'react-i18next';
55
import LoginForm from '../components/LoginForm';
66
import SocialAuthButton from '../components/SocialAuthButton';
7-
import Nav from '../../../components/Nav';
7+
import Nav from '../../IDE/components/Header/Nav';
88
import RootPage from '../../../components/RootPage';
99

1010
function LoginView() {

client/modules/User/pages/NewPasswordView.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
66
import { useParams } from 'react-router-dom';
77
import NewPasswordForm from '../components/NewPasswordForm';
88
import { validateResetPasswordToken } from '../actions';
9-
import Nav from '../../../components/Nav';
9+
import Nav from '../../IDE/components/Header/Nav';
1010
import RootPage from '../../../components/RootPage';
1111

1212
function NewPasswordView() {

client/modules/User/pages/ResetPasswordView.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useSelector } from 'react-redux';
55
import { Helmet } from 'react-helmet';
66
import { useTranslation } from 'react-i18next';
77
import ResetPasswordForm from '../components/ResetPasswordForm';
8-
import Nav from '../../../components/Nav';
8+
import Nav from '../../IDE/components/Header/Nav';
99
import RootPage from '../../../components/RootPage';
1010

1111
function ResetPasswordView() {

client/modules/User/pages/SignupView.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Helmet } from 'react-helmet';
44
import { useTranslation } from 'react-i18next';
55
import SignupForm from '../components/SignupForm';
66
import SocialAuthButton from '../components/SocialAuthButton';
7-
import Nav from '../../../components/Nav';
7+
import Nav from '../../IDE/components/Header/Nav';
88
import RootPage from '../../../components/RootPage';
99

1010
function SignupView() {

contributor_docs/development.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ See the [release guide](./release.md) for information about creating a release.
3030
## Tests
3131
To run the test suite simply run `npm test` (after installing dependencies with `npm install`)
3232

33-
A sample unit test could be found here: [Nav.unit.test.jsx](../client/components/Nav.unit.test.jsx).
33+
A sample unit test could be found here: [Nav.unit.test.jsx](../client/modules/IDE/components/Header/Nav.unit.test.jsx).
3434

3535
## Committing Code
3636
Inspired by [Git/GitHub commit standards & conventions](https://gist.github.com/digitaljhelms/3761873).

0 commit comments

Comments
 (0)