Skip to content

Recipe Data Management Improvements #83

@ascibisz

Description

@ascibisz

There are a few issues right now related to how we're handling recipe related data that we fetch from firebase

  1. For editable fields, we have the default values for each field saved in the editable_fields collection. This is redundant, as it should match whatever is in that field for the recipe when loaded. If these values were to get out of sync, that would be a bug. To reduce that potential for bugs, we should read the values for each editable field that are in the recipe and populate that as the default (or just current) values
  2. We currently have a getCurrentValue hook in PackingInput, which is a work around to make sure we have the correct current value for gradient strengths when switching between gradients. This is kinda an anti-pattern, and it would be better to handle this differently. Perhaps by just storing the current value for each gradient, rather than just the default value? These changes could also be related to issue 1 above
  3. We are currently loading each recipe from firebase every time a recipe is selected from the dropdown. We should probably just load them all on page load, and then store them locally. Along side this, we can decide whether or not it makes sense for changes that the user makes to persist between different recipe selections

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions