Shiny interactions
Running the two button example on the README works great! Very cool / clean to see how it works with custom tags and how you leverage the Lit classes.
I worry that the feature of allowing for two elements of the same name being able to send values back to shiny is more of a bug than a feature. For example: Using bookmarks. Let's say the bookmark data has btn=4...
- Which
btnwill restore the value? How will it restore the value? - What if the other
btnhad a value of7while the first button had a value of4? - Will all other
btnvalues be set back to 0?
This idea extends to {shinytest}. {shinytest} will not be able to set any input values via an InputBinding. Currently, testing on a {litter} component will only be able to set an input with the allowInputNoBinding = TRUE flag set. Ex:
app$setInputs(btn = 4, allowInputNoBinding_ = TRUE)
I agree with @etiennebacher on the name association. My first thought was not a puppy litter. Maybe {litr}? It would be pronounced the same and tie closer to Lit?
Hi Barret,
Thanks for the feedback!
I had not considered things like the bookmarks, it'd probably break this along with many other things. Stupid question, how does shiny pick up which inputs to include in the bookmark and elsewhere? Would it pick up on these?
Perhaps it should be cleaner, and use something else than Shiny's input system? I'm not sure how to approach this issue, I think there is potential for something.
I've added you to a repository if you want to take a look at the issue I explain to Etienne. I'm not sure how I'd go about this in pure shiny in a sensible manner. Perhaps I'm also doing it wrong in JavaScript, any input is welcome.
Thanks again!