Open dwsideriusNIST opened 4 years ago
This actually already exists but it's very well hidden:
For some reason, file input fields don't display the name by default, i.e. we will make sure to add it manually.
Aha, I had assumed that was an "upload CSV" button, but never tried it! We'll fix it with documentation / on-screen test
I'm working on this: https://github.com/dwsideriusNIST/isotherm-digitizer-panel/tree/feature-assoc_figure
Adding multiple file selection support has been requested upstream in panel: https://github.com/holoviz/panel/pull/1569 (it's been in bokeh since https://github.com/bokeh/bokeh/pull/9732, but the interface in panel was missing a parameter reference). This wasn't a one line fix.
My intention for this is to: 1) Improve on-screen description 2) Allow multiple file selection 3) Add a new key to the raw JSON, tentatively "associatedgraphics"; value is a list 4) Update submission module to handle multiple files
This actually already exists but it's very well hidden:
For some reason, file input fields don't display the name by default, i.e. we will make sure to add it manually.
I looked into this too, and we're looking at a pretty complicated issue. The "No file chosen" text is part of browser settings (multilanguage support). It would also be nice if "No File Chosen" would update after clicking prefill, but I haven't yet found a panel or bokeh feature that refreshes the text (or similar), if it even exists.
Allow multiple file selection
Update submission module to handle multiple files
Do you think this is necessary? Isn't one file upload (=the one for the figure graphic) enough? I would say we don't really need a separate file upload for CSV - people can just copy-paste the data into the text field.
- Add a new key to the raw JSON, tentatively "associatedgraphics"; value is a list
Right; it would be good to record the presence of a figure snapshot in the raw JSON
I looked into this too, and we're looking at a pretty complicated issue. The "No file chosen" text is part of browser settings (multilanguage support). It would also be nice if "No File Chosen" would update after clicking prefill, but I haven't yet found a panel or bokeh feature that refreshes the text (or similar), if it even exists.
For labelling the file upload, we can simply add a static html text.
As for "no file chosen" not being updated by the prefill - it's not ideal but also not a big deal I would say...
- Allow multiple file selection
Let's hold off on this while it gets picked up by the holoviz/panel crew (https://github.com/holoviz/panel/issues/975)
- Update submission module to handle multiple files
Do you think this is necessary? Isn't one file upload (=the one for the figure graphic) enough? I would say we don't really need a separate file upload for CSV - people can just copy-paste the data into the text field.
This gets back to the complexity of multicomponent isotherms. Sometimes one "isotherm" (thinking of it holistically, where the "isotherm" is all of the measurements associated with an single equilibrium state) is presented in a series of figures; like one plot for each species. But I agree, no need for separate file upload for CSV as pasting covers that use case.
- Add a new key to the raw JSON, tentatively "associatedgraphics"; value is a list
Right; it would be good to record the presence of a figure snapshot in the raw JSON
When I have a PR in proper form, this will be covered.
I looked into this too, and we're looking at a pretty complicated issue. The "No file chosen" text is part of browser settings (multilanguage support). It would also be nice if "No File Chosen" would update after clicking prefill, but I haven't yet found a panel or bokeh feature that refreshes the text (or similar), if it even exists.
For labelling the file upload, we can simply add a static html text.
After my PR, I'll let you make a suggestion on this. I'm not sure what you have in mind specifically. As for "no file chosen" not being updated by the prefill - it's not ideal but also not a big deal I would say...
Agree.
A few application issues/needs that became apparent during some personal use and development in a feature branch:
updating 'associated_content' key during submission step is in #43
One of the plans for the digitizer was to provide a way to associate a source graphic(s) with the digitized isotherm. Rudiments of this are in the app, as the pre-fill associates a figure with the demo JSON file.
Proposal: On the form tabs, include a place to upload graphic files, which become part of the submission ZIP file. There should be a metadata association in the JSON file, like:
"content_graphics": ["file1.jpg", "file2.jpg", "file3.jpg"]
The name of the key is flexible, as it need not be a canonical key for the isotherm standard / API.