Skip to content

Commit

Permalink
[213] Change the organization of the frontend code
Browse files Browse the repository at this point in the history
Bug: #213
Signed-off-by: Stéphane Bégaudeau <[email protected]>
  • Loading branch information
sbegaudeau committed Jul 16, 2023
1 parent 7336704 commit 0054578
Show file tree
Hide file tree
Showing 142 changed files with 119 additions and 119 deletions.
48 changes: 24 additions & 24 deletions frontend/svalyn-studio-app/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@
import CssBaseline from '@mui/material/CssBaseline';
import { ThemeProvider } from '@mui/material/styles';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { ChangeProposalsRouter } from '../changeproposals/ChangeProposalsRouter';
import { DomainsRouter } from '../domains/DomainsRouter';
import { ErrorsRouter } from '../errors/ErrorsRouter';
import { HelpRouter } from '../help/HelpRouter';
import { HomeView } from '../home/HomeView';
import { InvitationsRouter } from '../invitations/InvitationsRouter';
import { LoginRouter } from '../login/LoginRouter';
import { NewRouter } from '../new/NewRouter';
import { NotFoundView } from '../notfound/NotFoundView';
import { NotificationsRouter } from '../notifications/NotificationsRouter';
import { OAuth2Router } from '../oauth2/OAuth2Router';
import { OrganizationsRouter } from '../organizations/OrganizationsRouter';
import { PaletteProvider } from '../palette/PaletteProvider';
import { ChangeProposalRouter } from '../views/changeproposal/ChangeProposalRouter';
import { DomainRouter } from '../views/domains/DomainRouter';
import { ErrorRouter } from '../views/error/ErrorRouter';
import { HelpRouter } from '../views/help/HelpRouter';
import { HomeView } from '../views/home/HomeView';
import { InvitationRouter } from '../views/invitations/InvitationRouter';
import { LoginRouter } from '../views/login/LoginRouter';
import { NewRouter } from '../views/new-organization/NewRouter';
import { NotFoundView } from '../views/notfound/NotFoundView';
import { NotificationRouter } from '../views/notifications/NotificationRouter';
import { OAuth2Router } from '../views/oauth2redirect/OAuth2Router';
import { OrganizationRouter } from '../views/organization/OrganizationRouter';
import { ProfileRouter } from '../views/profile/ProfileRouter';
import { ProjectRouter } from '../views/project/ProjectRouter';
import { SearchRouter } from '../views/search/SearchRouter';
import { SettingsRouter } from '../views/settings/SettingsRouter';
import { ProfilesRouter } from '../profiles/ProfilesRouter';
import { ProjectsRouter } from '../projects/ProjectsRouter';
import { SearchRouter } from '../search/SearchRouter';
import { SettingsRouter } from '../settings/SettingsRouter';
import { AuthenticationRedirectionBoundary } from './AuthenticationRedirectionBoundary';
import { theme } from './theme';

Expand All @@ -50,17 +50,17 @@ export const App = () => {
<Routes>
<Route path="/" element={<HomeView />} />
<Route path="/new/*" element={<NewRouter />} />
<Route path="/orgs/*" element={<OrganizationRouter />} />
<Route path="/projects/*" element={<ProjectRouter />} />
<Route path="/changeproposals/*" element={<ChangeProposalRouter />} />
<Route path="/domains/*" element={<DomainRouter />} />
<Route path="/orgs/*" element={<OrganizationsRouter />} />
<Route path="/projects/*" element={<ProjectsRouter />} />
<Route path="/changeproposals/*" element={<ChangeProposalsRouter />} />
<Route path="/domains/*" element={<DomainsRouter />} />
<Route path="/search/*" element={<SearchRouter />} />
<Route path="/profiles/*" element={<ProfileRouter />} />
<Route path="/notifications/*" element={<NotificationRouter />} />
<Route path="/invitations/*" element={<InvitationRouter />} />
<Route path="/profiles/*" element={<ProfilesRouter />} />
<Route path="/notifications/*" element={<NotificationsRouter />} />
<Route path="/invitations/*" element={<InvitationsRouter />} />
<Route path="/settings/*" element={<SettingsRouter />} />
<Route path="/help/*" element={<HelpRouter />} />
<Route path="/error/*" element={<ErrorRouter />} />
<Route path="/errors/*" element={<ErrorsRouter />} />
<Route path="/login/*" element={<LoginRouter />} />
<Route path="/oauth2/*" element={<OAuth2Router />} />
<Route path="*" element={<NotFoundView />} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import ClassIcon from '@mui/icons-material/Class';
import CorporateFareIcon from '@mui/icons-material/CorporateFare';
import { useEffect, useState } from 'react';
import { useParams } from 'react-router-dom';
import { Navbar } from '../../navbars/Navbar';
import { goToDomains, goToHelp, goToHome, goToNotifications, goToSettings } from '../../palette/DefaultPaletteActions';
import { PaletteNavigationAction } from '../../palette/Palette.types';
import { usePalette } from '../../palette/usePalette';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { Navbar } from '../navbars/Navbar';
import { NotFoundView } from '../notfound/NotFoundView';
import { goToDomains, goToHelp, goToHome, goToNotifications, goToSettings } from '../palette/DefaultPaletteActions';
import { PaletteNavigationAction } from '../palette/Palette.types';
import { usePalette } from '../palette/usePalette';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import { ChangeProposalViewState, GetChangeProposalData, GetChangeProposalVariables } from './ChangeProposalView.types';
import { ChangeProposalViewTabPanel } from './ChangeProposalViewTabPanel';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { Outlet, Route, Routes } from 'react-router-dom';
import { ChangeProposalView } from './ChangeProposalView';

export const ChangeProposalRouter = () => {
export const ChangeProposalsRouter = () => {
return (
<>
<Routes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Radio from '@mui/material/Radio';
import RadioGroup from '@mui/material/RadioGroup';
import TextField from '@mui/material/TextField';
import { useEffect, useState } from 'react';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import {
ErrorPayload,
PerformReviewData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import Paper from '@mui/material/Paper';
import { useEffect, useState } from 'react';
import { ErrorSnackbar } from '../../../snackbar/ErrorSnackbar';
import { ViewerCard } from '../../../viewers/ViewerCard';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { ViewerCard } from '../../viewers/ViewerCard';
import {
ChangeProposalFilesProps,
ChangeProposalFilesState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import NotInterestedIcon from '@mui/icons-material/NotInterested';
import PanoramaFishEyeIcon from '@mui/icons-material/PanoramaFishEye';
import Box from '@mui/material/Box';
import Chip from '@mui/material/Chip';
import { CreatedOn } from '../../../widgets/CreatedOn';
import { LastModifiedOn } from '../../../widgets/LastModifiedOn';
import { CreatedOn } from '../../widgets/CreatedOn';
import { LastModifiedOn } from '../../widgets/LastModifiedOn';
import { ChangeProposalHeaderProps } from './ChangeProposalHeader.types';

export const ChangeProposalHeader = ({ changeProposal }: ChangeProposalHeaderProps) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import Paper from '@mui/material/Paper';
import Typography from '@mui/material/Typography';
import { useEffect, useState } from 'react';
import ReactMarkdown from 'react-markdown';
import { EditReadMeDialog } from '../../../dialogs/EditReadMeDialog';
import { ErrorSnackbar } from '../../../snackbar/ErrorSnackbar';
import { EditReadMeDialog } from '../../dialogs/EditReadMeDialog';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { ChangeProposalHeader } from './ChangeProposalHeader';
import {
ChangeProposalOverviewProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import Container from '@mui/material/Container';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import { useParams } from 'react-router-dom';
import { DiagramEditor } from '../../diagram/DiagramEditor';
import { Diagram } from '../../diagram/DiagramEditor.types';
import { Navbar } from '../../navbars/Navbar';
import { DiagramEditor } from '../diagram/DiagramEditor';
import { Diagram } from '../diagram/DiagramEditor.types';
import { Navbar } from '../navbars/Navbar';
import { GetDomainData, GetDomainVariables } from './DomainView.types';
import { convertDomain } from './converters';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
*/

import { Outlet, Route, Routes } from 'react-router-dom';
import { DomainView } from '../domain/DomainView';
import { DomainView } from './DomainView';
import { DomainsView } from './DomainsView';

export const DomainRouter = () => {
export const DomainsRouter = () => {
return (
<>
<Routes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import { useEffect, useState } from 'react';
import { Link as RouterLink } from 'react-router-dom';
import { Navbar } from '../../navbars/Navbar';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { Navbar } from '../navbars/Navbar';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import { Domain, DomainsViewState, GetDomainsData, GetDomainsVariables } from './DomainsView.types';

const getDomainsQuery = gql`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/

import { Edge, Node } from 'reactflow';
import { Diagram } from '../../diagram/DiagramEditor.types';
import { ListItemData, ListNodeData } from '../../diagram/nodes/ListNode.types';
import { Diagram } from '../diagram/DiagramEditor.types';
import { ListItemData, ListNodeData } from '../diagram/nodes/ListNode.types';
import { DataType, Domain, Entity, Enumeration } from './DomainView.types';

export const convertDomain = (domain: Domain): Diagram => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import Container from '@mui/material/Container';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import { UnauthenticatedNavbar } from '../../navbars/UnauthenticatedNavbar';
import { UnauthenticatedNavbar } from '../navbars/UnauthenticatedNavbar';

export const ErrorView = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { Outlet, Route, Routes } from 'react-router-dom';
import { ErrorView } from './ErrorView';

export const ErrorRouter = () => {
export const ErrorsRouter = () => {
return (
<>
<Routes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import Container from '@mui/material/Container';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import { UnauthenticatedNavbar } from '../../navbars/UnauthenticatedNavbar';
import { UnauthenticatedNavbar } from '../navbars/UnauthenticatedNavbar';

export const HelpView = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import Box from '@mui/material/Box';
import { Navbar } from '../../navbars/Navbar';
import { Navbar } from '../navbars/Navbar';
import { HomeViewCenterPanel } from './HomeViewCenterPanel';
import { HomeViewLeftPanel } from './HomeViewLeftPanel';
import { HomeViewRightPanel } from './HomeViewRightPanel';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import { gql, useQuery } from '@apollo/client';
import Link from '@mui/material/Link';
import Typography from '@mui/material/Typography';
import { useEffect, useState } from 'react';
import { ActivityTimeline } from '../../activity/ActivityTimeline';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { ActivityTimeline } from '../activity/ActivityTimeline';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import {
GetActivityData,
GetActivityVariables,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import Paper from '@mui/material/Paper';
import Typography from '@mui/material/Typography';
import { useEffect, useState } from 'react';
import { Link as RouterLink } from 'react-router-dom';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import {
GetOrganizationsData,
GetOrganizationsVariables,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { Outlet, Route, Routes } from 'react-router-dom';
import { InvitationsView } from './InvitationsView';

export const InvitationRouter = () => {
export const InvitationsRouter = () => {
return (
<>
<Routes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import Toolbar from '@mui/material/Toolbar';
import Tooltip from '@mui/material/Tooltip';
import Typography from '@mui/material/Typography';
import { useEffect, useState } from 'react';
import { Navbar } from '../../navbars/Navbar';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { Navbar } from '../navbars/Navbar';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import {
AcceptInvitationData,
AcceptInvitationVariables,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import { useState } from 'react';
import { Link } from 'react-router-dom';
import { UnauthenticatedNavbar } from '../../navbars/UnauthenticatedNavbar';
import { UnauthenticatedNavbar } from '../navbars/UnauthenticatedNavbar';
import { LoginViewState, LoginViewTab } from './LoginView.types';
import { LoginWithCredentials } from './LoginWithCredentials';
import { LoginWithGithub } from './LoginWithGithub';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import TextField from '@mui/material/TextField';
import Typography from '@mui/material/Typography';
import { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { getCookie } from '../../cookies/getCookie';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { getCookie } from '../cookies/getCookie';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import { LoginWithCredentialsState } from './LoginWithCredentials.types';

const { VITE_BACKEND_URL } = import.meta.env;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import Typography from '@mui/material/Typography';
import { styled } from '@mui/material/styles';
import { useEffect, useState } from 'react';
import { Navigate, Link as RouterLink } from 'react-router-dom';
import { Navbar } from '../../navbars/Navbar';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { Navbar } from '../navbars/Navbar';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import {
CreateOrganizationData,
CreateOrganizationInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import Container from '@mui/material/Container';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import { UnauthenticatedNavbar } from '../../navbars/UnauthenticatedNavbar';
import { UnauthenticatedNavbar } from '../navbars/UnauthenticatedNavbar';

export const NotFoundView = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { Outlet, Route, Routes } from 'react-router-dom';
import { NotificationsView } from './NotificationsView';

export const NotificationRouter = () => {
export const NotificationsRouter = () => {
return (
<>
<Routes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ import Tooltip from '@mui/material/Tooltip';
import Typography from '@mui/material/Typography';
import { useEffect, useState } from 'react';
import { Link as RouterLink } from 'react-router-dom';
import { Navbar } from '../../navbars/Navbar';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { formatTime } from '../../utils/formatTime';
import { Navbar } from '../navbars/Navbar';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import { formatTime } from '../utils/formatTime';
import { NavigationsTableHead } from './NotificationsTableHead';
import { NotificationsTableToolbar } from './NotificationsTableToolbar';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Typography from '@mui/material/Typography';
import { Theme } from '@mui/material/styles';
import { useEffect, useState } from 'react';
import { Navigate } from 'react-router-dom';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import {
CreateProjectData,
CreateProjectSuccessPayload,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import MenuItem from '@mui/material/MenuItem';
import { styled } from '@mui/material/styles';
import { useEffect, useState } from 'react';
import { Link as RouterLink } from 'react-router-dom';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import {
GetOrganizationsData,
GetOrganizationsVariables,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import { gql, useQuery } from '@apollo/client';
import { useEffect, useState } from 'react';
import { useLocation, useParams } from 'react-router-dom';
import { Navbar } from '../../navbars/Navbar';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { Navbar } from '../navbars/Navbar';
import { NotFoundView } from '../notfound/NotFoundView';
import { ErrorSnackbar } from '../snackbar/ErrorSnackbar';
import { OrganizationPicker } from './OrganizationPicker';
import { GetOrganizationData, GetOrganizationVariables, OrganizationViewState } from './OrganizationView.types';
import { OrganizationViewTabPanel } from './OrganizationViewTabPanel';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import {
goToNewOrganization,
goToNotifications,
goToSettings,
} from '../../palette/DefaultPaletteActions';
import { PaletteSimpleAction } from '../../palette/Palette.types';
import { usePalette } from '../../palette/usePalette';
} from '../palette/DefaultPaletteActions';
import { PaletteSimpleAction } from '../palette/Palette.types';
import { usePalette } from '../palette/usePalette';
import { NewProjectDialog } from './NewProjectDialog';
import { OrganizationViewTabPanelProps, OrganizationViewTabPanelState } from './OrganizationViewTabPanel.types';
import { OrganizationDashboard } from './dashboard/OrganizationDashboard';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { Outlet, Route, Routes } from 'react-router-dom';
import { OrganizationView } from './OrganizationView';

export const OrganizationRouter = () => {
export const OrganizationsRouter = () => {
return (
<>
<Routes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import ClassIcon from '@mui/icons-material/Class';
import TimelineIcon from '@mui/icons-material/Timeline';
import Box, { BoxProps } from '@mui/material/Box';
import Grid from '@mui/material/Grid';
import { styled } from '@mui/material/styles';
import TablePagination from '@mui/material/TablePagination';
import Typography from '@mui/material/Typography';
import { styled } from '@mui/material/styles';
import { useEffect, useState } from 'react';
import { ActivityTimeline } from '../../../activity/ActivityTimeline';
import { ErrorSnackbar } from '../../../snackbar/ErrorSnackbar';
import { CreatedOn } from '../../../widgets/CreatedOn';
import { LastModifiedOn } from '../../../widgets/LastModifiedOn';
import { ActivityTimeline } from '../../activity/ActivityTimeline';
import { ErrorSnackbar } from '../../snackbar/ErrorSnackbar';
import { CreatedOn } from '../../widgets/CreatedOn';
import { LastModifiedOn } from '../../widgets/LastModifiedOn';
import {
ActivityAreaProps,
GetOrganizationDashboardData,
Expand Down
Loading

0 comments on commit 0054578

Please sign in to comment.