inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.39k stars 792 forks source link

Template Editor #7666

Open wolflu05 opened 4 months ago

wolflu05 commented 4 months ago

This issue is a collection of improvements for the Template editor introduced with #6541:

### Ideas
- [x] add plugin interface to let plugins provide different editors/previews (to let plugins provide e.g. drag and drop editors)
- [ ] easily upload report assest via drag and drop in code editor
- [ ] add ability to edit report snippets (maybe also the ability to switch between them using tabs)
- [ ] add custom template filters api form field component to visually edit template filters
- [ ] codemirror infer available django context variables
- [x] add vertical resize drag handler
- [x] ~~add printcss preview type (https://printcss.live/)~~=> can be a plugin now
- [ ] define a custom language for django templates to be more accurate (example: https://github.com/codemirror/lang-liquid)
- [ ] ??? maybe switch to monaco ???
- [ ] allow previewing without saving the template (ref: https://github.com/inventree/InvenTree/issues/5841#issuecomment-1963014776)
- [ ] show warning if there are unsaved changes before closing the drawer
matmair commented 3 weeks ago

@wolflu05 with the changed UI customisation options of PUI - have any of the items above changed?

wolflu05 commented 3 weeks ago

Thanks for the reminder. I have updated the todo list in the initial comment.