trainset
trainset copied to clipboard
Label selector does not show up when uploading a unique series.
When uploading a CSV file with a unique value in the column series
, the label selector does not show. Quite embarrassing! ;)
How to reproduce
Label selector does not show (bug):
series,timestamp,value,label
series_a,2019-01-14T16:26:37.000Z,29.4375,bar
series_a,2019-01-14T16:31:37.000Z,28.5625,
series_a,2019-01-14T16:36:37.000Z,21.8125,
series_a,2019-01-14T16:41:37.000Z,19.875,
series_a,2019-01-14T16:46:37.000Z,20.625,
series_a,2019-01-14T16:51:37.000Z,19.6875,
series_a,2019-01-14T16:56:37.000Z,20.125,
series_a,2019-01-14T17:01:37.000Z,19.9375,
series_a,2019-01-14T17:06:37.000Z,20.75,
series_a,2019-01-14T17:11:37.000Z,21.0625,foo
series_a,2019-01-14T17:16:37.000Z,20.3125,
It shows up when adding the workaround last line:
series,timestamp,value,label
series_a,2019-01-14T16:26:37.000Z,29.4375,bar
series_a,2019-01-14T16:31:37.000Z,28.5625,
series_a,2019-01-14T16:36:37.000Z,21.8125,
series_a,2019-01-14T16:41:37.000Z,19.875,
series_a,2019-01-14T16:46:37.000Z,20.625,
series_a,2019-01-14T16:51:37.000Z,19.6875,
series_a,2019-01-14T16:56:37.000Z,20.125,
series_a,2019-01-14T17:01:37.000Z,19.9375,
series_a,2019-01-14T17:06:37.000Z,20.75,
series_a,2019-01-14T17:11:37.000Z,21.0625,foo
series_a,2019-01-14T17:16:37.000Z,20.3125,
workaround,2019-01-14T17:16:37.000Z,20.3125,
Nice find, @levaphenyl. @rushk014 would you be able to fix this? When using the attached CSV, the label selector tool fails to load. testset.csv
The problem is located in Labeler.vue
. When there is only one series, the seriesSelector
element is hidden: https://github.com/Geocene/trainset/blob/master/src/views/Labeler.vue#L404
This is fully correct. However, the problem is that the labelSelector
is nested inside the seriesSelector
here: https://github.com/Geocene/trainset/blob/master/src/views/Labeler.vue#L57
Consequently, when hiding the series selector, the labels selectors also gets hidden. Hence the bug!
I tried to fix this locally with the intent of opening a PR but un-nesting labelSelector
messes up the CSS layout. I am not competent here :sweat_smile:.
I've created a PR to fix this, see above
@abroekhof - we have penciled in a day this week to close out a lot of these PRs. Hopefully it's integrated and deployed by the end of the week.