Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label selector does not show up when uploading a unique series. #105

Closed
levaphenyl opened this issue Apr 14, 2021 · 5 comments
Closed

Label selector does not show up when uploading a unique series. #105

levaphenyl opened this issue Apr 14, 2021 · 5 comments

Comments

@levaphenyl
Copy link

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,
@daterdots
Copy link
Member

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

@daterdots
Copy link
Member

image

@levaphenyl
Copy link
Author

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 😅.

@abroekhof
Copy link

I've created a PR to fix this, see above

@daterdots
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants