I have a number of forms that have immutable data that I would like to present to the user, but the only way I can do so with digestive-functors-heist (without binding additional splices into the template myself) is with some sort of text input element (dfInputText, dfInputTextArea, etc.). This ends up making a rather unattractive form and requires disabling the input element to reinforce the fact that it is immutable.
My first attempt at working around this was to create a copy of digestiveSplices that calls the original function in addition to my custom splice. This worked fine for the top level form, but it doesn't propagate down into sub views (dfSubView) or lists (dfInputList) because those splices still call the original digestiveSplices and bindDigestiveSplices functions. I ended up hacking the digestiveSplices function to add my custom splice for rendering the plain text contents. This seemed fine at first, but now I find myself wanting more custom splices... and going back and hacking the base library each time I need something new is less than desirable.
I would like to propose creating alternate versions of the digestiveSplices and bindDigestiveSplices functions that accepts a (View Text -> Splices (Splice m)) as its first argument.
I have a number of forms that have immutable data that I would like to present to the user, but the only way I can do so with digestive-functors-heist (without binding additional splices into the template myself) is with some sort of text input element (dfInputText, dfInputTextArea, etc.). This ends up making a rather unattractive form and requires disabling the input element to reinforce the fact that it is immutable.
My first attempt at working around this was to create a copy of
digestiveSplices
that calls the original function in addition to my custom splice. This worked fine for the top level form, but it doesn't propagate down into sub views (dfSubView
) or lists (dfInputList
) because those splices still call the originaldigestiveSplices
andbindDigestiveSplices
functions. I ended up hacking thedigestiveSplices
function to add my custom splice for rendering the plain text contents. This seemed fine at first, but now I find myself wanting more custom splices... and going back and hacking the base library each time I need something new is less than desirable.I would like to propose creating alternate versions of the
digestiveSplices
andbindDigestiveSplices
functions that accepts a(View Text -> Splices (Splice m))
as its first argument.I've done a quick modification of the Interpreted splices: https://gist.github.com/cimmanon/f40e706dcf2d3370c09380edded9ddce