eui icon indicating copy to clipboard operation
eui copied to clipboard

[EuiDualRange] + [EuiRangeInput] types are too permissive and don't match

Open myasonik opened this issue 5 years ago • 8 comments
trafficstars

Summary

Change all occurrences of number | string types to only allow number

Why?

It's confusing accepting both. I realize this was probably done to pave over whatever craziness the DOM might return, but I think pushing a parseInt into consuming apps is worth the type checking cleanliness.

Especially when it's inconsistent with EuiRangeInputProps which only accepts number for min and max which means to validate that your value falls in between your min and your max you have to jump through a bunch of hoops with types.

myasonik avatar May 07 '20 19:05 myasonik

@thompsongl Looks like you wrote this component, what do you think?

myasonik avatar May 07 '20 19:05 myasonik

Looks like you wrote this component, what do you think?

Definitely worth taking another look.

These were originally loosely prop-typed JS components, and when I converted them to TS I tried to avoid breaking changes.

thompsongl avatar May 07 '20 20:05 thompsongl

@thompsongl So what all changes would you like me to make?

shrey avatar Jun 24 '20 23:06 shrey

"Change all occurrences of number | string types to only allow number" in EuiDualRange and EuiRangeInput

This is 1) a breaking change and 2) will require simplifying all the related places we do string to number conversions.

thompsongl avatar Jun 25 '20 20:06 thompsongl

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

github-actions[bot] avatar Mar 20 '21 00:03 github-actions[bot]

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

github-actions[bot] avatar Sep 18 '21 16:09 github-actions[bot]

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

github-actions[bot] avatar Mar 19 '22 16:03 github-actions[bot]

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

github-actions[bot] avatar Sep 17 '22 16:09 github-actions[bot]

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

github-actions[bot] avatar Mar 18 '23 16:03 github-actions[bot]

❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

github-actions[bot] avatar Mar 25 '23 16:03 github-actions[bot]