Open VoxelMC opened 8 months ago
This is a very good proposal. I especially love the idea of using the index property to identify when multiple options are available.
Next step would be how the pieces of defining each of these levels would look like.
This is a very good proposal. I especially love the idea of using the index property to identify when multiple options are available.
Next step would be how the pieces of defining each of these levels would look like.
Do you mean in the front-end?
Yes. It is important we build a UI that makes inserting all the data above in a simple and straightforward manner. Would like to start workshopping designs with you soon.
Yes. It is important we build a UI that makes inserting all the data above in a simple and straightforward manner. Would like to start workshopping designs with you soon.
Sounds good to me! As before, I was thinking a sort-of-Jupyter-Notebooks look and feel, where it is more like adding "cells" together?
Proposal
Introduction
This proposal outlines a method by which data for recipe instructions can be encoded within a database. It will utilize a stringified JSON object, which can be deserialized on the Astro server-side or the Tauri backend (preferred, translated into markdown and served via request on client-render(?)).
The
Instructions
InterfaceThis interface describes the general first level of a recipe
Instructions
object. This object describes the basic information, such as the name, author, date of writing, etc. It will also contain a property for variations and recipe-building instructions.The
Instructions.sections
Entry Array &RecipeSection
InterfaceThis interface describes each section of a recipe, whether there is just one big section or a bunch of small ones. Each object encodes the name of the section, the ingredients and quantities, an
index
, and the itemized steps.The
index
property is used to test for collisions, leading to two options: one variation or multiple variations at the same index. For example, when making Вареники, since only one dough type is used, and it is first in the order, it hasindex: 1
. However, since different fillings exist, such as cherries or cottage cheese, they can all be placed atindex: 2
. The collision can be detected by mapping each index to an array and testing the length. Iflength > 1
, then the user needs to choose between the items in the array.Amendments may be made later, but let me know what you think!