From cd0b45627f0d8da8c8dc4edde223f3c36e9bcfbf Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 25 Apr 2021 16:01:14 +0200 Subject: build: Migrate to flat project structure This change updates the project structure to become flattened. Previously, the simulator, frontend and API each lived into their own directory. With this change, all modules of the project live in the top-level directory of the repository. This should improve discoverability of modules of the project. --- frontend/src/components/projects/FilterButton.js | 24 ------------- frontend/src/components/projects/FilterPanel.js | 13 -------- frontend/src/components/projects/FilterPanel.sass | 5 --- .../projects/NewProjectButtonComponent.js | 17 ---------- .../components/projects/ProjectActionButtons.js | 29 ---------------- .../src/components/projects/ProjectAuthList.js | 39 ---------------------- frontend/src/components/projects/ProjectAuthRow.js | 24 ------------- 7 files changed, 151 deletions(-) delete mode 100644 frontend/src/components/projects/FilterButton.js delete mode 100644 frontend/src/components/projects/FilterPanel.js delete mode 100644 frontend/src/components/projects/FilterPanel.sass delete mode 100644 frontend/src/components/projects/NewProjectButtonComponent.js delete mode 100644 frontend/src/components/projects/ProjectActionButtons.js delete mode 100644 frontend/src/components/projects/ProjectAuthList.js delete mode 100644 frontend/src/components/projects/ProjectAuthRow.js (limited to 'frontend/src/components/projects') diff --git a/frontend/src/components/projects/FilterButton.js b/frontend/src/components/projects/FilterButton.js deleted file mode 100644 index 664f9b46..00000000 --- a/frontend/src/components/projects/FilterButton.js +++ /dev/null @@ -1,24 +0,0 @@ -import classNames from 'classnames' -import PropTypes from 'prop-types' -import React from 'react' - -const FilterButton = ({ active, children, onClick }) => ( - -) - -FilterButton.propTypes = { - active: PropTypes.bool.isRequired, - children: PropTypes.node.isRequired, - onClick: PropTypes.func.isRequired, -} - -export default FilterButton diff --git a/frontend/src/components/projects/FilterPanel.js b/frontend/src/components/projects/FilterPanel.js deleted file mode 100644 index 2b9795d0..00000000 --- a/frontend/src/components/projects/FilterPanel.js +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react' -import FilterLink from '../../containers/projects/FilterLink' -import './FilterPanel.sass' - -const FilterPanel = () => ( -
- All Projects - My Projects - Shared with me -
-) - -export default FilterPanel diff --git a/frontend/src/components/projects/FilterPanel.sass b/frontend/src/components/projects/FilterPanel.sass deleted file mode 100644 index f71cf6c8..00000000 --- a/frontend/src/components/projects/FilterPanel.sass +++ /dev/null @@ -1,5 +0,0 @@ -.filter-panel - display: flex - - button - flex: 1 !important diff --git a/frontend/src/components/projects/NewProjectButtonComponent.js b/frontend/src/components/projects/NewProjectButtonComponent.js deleted file mode 100644 index 312671c6..00000000 --- a/frontend/src/components/projects/NewProjectButtonComponent.js +++ /dev/null @@ -1,17 +0,0 @@ -import PropTypes from 'prop-types' -import React from 'react' - -const NewProjectButtonComponent = ({ onClick }) => ( -
-
- - New Project -
-
-) - -NewProjectButtonComponent.propTypes = { - onClick: PropTypes.func.isRequired, -} - -export default NewProjectButtonComponent diff --git a/frontend/src/components/projects/ProjectActionButtons.js b/frontend/src/components/projects/ProjectActionButtons.js deleted file mode 100644 index 1c76cc7f..00000000 --- a/frontend/src/components/projects/ProjectActionButtons.js +++ /dev/null @@ -1,29 +0,0 @@ -import PropTypes from 'prop-types' -import React from 'react' -import { Link } from 'react-router-dom' - -const ProjectActionButtons = ({ projectId, onViewUsers, onDelete }) => ( - - - - -
onViewUsers(projectId)} - > - -
-
onDelete(projectId)}> - -
- -) - -ProjectActionButtons.propTypes = { - projectId: PropTypes.string.isRequired, - onViewUsers: PropTypes.func, - onDelete: PropTypes.func, -} - -export default ProjectActionButtons diff --git a/frontend/src/components/projects/ProjectAuthList.js b/frontend/src/components/projects/ProjectAuthList.js deleted file mode 100644 index 8eb4f93b..00000000 --- a/frontend/src/components/projects/ProjectAuthList.js +++ /dev/null @@ -1,39 +0,0 @@ -import PropTypes from 'prop-types' -import React from 'react' -import Shapes from '../../shapes/index' -import ProjectAuthRow from './ProjectAuthRow' - -const ProjectAuthList = ({ authorizations }) => { - return ( -
- {authorizations.length === 0 ? ( -
- - No projects here yet... Add some with the 'New Project' button! -
- ) : ( - - - - - - - - - - {authorizations.map((authorization) => ( - - ))} - -
Project nameLast editedAccess rights -
- )} -
- ) -} - -ProjectAuthList.propTypes = { - authorizations: PropTypes.arrayOf(Shapes.Authorization).isRequired, -} - -export default ProjectAuthList diff --git a/frontend/src/components/projects/ProjectAuthRow.js b/frontend/src/components/projects/ProjectAuthRow.js deleted file mode 100644 index 3f904061..00000000 --- a/frontend/src/components/projects/ProjectAuthRow.js +++ /dev/null @@ -1,24 +0,0 @@ -import classNames from 'classnames' -import React from 'react' -import ProjectActions from '../../containers/projects/ProjectActions' -import Shapes from '../../shapes/index' -import { AUTH_DESCRIPTION_MAP, AUTH_ICON_MAP } from '../../util/authorizations' -import { parseAndFormatDateTime } from '../../util/date-time' - -const ProjectAuthRow = ({ projectAuth }) => ( - - {projectAuth.project.name} - {parseAndFormatDateTime(projectAuth.project.datetimeLastEdited)} - - - {AUTH_DESCRIPTION_MAP[projectAuth.authorizationLevel]} - - - -) - -ProjectAuthRow.propTypes = { - projectAuth: Shapes.Authorization.isRequired, -} - -export default ProjectAuthRow -- cgit v1.2.3