-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major overhaul (RecipeView
update, sections support, recipes list view, ...)
#2115
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2115 +/- ##
=======================================
Coverage 80.07% 80.07%
=======================================
Files 92 92
Lines 2650 2650
=======================================
Hits 2122 2122
Misses 528 528
Flags with carried forward coverage won't be shown. Click here to find out more. |
Test Results 12 files 572 suites 1m 31s ⏱️ Results for commit 54de35b. ♻️ This comment has been updated with latest results. |
4a16282
to
3005528
Compare
…nd `title-rename.js` to typescript Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…ema.org objects Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…string/string[] Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…ject. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…ect. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…oTool` object. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…ToDirection` object. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…nd `QuantitativeValue`. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…Tool`. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…wToSection`. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…imple strings for `tool`, `recipeInstructions`, and `supply` properties Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…uctions`, and `supply` properties to `fromJSON` method of `Recipe`. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…ud/axios usage. Fix wrong import order in `HowToTool` Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…uter . Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…issing route names. Fix 'All recipes' view. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…s without requiring page reload. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
RecipeView
update, sections support, recipes list view, ...)
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…ounts of `HowToSupply`s Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…d add tests Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…up. Closes #2114 Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…and list Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…d from list. Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Signed-off-by: Sebastian Fey <info@sebastianfey.de>
…ries to recipe filters Signed-off-by: Sebastian Fey <info@sebastianfey.de>
Topic and Scope
A lot of the UI is touched, with a focus on the
RecipeView
.This PRs goal is manifold:
schema.org
entities should provide a cleaner way of dealing with recipe datasupply
, which would allow structuring ingredients<router-view>
s the need for a different structure of the URLSome minor changes/fixes that popped up during development include additional helper functions, file restructuring, improving the Jest config and reworking the
RecipeView
:Related: #382 #428 #311 #135 #1875 #1244
Closes #1855 closes #2114
Currently supported in
RecipeView
HowToSection
sHowToSection
's titleHowToSection
's descriptionHowToSection
's sub-stepsHowToTip
s inHowToSection
HowToSection
s,HowToStep
s and stringsHowToSection
s (At some point this might even be confusing for the user) Note: In a meeting w/ the NC design team, we decided not to support nested sections (for now).HowToDirection
s in aHowToSection
HowToDirection
s in aHowToSection
HowToTip
s inHowToStep
HowToTool
objects inRecipe
HowToSupply
objects inRecipe
NutritionInformation
objects inRecipe
Concerns/issues
Currently the UI does not support
We need to consider how to handle recipes where both
supply
andrecipeIngredient
are defined.Supported properties are checked for their correctness, but additional properties, e.g., those allowed by the
schema.org
standard that are not supported in our app are currently ignored.Recipes List
Restructured paths
With the introduction of the list view which required additional
<router-view>
s the need for a different structure of the URLs appeared that allows defining the selected (filtered) list of recipes as well as a selected recipe. Currently the routes look like:category/:value
tags/:value
search/:value
for filtering/searching the available recipes. These paths can remain the same. However if additional filters are applied, they are added as query parameters.
category/:value?q=tag%3A%2522spicy%2522
(?q=tag:"spicy"
)When viewing a recipe the user was directed to
recipe/:id
This would loose the information that the recipe was, e.g., selected from a list of recipes within a specific category, maybe filtered down by certain parameters. This PR introduces new paths in the form of
category/:value/:id?q=tag%3A%2522spicy%2522
(?q=tag:"spicy"
)`where
id
is the recipe identifier. Navigating to the URL will show the same view as before when the list view is selected: A filtered list with the recipe open next to it. For editing the recipe the pathcategory/:value/:id/edit?q=tag%3A%2522spicy%2522
is introduced.
Try out locally
Although the backend does not support the current structure it is possible to test this locally. You may start with copying the JSON code to a
recipe.json
file in a new subdirectory of theRecipes/
folder. If you wish you can download some image and add it asfull.jpg
to the same folder.Then you need to make two tweaks to the PHP code. In
FixInstructionsFilter.php
early return the apply functionand in
FixToolsFilter.php
in theapply
function remove the else block and early returnPreview
Current state of the
RecipeView
. The following JSON produces below imageRecipe JSON
RecipeView
:Details sidebar opened:
Recipe sections
Clicking an image opens a modal with a slideshow of the full images:
Wide screen
The width of the recipe content is limited to maintain readability
Narrow screen
List view
Filtering:
Filter modal opened:
Filter selected (URL gets updated to
${HOST}/index.php/apps/cookbook/#/category/Dinner/412?q=tag%3A%2522spicy%2522
):Formal requirements
There are some formal requirements that should be satisfied. Please mark those by checking the corresponding box.