-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improve validation of Plot Wizard Y metrics quick pick #4827
Conversation
return { | ||
fields: { x, y }, | ||
firstXKey: (xValues as QuickPickFieldValues)[0].field, | ||
firstYKey: (yValues as QuickPickFieldValues)[0].field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed this earlier, we were using key instead of field.
{ | ||
title: `Select ${xFieldsLength} Metrics for Y` as Title | ||
}, | ||
xFieldsLength |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const y = | ||
xValuesLength > 1 | ||
? await pickYFieldsWithMultiXFields(yItems, xValuesLength) | ||
: await pickYFields(yItems) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change, y fields are picked and validated differently depending on if there are multiple x values.
Code Climate has analyzed commit 5c43e0d and detected 1 issue on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 95.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 95.0% (0.0% change). View more on Code Climate. |
Demo
Screen.Recording.2023-10-13.at.10.54.23.AM.mov
Followup to #4789 comment