fkhadra / react-on-screen

Check if a react component in the viewport
https://fkhadra.github.io/react-on-screen/
MIT License
405 stars 50 forks source link

Added check for component bottom up to stop whole page being visible #18

Closed tapayne88 closed 6 years ago

tapayne88 commented 6 years ago

15

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9c1a1df715f99b3ea08a33d17f8293c96adf624f on tapayne88:bug/partialVisibility-bottom-up into 7b41a2d882e5c3549b07db26eb031bc993036857 on fkhadra:master.

tapayne88 commented 6 years ago

Expanded the tests to cover the cases I was encountering. See what you think about how I expanded the component API. Needed it for testing but might be a useful feature?

fkhadra commented 6 years ago

Hey @tapayne88, I merged your first PR. For that one I'm getting a conflict, I fixed the conflict locally but 2 tests fail. Any idea ?

screen shot 2018-02-03 at 15 05 30

Thanks

tapayne88 commented 6 years ago

@fkhadra think I've got it. The news tests I'd written weren't using the renderComponent function I'd made in the previous branch so the on mount calculations weren't running.

fkhadra commented 6 years ago

@tapayne88 thanks for fixing the issue. I published the v2.0.2