It would be nice if multi-template examples could be run easily. Maybe a convention such that 'special' lines like >>name.dust followed by the body of that template would let you put multiple templates in one sample. This would make testing partials easy.
@rragan I am thinking out loud but we could add a button that opens a popup to add the partials, what do you think?
My own little html-based sandbox finds template elements and compiles them with the specified name. This lets me add as many partials as I want quckly and easily.
Popup would be fine. Would it add just one partial per invocation? How long would they persist? Maybe a dropdown with "Add new partial" and a list of existing ones? Selecting one exposes it for editing or creation. It would need a way to name it and to provide the body.
I was thinking something like this:
what do u think?
Well the body will be defined in the textarea and we should add an input for the name. Maybe we should add a button to save the partial in the cache too.
Maybe add a button to the right of the dropdown for new partial name. Populate the field when a dropdown is chosen for an existing partial (and populate the body too) and add a Save button to handle creating a new one and updating an old one. That ought to take care of it.
What would the persistence of these be? If I leave the page and come back will they still be there? Maybe just save them in browser local storage which will give user-level persistence from visit to visit and not be overly complex.
@jairodemorais what is the status of this ticket?
@vybs maybe we could use our internal tool ui for github too, I mean the seahorse ui.
please talk to @iamleppert about this, if you are interested in porting the seahorse UI here. Lets make it a priority if you are willing to take it on.
Not critical. See if someone cares enough to send us a PR.