Browse Source

update documentation

Ramona Plogmann 4 years ago
parent
commit
b057ef7cd7
34 changed files with 68 additions and 1498 deletions
  1. 1 0
      .gitignore
  2. 6 8
      client/docs/asset-manifest.json
  3. 0 1
      client/docs/build/2.d9338536.js
  4. 0 146
      client/docs/build/2.d9338536.js.LICENSE.txt
  5. 0 0
      client/docs/build/main.c534b235.js
  6. 0 1280
      client/docs/documentation_react-docgen.json
  7. 3 3
      client/docs/index.html
  8. 0 0
      client/docs/service-worker.js
  9. 1 1
      client/package.json
  10. 1 0
      client/src/components/Buttons/LoginButton.jsx
  11. 1 0
      client/src/components/Buttons/LogoutButton.jsx
  12. 3 3
      client/src/components/Images/CircleImage.jsx
  13. 4 4
      client/src/components/Images/PhotoDropzone.jsx
  14. 1 0
      client/src/components/Meals/CategoryIcons.jsx
  15. 0 10
      client/src/components/Meals/EditMeal.jsx
  16. 2 2
      client/src/components/Meals/EditMealCore.jsx
  17. 4 7
      client/src/components/Meals/MealAvatar.jsx
  18. 2 1
      client/src/components/Meals/MealDetailViewExtern.jsx
  19. 1 1
      client/src/components/Meals/MealImportButton.jsx
  20. 3 0
      client/src/components/Meals/MealWrapper.jsx
  21. 5 2
      client/src/components/Meals/Meals.jsx
  22. 1 6
      client/src/components/Meals/SelectMealCategory.jsx
  23. 4 0
      client/src/components/Meals/SelectMealTags.jsx
  24. 1 12
      client/src/components/Plans/EditPlanItem.jsx
  25. 3 2
      client/src/components/Plans/EditPlanItemCore.jsx
  26. 1 1
      client/src/components/Plans/MissingIngredients.jsx
  27. 1 1
      client/src/components/Plans/OwnPlans.jsx
  28. 3 1
      client/src/components/Plans/Plans.jsx
  29. 2 0
      client/src/components/Settings/EditMealCategories.jsx
  30. 1 0
      client/src/components/Settings/EditMealTags.jsx
  31. 5 1
      client/src/components/Settings/Settings.jsx
  32. 3 2
      client/src/components/Social/Social.jsx
  33. 2 0
      client/src/components/util/FullScreenDialog.jsx
  34. 3 3
      client/styleguide.config.js

+ 1 - 0
.gitignore

@@ -4,4 +4,5 @@ client/.eslintcache
 server/.env
 server/uploads/mealImages/1616522970276-ACtC-3d5MANMrywGr3uAd1-Z9NgpEVpKsyyQo7-MlgztiXantk3cWjVIrjPWmOLoQxybnyv7WGa0dpWCkda2YgONk2jjIv8APM5k-j39dezcI8X4ANUuHB-KniG4auchmdP-q2jUngfCSkYnPgfvXLNrlYcYEQ=s640-no.jpg
 client/build/
+client/docs/
 server/uploads/

+ 6 - 8
client/docs/asset-manifest.json

@@ -1,17 +1,15 @@
 {
   "files": {
-    "main.js": "/build/main.c534b235.js",
+    "main.js": "/build/main.7eb53e3c.js",
     "runtime-main.js": "/build/bundle.f0f5edae.js",
-    "build/2.d9338536.js": "/build/2.d9338536.js",
-    "build/2.d9338536.js.LICENSE.txt": "/build/2.d9338536.js.LICENSE.txt",
+    "build/2.80735149.js": "/build/2.80735149.js",
+    "build/2.80735149.js.LICENSE.txt": "/build/2.80735149.js.LICENSE.txt",
     "index.html": "/index.html",
-    "service-worker.js": "/service-worker.js",
-    "static/media/EMELAY_logoDark.b1bb74dd.png": "/static/media/EMELAY_logoDark.b1bb74dd.png",
-    "static/media/Emealay_Logo_weiss.bed4eea8.png": "/static/media/Emealay_Logo_weiss.bed4eea8.png"
+    "service-worker.js": "/service-worker.js"
   },
   "entrypoints": [
     "build/bundle.f0f5edae.js",
-    "build/2.d9338536.js",
-    "build/main.c534b235.js"
+    "build/2.80735149.js",
+    "build/main.7eb53e3c.js"
   ]
 }

File diff suppressed because it is too large
+ 0 - 1
client/docs/build/2.d9338536.js


+ 0 - 146
client/docs/build/2.d9338536.js.LICENSE.txt

@@ -1,146 +0,0 @@
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
-*/
-
-/*!
- * @overview es6-promise - a tiny implementation of Promises/A+.
- * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
- * @license   Licensed under MIT license
- *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version   v4.2.8+1e68dce6
- */
-
-/*!
- * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com
- * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
- */
-
-/*!
- * The buffer module from node.js, for the browser.
- *
- * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
- * @license  MIT
- */
-
-/*!
- * The buffer module from node.js, for the browser.
- *
- * @author   Feross Aboukhadijeh <http://feross.org>
- * @license  MIT
- */
-
-/*!
- * regjsgen 0.5.2
- * Copyright 2014-2020 Benjamin Tan <https://ofcr.se/>
- * Available under the MIT license <https://github.com/bnjmnt4n/regjsgen/blob/master/LICENSE-MIT.txt>
- */
-
-/*! *****************************************************************************
-Copyright (c) Microsoft Corporation. All rights reserved.
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-
-/*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
-
-/*! https://mths.be/regenerate v1.4.2 by @mathias | MIT license */
-
-/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
-
-/**
- * A better abstraction over CSS.
- *
- * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
- * @website https://github.com/cssinjs/jss
- * @license MIT
- */
-
-/**
- * Prism: Lightweight, robust, elegant syntax highlighting
- *
- * @license MIT <https://opensource.org/licenses/MIT>
- * @author Lea Verou <https://lea.verou.me>
- * @namespace
- * @public
- */
-
-/** @license React v0.20.1
- * scheduler.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/** @license React v16.13.1
- * react-is.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/** @license React v17.0.1
- * react-dom.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/** @license React v17.0.1
- * react-jsx-runtime.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/** @license React v17.0.1
- * react.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/**!
- * @fileOverview Kickass library to create and place poppers near their reference elements.
- * @version 1.16.1-lts
- * @license
- * Copyright (c) 2016 Federico Zivolo and contributors
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */

File diff suppressed because it is too large
+ 0 - 0
client/docs/build/main.c534b235.js


+ 0 - 1280
client/docs/documentation_react-docgen.json

@@ -1,1280 +0,0 @@
-{
-  "src\\App.jsx": {
-    "description": "This is the main App component. It sets the MUI theme as well as the dark mode (if desired). It also deals with Frontend-Routing with the help of React Router.\n@returns the complete App\n@component",
-    "displayName": "App",
-    "methods": []
-  },
-  "src\\components\\Buttons\\AddButton.jsx": {
-    "description": "Button in form of a plus icon",
-    "displayName": "AddButton",
-    "methods": [],
-    "props": {
-      "onClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": ""
-      }
-    }
-  },
-  "src\\components\\Buttons\\BackButton.jsx": {
-    "description": "Button in form of a caret left icon",
-    "displayName": "BackButton",
-    "methods": [],
-    "props": {
-      "onClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": ""
-      }
-    }
-  },
-  "src\\components\\Buttons\\BoxCloseX.jsx": {
-    "description": "Button that is an x within a black circle that turns red on hovering, center located on top right corner of parent",
-    "displayName": "BoxCloseX",
-    "methods": [],
-    "props": {
-      "onClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": ""
-      }
-    }
-  },
-  "src\\components\\Buttons\\DeleteButton.jsx": {
-    "description": "Button in form of a trashcan icon",
-    "displayName": "DeleteButton",
-    "methods": [],
-    "props": {
-      "onClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": ""
-      }
-    }
-  },
-  "src\\components\\Buttons\\EditButton.jsx": {
-    "description": "Button in form of a pencil icon",
-    "displayName": "EditButton",
-    "methods": [],
-    "props": {
-      "onClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": ""
-      }
-    }
-  },
-  "src\\components\\Buttons\\FontButton.jsx": {
-    "description": "Component for clickable text",
-    "displayName": "FontButton",
-    "methods": [],
-    "props": {
-      "onClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": ""
-      },
-      "label": {
-        "type": {
-          "name": "string"
-        },
-        "required": true,
-        "description": ""
-      }
-    }
-  },
-  "src\\components\\Buttons\\InnerBoxCloseX.jsx": {
-    "description": "Button that is an x within a black circle that turns red on hovering, located **within** top right corner of parent",
-    "displayName": "InnerBoxCloseX",
-    "methods": [],
-    "props": {
-      "onClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": ""
-      }
-    }
-  },
-  "src\\components\\Buttons\\InnerBoxSelection.jsx": {
-    "description": "Button that is a checkmark within a green circle that turns opaque on hovering, located within the top left corner of parent",
-    "displayName": "InnerBoxSelection",
-    "methods": [],
-    "props": {
-      "onClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": ""
-      },
-      "selected": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      }
-    }
-  },
-  "src\\components\\Buttons\\LoginButton.jsx": {
-    "description": "",
-    "displayName": "LoginButton",
-    "methods": []
-  },
-  "src\\components\\Buttons\\LogoutButton.jsx": {
-    "description": "",
-    "displayName": "LogoutButton",
-    "methods": []
-  },
-  "src\\components\\Buttons\\SearchButton.jsx": {
-    "description": "Button in form of a magnifying glass",
-    "displayName": "SearchButton",
-    "methods": [],
-    "props": {
-      "onClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": ""
-      }
-    }
-  },
-  "src\\components\\Buttons\\SimpleCloseX.jsx": {
-    "description": "Button in form of a big white X icon",
-    "displayName": "SimpleCloseX",
-    "methods": [],
-    "props": {
-      "onClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": ""
-      }
-    }
-  },
-  "src\\components\\ContentWrapper.jsx": {
-    "description": "Wrapper component to display content page and bottom navigation\n@param activeTab {string} the site to display, must be present in the components switch case\n@component",
-    "displayName": "ContentWrapper",
-    "methods": []
-  },
-  "src\\components\\Home.jsx": {
-    "description": "Home component shows info text and login button if user is not logged in\n@component",
-    "displayName": "Home",
-    "methods": []
-  },
-  "src\\components\\Images\\CircleImage.jsx": {
-    "description": "Image cropped to circular shape",
-    "displayName": "CircleImage",
-    "methods": [],
-    "props": {
-      "src": {
-        "type": {
-          "name": "string"
-        },
-        "required": true,
-        "description": "complete path of the image source"
-      },
-      "altText": {
-        "type": {
-          "name": "string"
-        },
-        "required": true,
-        "description": "alternative text if image cannot be displayed"
-      }
-    }
-  },
-  "src\\components\\Images\\ImageCarousel.jsx": {
-    "description": "full screen overlay containing image carousel",
-    "displayName": "ImageCarousel",
-    "methods": [],
-    "props": {
-      "images": {
-        "type": {
-          "name": "arrayOf",
-          "value": {
-            "name": "shape",
-            "value": {
-              "name": {
-                "name": "string",
-                "required": false
-              },
-              "path": {
-                "name": "string",
-                "required": false
-              }
-            }
-          }
-        },
-        "required": true,
-        "description": "all images that can be scrolled through in the carousel, including name (that will be the altText) and relative path to serverURL"
-      },
-      "startIndex": {
-        "type": {
-          "name": "number"
-        },
-        "required": false,
-        "description": "Array index number of image that will be displayed first",
-        "defaultValue": {
-          "value": "0",
-          "computed": false
-        }
-      },
-      "dismissCarousel": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that hides the carousel"
-      }
-    }
-  },
-  "src\\components\\Images\\ImageUpload.jsx": {
-    "description": "Image Upload that includes the display of the images that have been uploaded.\r\n Either single image or multiple images, which affects the look:\r\n ### Multiple Image Upload\r\n + images will be displayed as `Image Grid`, with a Dropzone being the first tile\r\n ### Single Image Upload\r\n + image needs to be wrapped in an array\r\n + will be displayed as a circular image with an optional overlay of a camera icon",
-    "displayName": "ImageUpload",
-    "methods": [],
-    "props": {
-      "multiple": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "allow upload of more than one image?",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      },
-      "uploadedImages": {
-        "type": {
-          "name": "arrayOf",
-          "value": {
-            "name": "union",
-            "value": [
-              {
-                "name": "shape",
-                "value": {
-                  "name": {
-                    "name": "string",
-                    "required": false
-                  },
-                  "path": {
-                    "name": "string",
-                    "required": false
-                  }
-                }
-              },
-              {
-                "name": "string"
-              }
-            ]
-          }
-        },
-        "required": false,
-        "description": "images that have been uploaded, must be updated through onChangeUploadedImages function.\r\n * If single image (multiple === false), complete source must be the (first or) only element of an array\r\n * If multiple needs to be array of name (alt-Tag) and relative path to serverURL",
-        "defaultValue": {
-          "value": "[]",
-          "computed": false
-        }
-      },
-      "category": {
-        "type": {
-          "name": "string"
-        },
-        "required": true,
-        "description": "category/folder name of the image, e.g., mealImages or userProfile (make sure that folder exists in uploads folder!)"
-      },
-      "categoryId": {
-        "type": {
-          "name": "string"
-        },
-        "required": true,
-        "description": "ID within the category, e.g., mealId or userId"
-      },
-      "onChangeUploadedImages": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that updates the image(s)"
-      },
-      "imageName": {
-        "type": {
-          "name": "string"
-        },
-        "required": false,
-        "description": "if multiple === false this name is the alt tag of the single uploaded image"
-      },
-      "useSingleUploadOverlay": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "overlay single image upload area with a transparent camera icon",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      },
-      "string": {
-        "defaultValue": {
-          "value": "''",
-          "computed": false
-        },
-        "required": false
-      }
-    }
-  },
-  "src\\components\\Images\\PhotoDropzone.jsx": {
-    "description": "Dropzone that will wrap around elements that are passed as children\n+ accepts png, jpg and jpeg of max. 10MB",
-    "displayName": "PhotoDropzone",
-    "methods": [],
-    "props": {
-      "handleAcceptedFiles": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that handles accepted files"
-      },
-      "handleRejectedFiles": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that handles rejected files"
-      },
-      "multiple": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "allow uploading more than one image?",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      },
-      "dropZoneStyles": {
-        "type": {
-          "name": "any"
-        },
-        "required": false,
-        "description": "pass any className for styles to be applied to dropZone"
-      },
-      "usePlusIcon": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "display plus icon in the center of the dropzone?",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      }
-    }
-  },
-  "src\\components\\Meals\\AddMeal.jsx": {
-    "description": "page that allows adding a meal",
-    "displayName": "AddMeal",
-    "methods": [],
-    "props": {
-      "onDoneAdding": {
-        "type": {
-          "name": "func"
-        },
-        "required": false,
-        "description": "function to be executed after Meal was added (receives no parameters)"
-      }
-    }
-  },
-  "src\\components\\Meals\\EditMeal.jsx": {
-    "description": "Dialog page that allows user to edit meal",
-    "displayName": "EditMeal",
-    "methods": [],
-    "props": {
-      "meal": {
-        "type": {
-          "name": "shape",
-          "value": {
-            "_id": {
-              "name": "string",
-              "required": false
-            },
-            "mealTitle": {
-              "name": "string",
-              "required": false
-            },
-            "images": {
-              "name": "arrayOf",
-              "value": {
-                "name": "shape",
-                "value": {
-                  "name": {
-                    "name": "string",
-                    "required": false
-                  },
-                  "path": {
-                    "name": "string",
-                    "required": false
-                  }
-                }
-              },
-              "required": false
-            },
-            "recipeLink": {
-              "name": "custom",
-              "raw": "''",
-              "required": false
-            },
-            "comment": {
-              "name": "custom",
-              "raw": "''",
-              "required": false
-            }
-          }
-        },
-        "required": false,
-        "description": "Meal to be edited",
-        "defaultValue": {
-          "value": "null",
-          "computed": false
-        }
-      },
-      "open": {
-        "type": {
-          "name": "bool"
-        },
-        "required": true,
-        "description": "is component visible?"
-      },
-      "onDoneEditing": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function to be executed after editing complete (receives no parameters)"
-      },
-      "onDoneDelete": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function to be executed after meal deletion complete (receives no parameters)"
-      },
-      "closeDialog": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that closes Dialog / sets open to false"
-      }
-    }
-  },
-  "src\\components\\Meals\\EditMealCore.jsx": {
-    "description": "component is used by AddMeal and EditMeal and provides their shared core elements: text and photo input.\r\n Does not handle communication to server",
-    "displayName": "EditMealCore",
-    "methods": [],
-    "props": {
-      "updateMeal": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "setState function of the parent component's meal that takes key and value of attribute and updates it"
-      },
-      "meal": {
-        "type": {
-          "name": "shape",
-          "value": {
-            "_id": {
-              "name": "string",
-              "required": false
-            },
-            "title": {
-              "name": "string",
-              "required": false
-            },
-            "images": {
-              "name": "arrayOf",
-              "value": {
-                "name": "shape",
-                "value": {
-                  "name": {
-                    "name": "string",
-                    "required": false
-                  },
-                  "path": {
-                    "name": "string",
-                    "required": false
-                  }
-                }
-              },
-              "required": false
-            },
-            "recipeLink": {
-              "name": "custom",
-              "raw": "''",
-              "required": false
-            },
-            "comment": {
-              "name": "custom",
-              "raw": "''",
-              "required": false
-            }
-          }
-        },
-        "required": true,
-        "description": "meal to be edited"
-      },
-      "isSecondary": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "whether to use primary or secondary color scheme",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      }
-    }
-  },
-  "src\\components\\Meals\\MealDetailView.jsx": {
-    "description": "Dialog page that displays Meal Details and optionally opens Edit Dialog",
-    "displayName": "MealDetailView",
-    "methods": [],
-    "props": {
-      "meal": {
-        "type": {
-          "name": "shape",
-          "value": {
-            "title": {
-              "name": "string",
-              "required": false
-            },
-            "images": {
-              "name": "arrayOf",
-              "value": {
-                "name": "shape",
-                "value": {
-                  "name": {
-                    "name": "string",
-                    "required": false
-                  },
-                  "path": {
-                    "name": "string",
-                    "required": false
-                  }
-                }
-              },
-              "required": false
-            },
-            "recipeLink": {
-              "name": "custom",
-              "raw": "''",
-              "required": false
-            },
-            "comment": {
-              "name": "custom",
-              "raw": "''",
-              "required": false
-            }
-          }
-        },
-        "required": false,
-        "description": "meal to be viewed",
-        "defaultValue": {
-          "value": "null",
-          "computed": false
-        }
-      },
-      "open": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "is component visible?",
-        "defaultValue": {
-          "value": "true",
-          "computed": false
-        }
-      },
-      "closeDialog": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that sets open to false"
-      },
-      "onDoneEditing": {
-        "type": {
-          "name": "func"
-        },
-        "required": false,
-        "description": "function to be executed after editing (receives no parameters)"
-      },
-      "allowEditing": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "allow opening edit page? (To be false if not one's own meal)",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      }
-    }
-  },
-  "src\\components\\Meals\\Meals.jsx": {
-    "description": "content of page that displays all meals of a given user and opens their details views on click (not including Navbar)",
-    "displayName": "Meals",
-    "methods": [],
-    "props": {
-      "userId": {
-        "type": {
-          "name": "string"
-        },
-        "required": false,
-        "description": "userId of user whose meals are to be displayed"
-      },
-      "own": {
-        "type": {
-          "name": "bool"
-        },
-        "required": true,
-        "description": "are these the user's own meals or is another user watching foreign meals? In the latter case editing will be prohibited."
-      }
-    }
-  },
-  "src\\components\\Meals\\OwnMeals.jsx": {
-    "description": "Page that displays a user's own meals and adds a Navbar to the Meals list that allows adding a meal",
-    "displayName": "OwnMeals",
-    "methods": []
-  },
-  "src\\components\\NavTabs.jsx": {
-    "description": "Bottom Navigation in the form of Tabs",
-    "displayName": "NavTabs",
-    "methods": [],
-    "props": {
-      "height": {
-        "type": {
-          "name": "string"
-        },
-        "required": false,
-        "description": "height of the BottomNav (number + unit)",
-        "defaultValue": {
-          "value": "process.env.REACT_APP_NAV_BOTTOM_HEIGHT + 'px'",
-          "computed": false
-        }
-      }
-    }
-  },
-  "src\\components\\Navbar.jsx": {
-    "description": "Navbar visible on all pages.\nHas customizable title, left and right side components and an optional onClick for the title",
-    "displayName": "Navbar",
-    "methods": [],
-    "props": {
-      "pageTitle": {
-        "type": {
-          "name": "string"
-        },
-        "required": true,
-        "description": "title of current page"
-      },
-      "rightSideComponent": {
-        "type": {
-          "name": "any"
-        },
-        "required": false,
-        "description": "component to be displayed on the right side (for example Edit Button)",
-        "defaultValue": {
-          "value": "null",
-          "computed": false
-        }
-      },
-      "leftSideComponent": {
-        "type": {
-          "name": "any"
-        },
-        "required": false,
-        "description": "component to be displayed on the left side (for example Back Button)",
-        "defaultValue": {
-          "value": "null",
-          "computed": false
-        }
-      },
-      "height": {
-        "type": {
-          "name": "string"
-        },
-        "required": false,
-        "description": "custom height, may not be of use anymore, but is still working",
-        "defaultValue": {
-          "value": "process.env.REACT_APP_NAVBAR_TOP_HEIGHT",
-          "computed": true
-        }
-      },
-      "titleOnClick": {
-        "type": {
-          "name": "func"
-        },
-        "required": false,
-        "description": "optional onClick function for the title"
-      }
-    }
-  },
-  "src\\components\\Plans\\AddPlanItem.jsx": {
-    "description": "page that allows adding a plan",
-    "displayName": "AddPlanItem",
-    "methods": [],
-    "props": {
-      "onDoneAdding": {
-        "type": {
-          "name": "func"
-        },
-        "required": false,
-        "description": "function to be executed after Plan was added (receives no parameters)"
-      }
-    }
-  },
-  "src\\components\\Plans\\EditPlanItem.jsx": {
-    "description": "",
-    "displayName": "EditPlanItem",
-    "methods": [],
-    "props": {
-      "planItem": {
-        "type": {
-          "name": "shape",
-          "value": {
-            "title": {
-              "name": "string",
-              "required": false
-            },
-            "hasDate": {
-              "name": "bool",
-              "required": false
-            },
-            "date": {
-              "name": "string",
-              "required": false
-            },
-            "gotEverything": {
-              "name": "bool",
-              "required": false
-            },
-            "missingIngredients": {
-              "name": "arrayOf",
-              "value": {
-                "name": "shape",
-                "value": {
-                  "name": {
-                    "name": "string",
-                    "required": false
-                  },
-                  "checked": {
-                    "name": "bool",
-                    "required": false
-                  }
-                }
-              },
-              "required": false
-            },
-            "connectedMealId": {
-              "name": "string",
-              "required": false
-            }
-          }
-        },
-        "required": false,
-        "description": "plan to be edited",
-        "defaultValue": {
-          "value": "null",
-          "computed": false
-        }
-      },
-      "open": {
-        "type": {
-          "name": "bool"
-        },
-        "required": true,
-        "description": "is component visible?"
-      },
-      "onDoneEditing": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function to be executed after editing complete (receives no parameters)"
-      },
-      "closeDialog": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that closes Dialog / sets open to false"
-      }
-    }
-  },
-  "src\\components\\Plans\\EditPlanItemCore.jsx": {
-    "description": "component is used by AddPlanItem and EditPlanItem and provides their shared input elements\r\n Does not handle communication to server",
-    "displayName": "EditPlanItemCore",
-    "methods": [],
-    "props": {
-      "isAdd": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "is this component called from AddPlanItem page?\r\nThis is necessary because the MUI Autocomplete component is still a lab component and does not work 100% properly, so I had to implement a workaround that needs this info",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      },
-      "updatePlanItem": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "setState function of the parent component's planItem that takes key and value of attribute and updates it"
-      },
-      "planItem": {
-        "type": {
-          "name": "shape",
-          "value": {
-            "title": {
-              "name": "string",
-              "required": false
-            },
-            "hasDate": {
-              "name": "bool",
-              "required": false
-            },
-            "date": {
-              "name": "any",
-              "required": false
-            },
-            "gotEverything": {
-              "name": "bool",
-              "required": false
-            },
-            "missingIngredients": {
-              "name": "arrayOf",
-              "value": {
-                "name": "shape",
-                "value": {
-                  "name": {
-                    "name": "string",
-                    "required": false
-                  },
-                  "checked": {
-                    "name": "bool",
-                    "required": false
-                  }
-                }
-              },
-              "required": false
-            },
-            "connectedMealId": {
-              "name": "string",
-              "required": false
-            }
-          }
-        },
-        "required": true,
-        "description": "planItem to be edited"
-      },
-      "isSecondary": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "whether to use primary or secondary color scheme",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      }
-    }
-  },
-  "src\\components\\Plans\\MissingIngredients.jsx": {
-    "description": "Dialog that displays a plans missing ingredients and allows to check or uncheck them",
-    "displayName": "MissingIngredients",
-    "methods": [],
-    "props": {
-      "planItem": {
-        "type": {
-          "name": "shape",
-          "value": {
-            "_id": {
-              "name": "string",
-              "required": false
-            },
-            "title": {
-              "name": "string",
-              "required": false
-            },
-            "hasDate": {
-              "name": "bool",
-              "required": false
-            },
-            "date": {
-              "name": "string",
-              "required": false
-            },
-            "gotEverything": {
-              "name": "bool",
-              "required": false
-            },
-            "missingIngredients": {
-              "name": "arrayOf",
-              "value": {
-                "name": "shape",
-                "value": {
-                  "name": {
-                    "name": "string",
-                    "required": false
-                  },
-                  "checked": {
-                    "name": "bool",
-                    "required": false
-                  }
-                }
-              },
-              "required": false
-            },
-            "connectedMealId": {
-              "name": "string",
-              "required": false
-            }
-          }
-        },
-        "required": false,
-        "description": "planItem whose ingredients are to be displayed",
-        "defaultValue": {
-          "value": "null",
-          "computed": false
-        }
-      },
-      "open": {
-        "type": {
-          "name": "bool"
-        },
-        "required": true,
-        "description": "is component visible?"
-      },
-      "onDoneEditing": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function to be executed after an ingredient is checked or unchecked (receives no parameters)"
-      },
-      "closeDialog": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that closes Dialog / sets open to false"
-      }
-    }
-  },
-  "src\\components\\Plans\\OwnPlans.jsx": {
-    "description": "Page that displays a user's own plans and adds a Navbar to the plans list that allows adding a plan",
-    "displayName": "OwnPlans",
-    "methods": []
-  },
-  "src\\components\\Plans\\Plans.jsx": {
-    "description": "content of page that displays all plans of a given user (not including Navbar)",
-    "displayName": "Plans",
-    "methods": [],
-    "props": {
-      "own": {
-        "type": {
-          "name": "bool"
-        },
-        "required": true,
-        "description": "are these the user's own plans or is another user watching foreign plans? In the latter case editing will be prohibited."
-      },
-      "userId": {
-        "type": {
-          "name": "string"
-        },
-        "required": true,
-        "description": "userId of user whose plans are to be displayed"
-      }
-    }
-  },
-  "src\\components\\Plans\\ShoppingList.jsx": {
-    "description": "Displays a list of all ingredients of future plans (ingredients of past plans will not be displayed)\n+ checked ingredients will be displayed with a line through the text\n+ allows checking off and unchecking items from the list by clicking on them\n+ orders ingredients by date and meal",
-    "displayName": "ShoppingList",
-    "methods": [],
-    "props": {
-      "userId": {
-        "type": {
-          "name": "string"
-        },
-        "required": true,
-        "description": "user whose plans will be compiled into the shopping list"
-      },
-      "onClose": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that closes the ShoppingList component"
-      },
-      "plans": {
-        "type": {
-          "name": "array"
-        },
-        "required": false,
-        "description": "optional plans array. If not provided, plans will be fetched from database",
-        "defaultValue": {
-          "value": "null",
-          "computed": false
-        }
-      }
-    }
-  },
-  "src\\components\\Settings\\EditProfile.jsx": {
-    "description": "Dialog page to edit user data, looks like Profile but is editable",
-    "displayName": "EditProfile",
-    "methods": [],
-    "props": {
-      "userData": {
-        "type": {
-          "name": "shape",
-          "value": {}
-        },
-        "required": true,
-        "description": "initial user data to be edited"
-      },
-      "onUpdateUser": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "callback to be executed after user is updated (receives no parameters)"
-      },
-      "isSecondary": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "whether to use primary or secondary color scheme",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      },
-      "open": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "is component visible?",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      },
-      "closeDialog": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that closes Dialog / sets open to false"
-      }
-    }
-  },
-  "src\\components\\Settings\\Profile.jsx": {
-    "description": "content page (excluding Navbar) that displays user's data",
-    "displayName": "Profile",
-    "methods": [],
-    "props": {
-      "userData": {
-        "type": {
-          "name": "shape",
-          "value": {}
-        },
-        "required": true,
-        "description": "user data to be displayed, currently displays name, metadata.nickname, email and metadata.picture (or picture if no metadata.picture is set)"
-      }
-    }
-  },
-  "src\\components\\Settings\\ProfilePlaceholder.jsx": {
-    "description": "empty dummy profile to be displayed while userData is loading",
-    "displayName": "ProfilePlaceholder",
-    "methods": []
-  },
-  "src\\components\\Settings\\Settings.jsx": {
-    "description": "page that displays user profile (and allows editing user profile) and underneath allows changing remaining settings\n+ settings that can be changed:\n   + language\n   + use dark mode?",
-    "displayName": "Settings",
-    "methods": [],
-    "props": {
-      "setDarkModeInAppLevel": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "needs to receive a function that can toggle dark mode directly from the App.jsx component"
-      }
-    }
-  },
-  "src\\components\\Social\\ContactsContent.jsx": {
-    "description": "#### Page component that is displayed when other users are accessing a profile that is not their own.\n+ gets the userId from the URL params (of React Router)\n+ current content:\n    + Navbar (title: other user's name)\n    + two swipeable tabs that display the other user's plans and meals",
-    "displayName": "ContactsContent",
-    "methods": []
-  },
-  "src\\components\\Social\\FriendOrUnfriendButton.jsx": {
-    "description": "Button that will toggle whether given contact is included in current user's contacts array.",
-    "displayName": "FriendOrUnfriendButton",
-    "methods": [],
-    "props": {
-      "otherUser": {
-        "type": {
-          "name": "object"
-        },
-        "required": true,
-        "description": "user that will be added or removed to contacts array of current user"
-      },
-      "afterUpdateContacts": {
-        "type": {
-          "name": "func"
-        },
-        "required": false,
-        "description": "optional function that allows fetching updated contacts in parent component (receives no parameters)",
-        "defaultValue": {
-          "value": "null",
-          "computed": false
-        }
-      },
-      "contacts": {
-        "type": {
-          "name": "array"
-        },
-        "required": false,
-        "description": "current user's contacts that the otherUser will be added to or removed from. If not provided, will fetch contacts from the database, but this will result in longer loading",
-        "defaultValue": {
-          "value": "null",
-          "computed": false
-        }
-      },
-      "inNavbar": {
-        "type": {
-          "name": "bool"
-        },
-        "required": false,
-        "description": "optional styling that displays button in a white circle",
-        "defaultValue": {
-          "value": "false",
-          "computed": false
-        }
-      }
-    }
-  },
-  "src\\components\\Social\\Social.jsx": {
-    "description": "displays a list of current user's contacts and allows searching for all users through Button in Navbar\non clicking on a contact's name will open ContactContent",
-    "displayName": "Social",
-    "methods": []
-  },
-  "src\\components\\Social\\UserSearch.jsx": {
-    "description": "Allows searching for users and shows a list of users that correspond to the search term.\nIf search term is empty, displays a list of all users.\nFurthermore, allows adding or removing found users to/from the contact list.",
-    "displayName": "UserSearch",
-    "methods": [],
-    "props": {
-      "closeSearch": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function that closes Dialog / sets open to false"
-      },
-      "open": {
-        "type": {
-          "name": "bool"
-        },
-        "required": true,
-        "description": "is component visible?"
-      },
-      "contacts": {
-        "type": {
-          "name": "arrayOf",
-          "value": {
-            "name": "shape",
-            "value": {}
-          }
-        },
-        "required": true,
-        "description": "contact array of current user"
-      },
-      "afterUpdateContacts": {
-        "type": {
-          "name": "func"
-        },
-        "required": true,
-        "description": "function to be executed after friend or unfriend action. *Must* update the contacts prop."
-      },
-      "openContact": {
-        "type": {
-          "name": "func"
-        },
-        "required": false,
-        "description": "function that will open the contact's page"
-      }
-    }
-  },
-  "src\\components\\util\\CircularProgressWithLabel.jsx": {
-    "description": "Countdown that will be displayed as a number of seconds remaining surrounded by a circular progress that runs in reverse from initialValue to 0, updates every second",
-    "displayName": "CircularProgressWithLabel",
-    "methods": [],
-    "props": {
-      "initialValue": {
-        "type": {
-          "name": "number"
-        },
-        "required": true,
-        "description": "initial value of countdown in seconds"
-      },
-      "step": {
-        "type": {
-          "name": "number"
-        },
-        "required": false,
-        "description": "number of seconds that will be subtracted each second",
-        "defaultValue": {
-          "value": "1",
-          "computed": false
-        }
-      }
-    }
-  },
-  "src\\components\\util\\SlidingTransition.jsx": {
-    "description": "Provides sliding in from the right side effect to Dialog components",
-    "displayName": "SlidingTransitionLeft",
-    "methods": []
-  }
-}

+ 3 - 3
client/docs/index.html

@@ -4,12 +4,12 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>Emealay Documentation</title>
+    <title>Emealay - Documentation of Client Components</title>
   </head>
   <body>
     <div id="rsg-root"></div>
     <script src="build/bundle.f0f5edae.js"></script>
-    <script src="build/2.d9338536.js"></script>
-    <script src="build/main.c534b235.js"></script>
+    <script src="build/2.80735149.js"></script>
+    <script src="build/main.7eb53e3c.js"></script>
   </body>
 </html>

File diff suppressed because it is too large
+ 0 - 0
client/docs/service-worker.js


+ 1 - 1
client/package.json

@@ -28,6 +28,7 @@
     "pwa-asset-generator": "^4.1.1",
     "react": "^17.0.1",
     "react-dom": "^17.0.1",
+    "react-dropzone": "^11.2.4",
     "react-i18next": "^11.8.5",
     "react-material-ui-carousel": "^2.1.2",
     "react-router-dom": "^5.2.0",
@@ -66,7 +67,6 @@
   "devDependencies": {
     "prop-types": "^15.7.2",
     "react-docgen": "^5.3.1",
-    "react-dropzone": "^11.2.4",
     "react-styleguidist": "^11.1.6"
   }
 }

+ 1 - 0
client/src/components/Buttons/LoginButton.jsx

@@ -10,6 +10,7 @@ const useStyles = makeStyles({
   }
 });
 
+/** Login button which includes logic to log the user in via Auth0 */
 const LoginButton = () => {
   const classes = useStyles();
   const { loginWithRedirect } = useAuth0();

+ 1 - 0
client/src/components/Buttons/LogoutButton.jsx

@@ -19,6 +19,7 @@ const useStyles = makeStyles(theme => ({
 
 const logoutRedirect = process.env.REACT_APP_LOGOUT_REDIRECT;
 
+/** Login button including logout logic */
 const LogoutButton = () => {
   const classes = useStyles();
   const { logout } = useAuth0();

+ 3 - 3
client/src/components/Images/CircleImage.jsx

@@ -39,11 +39,11 @@ CircleImage.propTypes = {
   src: string.isRequired,
   /** alternative text if image cannot be displayed */
   altText: string.isRequired,
-  /** shows progress instead of image */
-  loading: bool,
+  /** shows circular progress instead of image */
+  loading: bool.isRequired,
 };
 
-CircleImage.propTypes = {
+CircleImage.defaultProps = {
   loading: false,
 };
 

+ 4 - 4
client/src/components/Images/PhotoDropzone.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { any, bool, func } from 'prop-types';
+import { bool, func, string } from 'prop-types';
 import { useDropzone } from 'react-dropzone';
 import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
 import { faPlusCircle } from '@fortawesome/free-solid-svg-icons';
@@ -26,7 +26,7 @@ const useStyles = makeStyles((theme) => ({
 }));
 
 /** Dropzone that will wrap around elements that are passed as children
- * + accepts png, jpg and jpeg of max. 10MB */
+ * + accepts all images with a size of max. 10MB */
 function PhotoDropzone(props) {
 
   const classes = useStyles();
@@ -38,7 +38,7 @@ function PhotoDropzone(props) {
     isDragAccept,
     isDragReject,
   } = useDropzone({
-    accept: ['image/png', 'image/jpg', 'image/jpeg'],
+    accept: ['image'],
     maxSize: 10485760,
     multiple: multiple,
     onDrop(acceptedFiles, rejectedFiles, event) {
@@ -68,7 +68,7 @@ PhotoDropzone.propTypes = {
   /** allow uploading more than one image? */
   multiple: bool,
   /** pass any className for styles to be applied to dropZone */
-  dropZoneStyles: any,
+  dropZoneStyles: string,
   /** display plus icon in the center of the dropzone? */
   usePlusIcon: bool,
 };

+ 1 - 0
client/src/components/Meals/CategoryIcons.jsx

@@ -38,6 +38,7 @@ function sortFunction(a, b) { // icons will get sorted in the order they appear
   return solidIconNames.indexOf(a.iconName) < solidIconNames.indexOf(b.iconName) ? -1 : 1;
 }
 
+/** contains all fontawesome icons in the order specified above to be used by other components */
 const categoryIcons = Object.values(SolidIcons)
                             .filter(i => solidIconNames.includes(i.iconName))
                             .sort(sortFunction);

+ 0 - 10
client/src/components/Meals/EditMeal.jsx

@@ -34,16 +34,6 @@ const useStyles = makeStyles((theme) => ({
   actionButtonWrapper: {
     margin: '1.5em 0 0',
   },
-  snackbarOffset: {
-    bottom: parseInt(process.env.REACT_APP_NAV_BOTTOM_HEIGHT) + 10 + 'px',
-  },
-  deleteSnackbar: {
-    backgroundColor: theme.palette.error.light,
-    width: '100%',
-  },
-  readdSnackbar: {
-    backgroundColor: theme.palette.primary.light,
-  },
 }));
 
 const inverseColors = true;

+ 2 - 2
client/src/components/Meals/EditMealCore.jsx

@@ -8,8 +8,8 @@ import SelectMealCategory from "./SelectMealCategory";
 import SelectMealTags from "./SelectMealTags";
 import OutlinedTextField from "../util/OutlinedTextField";
 
-/** component is used by AddMeal and EditMeal and provides their shared core elements: text and photo input.
- *  Does not handle communication to server */
+/** component is used by AddMeal and EditMeal and provides their shared core elements: text and photo input as well as choosing a category and adding tags.
+ *  Does not handle communication to server. */
 const EditMealCore = (props) => {
   const { t } = useTranslation();
 

+ 4 - 7
client/src/components/Meals/MealAvatar.jsx

@@ -22,20 +22,17 @@ export const getMainImage = (meal) => {
   return mainImage || meal.images[0];
 }
 
-/**
- * A Meal's Avatar: meal's main image or the general meal icon (if no image provided) in MUI Avatar format
- */
+/** A Meal's Avatar: meal's main image or the general meal icon (if no image provided) in MUI Avatar format */
 const MealAvatar = (props) => {
   const classes = useStyles();
   const { meal } = props;
-  let avatar;
+
   if (meal.images.length > 0) {
     const image = getMainImage(meal);
-    avatar = <Avatar alt={image.name} src={image.url} />;
+    return <Avatar alt={image.name} src={image.url} />;
   } else {
-    avatar = (<Avatar className={classes.backgroundColor}><FontAwesomeIcon icon={faUtensils} /></Avatar>);
+     return <Avatar className={classes.backgroundColor}><FontAwesomeIcon icon={faUtensils} /></Avatar>;
   }
-  return avatar;
 }
 
 MealAvatar.propTypes = {

+ 2 - 1
client/src/components/Meals/MealDetailViewExtern.jsx

@@ -4,7 +4,8 @@ import { useAuth0 } from "@auth0/auth0-react";
 import MealDetailView from "./MealDetailView";
 import { fetchAndUpdateMeal } from "./meals.util";
 
-/** Dialog page that displays Meal Details and optionally opens Edit Dialog */
+/** Wrapper for MealDetailView that determines whether the viewed meal belongs to the logged in user.
+ * Also shows Meal without import function to users that are not logged in. */
 const MealDetailViewExtern = (props) => {
   const { user } = useAuth0();
   const history = useHistory();

+ 1 - 1
client/src/components/Meals/MealImportButton.jsx

@@ -42,7 +42,7 @@ const useStyles = makeStyles(theme => ({
   },
 }));
 
-/** Page that displays a user's own meals and adds a Navbar to the Meals list that allows adding a meal */
+/** This Button allows importing a meal frrom another user into one's own meals. It contains all the importing functionality. */
 const MealImportButton = (props) => {
   const { t } = useTranslation();
   const { user } = useAuth0();

+ 3 - 0
client/src/components/Meals/MealWrapper.jsx

@@ -4,6 +4,9 @@ import OwnMeals from "./OwnMeals";
 import MealDetailViewExtern from "./MealDetailViewExtern";
 import { useAuth0 } from "@auth0/auth0-react";
 
+/** Wrapper component for Meals. Makes sure that Meals component receives the complete routing path to render the correct view.
+ *
+ * Might become obsolete in a future version if routing is properly handled by Meals */
 const MealWrapper = () => {
 
   let { path } = useRouteMatch();

+ 5 - 2
client/src/components/Meals/Meals.jsx

@@ -38,7 +38,10 @@ const useStyles = makeStyles(theme => ({
   }
 }));
 
-/** content of page that displays all meals of a given user and opens their details views on click (not including Navbar) */
+/** Content of page that displays all meals of a given use and opens their detail views on click.
+ * If meals belong to logged in user, editing will be allowed.
+ *
+ * todo: needs to be reworked to respect proper routing and not rely on MUI dialogs */
 const Meals = (props) => {
   const classes = useStyles();
   const { t } = useTranslation();
@@ -250,7 +253,7 @@ const Meals = (props) => {
 
 Meals.propTypes = {
   /** userId of user whose meals are to be displayed */
-  userId: string,
+  userId: string.isRequired,
   /** are these the user's own meals or is another user watching foreign meals? In the latter case editing will be prohibited. */
   own: bool.isRequired,
 }

+ 1 - 6
client/src/components/Meals/SelectMealCategory.jsx

@@ -38,8 +38,7 @@ const useStyles = makeStyles((theme) => ({
   },
 }));
 
-/** component is used by AddMeal and EditMeal and provides their shared core elements: text and photo input.
- *  Does not handle communication to server */
+/** Select input that allows the user to either choose or create a meal category */
 const SelectMealCategory = (props) => {
   const classes = useStyles();
   const { user } = useAuth0();
@@ -155,10 +154,6 @@ SelectMealCategory.propTypes = {
   updateMeal: func.isRequired,
 }
 
-SelectMealCategory.defaultProps = {
-  value: undefined,
-}
-
 export default withAuthenticationRequired(SelectMealCategory, {
   onRedirecting: () => <LoadingBody />,
 });

+ 4 - 0
client/src/components/Meals/SelectMealTags.jsx

@@ -9,6 +9,8 @@ import { LoadingBody } from "../Loading";
 import { getSettingsOfUser, updateUserSettingsForCategory } from "../Settings/settings.util";
 import { reactSelectTheme } from "./meals.util";
 
+/** Select input that lets the user choose meal tags.
+ * If allowCreate is true, user can also create new tags. */
 const SelectMealTags = (props) => {
   const { t } = useTranslation();
   const muiTheme = useTheme();
@@ -88,7 +90,9 @@ SelectMealTags.propTypes = {
   allowCreate: bool,
   /** optional custom placeholder text */
   placeholderText: string,
+  /** optional className for styling */
   className: string,
+  /** style object to allow overwriting styles of the select control component */
   customControlStyles: object,
 }
 

+ 1 - 12
client/src/components/Plans/EditPlanItem.jsx

@@ -19,9 +19,6 @@ const useStyles = makeStyles((theme) => ({
     backgroundColor: theme.palette.background.default,
     height: `calc(100% - ${process.env.REACT_APP_NAV_BOTTOM_HEIGHT}px)`,
   },
-  submitButton: {
-    margin: '1.5em 0 0',
-  },
   cancelButton: {
     textAlign: 'center',
     flexGrow: 4,
@@ -36,20 +33,12 @@ const useStyles = makeStyles((theme) => ({
   actionButtonWrapper: {
     margin: '1.5em 0 0',
   },
-  snackbarOffset: {
-    bottom: parseInt(process.env.REACT_APP_NAV_BOTTOM_HEIGHT) + 10 + 'px',
-  },
-  deleteSnackbar: {
-    backgroundColor: theme.palette.error.light,
-  },
-  readdSnackbar: {
-    backgroundColor: theme.palette.primary.light,
-  },
 }));
 
 const inverseColors = true;
 const serverURL = process.env.REACT_APP_SERVER_URL;
 
+/** page that allows editing a plan */
 const EditPlanItem = (props) => {
   const classes = useStyles();
   const { t } = useTranslation();

+ 3 - 2
client/src/components/Plans/EditPlanItemCore.jsx

@@ -85,8 +85,9 @@ const useStyles = makeStyles((theme) => ({
   }
 }));
 
-/** component is used by AddPlanItem and EditPlanItem and provides their shared input elements
- *  Does not handle communication to server */
+/** component is used by AddPlanItem and EditPlanItem and provides their shared input elements.
+ *
+ *  Does not handle communication to server. */
 const EditPlanItemCore = (props) => {
   const classes = useStyles();
   const { t } = useTranslation();

+ 1 - 1
client/src/components/Plans/MissingIngredients.jsx

@@ -17,7 +17,7 @@ const useStyles = makeStyles({
   }
 });
 
-/** Dialog that displays a plans missing ingredients and allows to check or uncheck them */
+/** Dialog that displays a plan's missing ingredients and allows to check or uncheck them */
 const MissingIngredients = (props) => {
   const classes = useStyles();
   const { t } = useTranslation();

+ 1 - 1
client/src/components/Plans/OwnPlans.jsx

@@ -3,7 +3,7 @@ import { useAuth0 } from "@auth0/auth0-react";
 import Plans from "./Plans";
 import { withLoginRequired } from "../util";
 
-/** Page that displays a user's own plans */
+/** Page that displays a user's own plans. (A simple wrapper that sets the props for the Plans component) */
 const OwnPlans = () => {
   const { user } = useAuth0();
 

+ 3 - 1
client/src/components/Plans/Plans.jsx

@@ -52,7 +52,9 @@ const useStyles = makeStyles((theme) => ({
   },
 }));
 
-/** content of page that displays all plans of a given user (not including Navbar) */
+/** Component displays all Plans of any given user. Also handles routing to show
+ * * Shopping List
+ * * Edit Plan item */
 const Plans = (props) => {
   const classes = useStyles();
   let history = useHistory();

+ 2 - 0
client/src/components/Settings/EditMealCategories.jsx

@@ -58,6 +58,7 @@ const useStyles = makeStyles(theme => ({
   }
 }));
 
+/** Dialog that lets the user choose an icon for a meal category */
 export const ChooseIconDialog = (props) => {
   const classes = useStyles();
   const { t } = useTranslation();
@@ -99,6 +100,7 @@ export function updateMealCategories(userId, categoriesToAdd, onUpdateCategories
   });
 }
 
+/** Chip Input Component that displays all meal categories and lets the user delete them or change their icon, also allows creating new categories */
 const EditMealCategories = (props) => {
   const classes = useStyles();
   const { onUpdateSettings, onUpdateCategories } = props;

+ 1 - 0
client/src/components/Settings/EditMealTags.jsx

@@ -21,6 +21,7 @@ const useStyles = makeStyles(theme => ({
   },
 }));
 
+/** Chip Input Component that displays all meal tags and lets the user add or delete meal tags */
 const EditMealTags = (props) => {
   const classes = useStyles();
   const { onUpdateSettings, onUpdateTags } = props;

+ 5 - 1
client/src/components/Settings/Settings.jsx

@@ -49,7 +49,11 @@ const useStyles = makeStyles(theme => ({
  * page that displays user profile (and allows editing user profile) and underneath allows changing remaining settings
  * + settings that can be changed:
  *    + language
- *    + use dark mode? */
+ *    + use dark mode?
+ *    + which page to display initially when opening a contact's page
+ *    + manage meal categories
+ *    + manage meal tags
+ **/
 const Settings = (props) => {
   const classes = useStyles();
   const { t, i18n } = useTranslation();

+ 3 - 2
client/src/components/Social/Social.jsx

@@ -23,8 +23,9 @@ const useStyles = makeStyles({
 });
 
 /**
- * displays a list of current user's contacts and allows searching for all users through Button in Navbar
- * on clicking on a contact's name will open ContactContent */
+ * Main contacts page. Displays a list of current user's contacts and allows searching for all users through Button in Navbar.
+ *
+ * On clicking on a contact's name will open ContactContent */
 const Social = () => {
   const classes = useStyles();
   const { user } = useAuth0();

+ 2 - 0
client/src/components/util/FullScreenDialog.jsx

@@ -8,6 +8,8 @@ const useStyles = makeStyles(theme => ({
     backgroundColor: theme.palette.background.default,
   }
 }));
+
+/** MUI Dialog component that slides a full page in from the right */
 const FullScreenDialog = (props) => {
   const classes = useStyles();
 

+ 3 - 3
client/styleguide.config.js

@@ -1,12 +1,11 @@
 const path = require('path');
 
 module.exports = {
-  // components: './src/components/*.jsx',
-  title: 'Emealay Documentation',
+  title: 'Emealay - Documentation of Client Components',
   pagePerSection: true,
   exampleMode: 'hide', // 'hide' | 'collapse' | 'expand'
   usageMode: 'expand', // 'hide' | 'collapse' | 'expand'
-  ignore: ['**/*.util.{jsx,js}', '**/use*.{jsx,js}'], // Styleguidist can only document components, not pure functions or Hooks. That is why these must be ignored.
+  ignore: ['**/*.util.{jsx,js}', '**/use*.{jsx,js}', './src/components/Meals/CategoryIcons.jsx'], // Styleguidist can only document components, not pure functions or Hooks. That is why these must be ignored.
   styleguideDir: './docs',
   sections: [
     {
@@ -37,6 +36,7 @@ module.exports = {
     },
     {
       name: 'Util Components',
+      description: 'Helper components to be used in different parts of the app',
       components: ['./src/components/util/*.jsx'],
     },
   ],

Some files were not shown because too many files changed in this diff