Skip to content

Commit

Permalink
finished comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzeSta committed Aug 12, 2022
1 parent f4bf9f0 commit d919917
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion frontend/src/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import campaignsReducer from './views/StartView/campaignsSlice';
import startViewReducer from './views/StartView/startViewSlice';

/**
* Reducer for reducer from all slices used in project
* Combined reducer containing reducers from all slices used in project
*/
export const appReducer = combineReducers({
theme: themeReducer,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/ErrorView/ErrorView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ViewWithSidebarWrapper } from '../components/ViewWithSidebarWrapper/Vie
import { clearError } from './errorSlice';

/**
* Component shown in error boundary
* Component shown as error boundary
* @returns
*/
export const ErrorView: React.FC = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ type OtherEventsPanelProps = {
* Components used to navigate between event currently displayed in MapView
* and its children/parents by displaying two set of buttons:
* - first allows to open OtherEventsDialog with detailed display
* of event's parents/children,
* which in turn allows to open them in ExplorerView by clicking
* - second displays names of children (selecting them on click)
* of event's parents/children, which in turn allows to open them
* in ExplorerView by clicking
* - second displays names of children (opening them in ExplorerView on click)
* and button for creating new children (opens ExplorerDialog
* with currentEvent already filled in as child)
* @param props
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/ExplorerView/explorerViewSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const initialState: ExplorerViewSlice = {
};

/**
* Redux slice used to store data about session and event currently displayed/selected
* in CodexView
* Redux slice used to store data about session and event
* currently displayed/selected in CodexView
*/
const explorerViewSlice = createSlice({
name: 'explorerView',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/LandingView/forms/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const AUTH_URL = '/api/auth';

/**
* Component responsible for displaying register form, registering user
* and login them in if registration is successful
* and logging them in if registration is successful
* @param props
* @returns
*/
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/views/LandingView/userDetailsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export const fetchUserDetails = createAsyncThunk('userDetails/fetchDetails', asy
return response;
});

/**
* Redux slice used to store user data (username, email, avatar)
*/
const userDetailsSlice = createSlice({
name: 'userDetails',
initialState,
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/views/LoadingView/LoadingView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { CircularProgress, Paper, Stack } from '@mui/material';

/**
* Component shown when an operation is being performed
* and application waits for data to display proper view
* @returns
*/
export const LoadingView: React.FC = () => (
<Paper
square
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { EventArrowProps } from '../EventArrow';

/**
* Mock for EventArrow component, used to allow testing with Jest library
* as well as simplify checking if arrows has been rendered correctly during tests
* as well as to simplify checking if arrows has been rendered correctly during tests
* @param props
* @returns
*/
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/MapView/mapViewSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const initialState: MapViewState = {
};

/**
* Redux slice used to store data about session and event currently displayed/selected
* in MapView
* Redux slice used to store data about session and event
* currently displayed/selected in MapView
*/
const mapViewSlice = createSlice({
name: 'mapView',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type StartSecondaryDialogProps = {

/**
* Component used as secondary dialog in StartView
* to ask user for reconfirmation that they want to delete selected dialog
* to ask user for confirmation that they want to delete selected dialog
* @returns
*/
export const StartSecondaryDialog: React.FC<StartSecondaryDialogProps> = props => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type useSnackbarArgs = {

/**
* Custom React hook used to simplify control of CustomSnackbar
* in its parent componentand sometimes allow children components
* in its parent component and allow children components
* to control it as well (by passing control functions as props)
* @returns
*/
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/components/EditMenu/EditMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type EditMenuProps = {
};

/**
* Context menu used to start process of edit of element it was open on
* Context menu used to start process of edition of element it was open on
* (e.g. by opening dialog which allows to change element properties)
* - process execution depends on function passed from parent (handleEdit)
* @param props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type EmptyPlaceholderProps = {

/**
* Generic component shown when there is no content to be shown
* (e.g. user opened CampaignView and hasn't as of yet created any campaigns),
* (e.g. user opened CampaignView and hasn't created any campaigns as of yet),
* displays text message passed from parent
* NOTE: in the future it would be nice to add custom graphics
* to every usage of this component (e.g. a planet forming out of empty space in CampaignView)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type ViewWithNavBarWrapperProps = {
/**
* Component serving as wrapper for all views using NavBar (that is: all views
* shown to logged user). It provides it's children (views) with wrapper
* for primary (various form which crete/edit object, e.g. sessions and event)
* for primary (various form which create/edit object, e.g. sessions and event)
* and secondary dialog (mostly confirmation of e.g. deleting Codex entry),
* Floating Action Button wrapper (used to open primary dialog in all views)
* and Snackbar for displaying feedback and tools to use it
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/views/viewsRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ const CODEX = '/codex';
const ERROR = '/error';

export default { LANDING, START, CAMPAIGN, MAP, EXPLORER, CODEX, ERROR };

export const viewsRoutesArray = [LANDING, START, CAMPAIGN, MAP, EXPLORER, CODEX, ERROR];

0 comments on commit d919917

Please sign in to comment.