cisco-sbg-ui / atomic-react

https://atomic-react.security.cisco.com
2 stars 5 forks source link

fix(AInView): include 0 and 1 as valid threshold values #1193

Closed brennarvo closed 2 years ago

brennarvo commented 2 years ago

Please check if the PR fulfills these requirements

What kind of change does this PR introduce?

Fixes an issue where the console would warn if 0 or 1 were passed to the AInView component.

What is the current behavior?

The utility to validate an intersection observer threshold is not including 0 or 1 in its valid values.

What is the new behavior (if this is a feature change)?

Update the utility function to return 0 and 1 as valid threshold values.

Does this PR introduce a breaking change?

No

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/securex/atomic-react/HTxxzHhD9NGKpWePeDsjV8RXqhYK
✅ Preview: https://atomic-react-git-fix-in-view-threshold-securex.vercel.app

codecov[bot] commented 2 years ago

Codecov Report

Merging #1193 (ad9c4ec) into master (d3ecaba) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1193   +/-   ##
=======================================
  Coverage   90.47%   90.47%           
=======================================
  Files          98       98           
  Lines        3056     3056           
  Branches     1045     1045           
=======================================
  Hits         2765     2765           
  Misses        250      250           
  Partials       41       41           
Impacted Files Coverage Δ
framework/utils/hooks.js 86.36% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d3ecaba...ad9c4ec. Read the comment docs.