Open daattali opened 5 years ago
To clarify: I know I could exclude specific inputs in the server, but I would like to be able to exclude inputs directly from the javascript, so that the end user who builds a shiny app doesn't need to know about it
I believe this would be useful to remove a lot of the plotly inputs that get saved and are not useful
If it's too difficult to introduce a feature that allows inputs set from JavaScript to be excluded from bookmarking, perhaps a middle ground here can be to automatically exclude any input with a name that starts with __
or something similar.
When using URL bookmarking, any input that gets set in custom javascript using
Shiny.onInputChange()
gets added to the URL. That can be useful behaviour, but sometimes it's annoying - especially when there are any htmlwdigets on the page that sends big data to Shiny using inputs. In cases where we use an input more as an event signal rather than an actual input value is where this becomes not useful.This causes the URL to be extremely long and in some cases long enough to be rendered useless because it can be 1000s of characters long.
This was originally reported as https://github.com/ropensci/plotly/issues/1447 but I later realized it happens with any htmlwidget.
It would be great to be able to somehow specify from Shiny.setInputValue that a specific value should not be bookmarked.
Example:
The bookmarkable URL is
http://127.0.0.1:4155/?_inputs_&foo=%22bar%22
.Example with plotly (similar can be done with any htmlwidget):
Resulting URL: