decomp.me icon indicating copy to clipboard operation
decomp.me copied to clipboard

Give presets contexts

Open ethteck opened this issue 7 months ago • 1 comments

Adding a context field to presets will allow for a default context if one isn't provided (indicated by the UI once the preset is selected if there's a context in the preset)

First step is to simply add the field

  • [ ] Add field to model
  • [ ] Backend code to put the model's preset field into the scratch upon creation
  • [ ] Add field to preset api endpoint response that indicates whether a context is present
  • [ ] UI on /new to tell the user the context will be auto-populated if they don't put anything into the box (uses aforementioned new field)

UI for adding/editing presets on the site will come later, and this will just be one of the editable fields there

ethteck avatar May 04 '25 15:05 ethteck

Currently we have Scratch.context, so the Preset.context would get copied into Scratch.context upon creation (or loaded into the UI and then submitted as part of the new Scratch) - we are not attempting to reduce duplicattion of contexts at this stage - simply make life easier for folks creating new scratches.

mkst avatar May 05 '25 16:05 mkst