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

fix(ui): Update numeric Input components to pass NaN where appropriat… #15797

Merged
merged 1 commit into from
Nov 8, 2019

Conversation

TCL735
Copy link
Contributor

@TCL735 TCL735 commented Nov 7, 2019

Closes #15024

Updates numeric Inputs to deliberately pass NaN when user input is completely deleted, as clockface will handle this appropriately, see influxdata/clockface#373

Fixes edge cases with bin sizes in Heat Maps and decimal places in Single Stat.

@TCL735 TCL735 force-pushed the fix_15024_delete_numeric_input branch 2 times, most recently from 2139610 to b3f0dae Compare November 7, 2019 19:47
@TCL735 TCL735 requested a review from a team November 7, 2019 19:58
@ghost ghost requested review from asalem1 and hoorayimhelping and removed request for a team November 7, 2019 19:58
Copy link
Contributor

@asalem1 asalem1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks great! I think it could be effective to write up a cypress e2e test to see if the app functions as expected as well.

ui/src/shared/utils/convertUserInput.test.ts Show resolved Hide resolved
@TCL735
Copy link
Contributor Author

TCL735 commented Nov 7, 2019

The PR looks great! I think it could be effective to write up a cypress e2e test to see if the app functions as expected as well.

Good idea. I will attempt to write an e2e for this and will update status here.

Edit: e2e tests will not be possible until a new version of clockface is released. We need version 1.0.5. Similarly, this PR should not be merged for the same reason, as without [email protected] there will be console errors.

Edit 2: e2e tests are pushed now.

@TCL735 TCL735 force-pushed the fix_15024_delete_numeric_input branch from b3f0dae to b9e528c Compare November 7, 2019 20:49
Copy link
Contributor

@hoorayimhelping hoorayimhelping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work! love the additional attention to detail with the decimal places bit!

have a couple of questions around tests, depending on how you answer we can approve or wait for an update :)

@TCL735 TCL735 force-pushed the fix_15024_delete_numeric_input branch from b9e528c to 6031a8a Compare November 8, 2019 01:54
Copy link
Contributor

@hoorayimhelping hoorayimhelping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those tests, nice work!!

})
})
})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

})
})
})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@TCL735 TCL735 merged commit 64ca5f9 into master Nov 8, 2019
@TCL735 TCL735 deleted the fix_15024_delete_numeric_input branch November 8, 2019 18:05
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

Successfully merging this pull request may close these issues.

Allow the user to delete all characters from numeric input
3 participants