Open ryneches opened 10 years ago
Right now, editing names in the Phinch Name column is only geared towards manually typing in the names of a samples or two. The best way to pull in all your samples names is to include a column with a header name of phinchID in your tab-delimited sample mapping file (the one you use in QIIME and then embed into your .biom file using the biom add-metadata command). Note that phinchID names should be < 15 characters so that they are fully visible in the graph axes.
If users are able to type names of a sample or two, the application needs to be able to behave correctly if the user cuts and pastes that text. Many browsers will try to preserve formatting information, which is then not handled correctly by other parts of Phinch. Some basic input validation on the sample name input field would avoid this problem.
Phinch already uses jQuery, so this is a one-liner :
jQuery(html).text();
Otherwise, I strongly recommend that sample name editing should be disabled if input validation is not a development priority. A half-working feature, especially when there is a better alternative, is worse than no feature.
Ok thanks for the clarification Russell, I'll reopen this issue and mark it as a future development priority. Or feel free to fork the repo and add in that one-liner yourself; we can review and merge.
Cutting and pasting names for samples in the Phinch Name column in the Filter Data page can result in unusable names.
I recommend stripping HTML elements and checking for valid Unicode.