homebrewery icon indicating copy to clipboard operation
homebrewery copied to clipboard

Editor widgets for snippets

Open jeddai opened this issue 1 year ago • 19 comments

Description

This is a move of #2880. Because of how complicated this is, we've moved the branch into the repo. Branches can be made off this branch, and pull requests can be opened targeting this branch.

Code explainer video: https://youtu.be/pd42hBXhXa0

From #2880:

This will fix #1870! Here's my previous PR for the same thing, this one is just branched off main more recently and uses CodeMirror's CSS spec for style value autocomplete.

This PR can be previewed at https://homebrewery-pr-2905.herokuapp.com/.

Commits:

  • add the concept of widgets and widget fields

TODO:

  • [x] Move themeWidgets into explicit theme files
  • [x] Finish adding widgets for various snippets
  • [x] Set up widget select box and image preview for text+number = image snippets

https://github.com/naturalcrit/homebrewery/assets/4909307/674f61ef-c0f2-4745-a872-35b659b5eada

jeddai avatar Jul 03 '23 20:07 jeddai