batch connect selection defaults
From discourse - https://discourse.openondemand.org/t/batch-connect-form-field-defaults/3209
Basically this feature is to provide a mechanism so folks can
- reset the form to defaults (disregarding what has been cached)
- provide a checkbox that reads something like
remember my selectionsthat can disable caching altogether. - display the default values inside the field when the field is blank
One technical issue I see with this is providing defaults. Defaults are provided when the form is rendered on the server side, not the client side. So somehow the HTML has to retain what the default should be for the user to reset it back to. I.e., the form is rendered with the last cached setting, so how does the client know what the default was because the current value is from the cache?
I should also note that this ticket may be split up as it's a few different things.
As mentioned in the linked documentation PR, my homebrew solution is to display default values as placeholder text, which is only shown when the field is blank, and then use those default values in submit.yml.erb when a field is blank.
I think the simplest solution is to remove default values altogether in favor of a "recommended value", which can be added to the help blurb or placeholder text.
how does the client know what the default was because the current value is from the cache?
HTML data attribute?
Thinking about this again, I'm wondering what the actual user value is here. From what I've seen/observed at our center is, is that generally folks use the same exact parameters day in and day out. Meaning they never really switch to other settings and never want to go back to defaults.
reset the form to defaults (disregarding what has been cached)
However, there could be a use case for this as the user has gotten so turned around with this setting and that that starting over with the defaults is the only way to get back to a good state.
That said - the other suggestions I wonder whether they'd actually be used in the wild or not and tend to think they wouldn't.
Notes from review: Explained the issue is about providing mechanisms to reset forms to defaults and remember user selections Raised questions about user customization in OnDemand Questioned whether users would actually use these features since most users repeat the same workflow