Skip to content

Cleanup Recipe JSON Objects Sent to Server #177

@ascibisz

Description

@ascibisz

What needs to happen?

Now that we're saving the results attached to previous packings in firebase and the server is retrieving those if a packing request is for a recipe we've already packed before, it's important to make sure we're not including anything irrelevant in the recipe file (which if changed, would make it look like a new recipe even though it isn't)

The 2 examples I found of this are as follows:

  1. If you run a packing, then change the decay length for a different gradient option, then go back to the original gradient option, this will look like a new recipe even though we only changed a decay length for a gradient we aren't using. To avoid this, we should strip out the gradients that aren't actually being used in the recipe from the JSON object we send to the server
  2. If you run a packing with the original radius, change the radius to something else, and then change back to (what appears to the user as) the original radius value, the server will still read this to be a different recipe than the original. This is because the initial radius values are not rounded to the same amount that edited values are, so it's impossible for a user input value to be the exact same as the initial value. We should fix this to round the initial values to the same amount that we round edited values.

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