react-bootstrap / react-overlays

Utilities for creating robust overlay components
https://react-bootstrap.github.io/react-overlays
MIT License
899 stars 222 forks source link

Where did AutoAffix go? #953

Closed nicgordon closed 3 years ago

nicgordon commented 3 years ago

Describe the bug

I am upgrading this package from an old version (0.9.3) and we are using the AutoAffix component. That does not seem to be exported from this package anymore but there is nothing in the changelog talking about its removal, nor can I seem to find the commit when it disappeared.

Is there a suggested migration path for those using AutoAffix?

To Reproduce

Steps to reproduce the behavior:

  1. Install v0.9.3
  2. Use the AutoAffix component via import { AutoAffix } from 'react-overlays';
  3. Upgrade to v5.0.1

Expected behavior

At least a note in the changelog about when it was removed and potentially a migration option.

nicgordon commented 3 years ago

Okay after some digging I found this PR https://github.com/react-bootstrap/react-overlays/pull/287 but there is nothing even on the description as to why it was removed or what consumers ought to do?

jquense commented 3 years ago

i don't really remember the context it was like 3 years ago i think? There isn't a real need for this component anymore position: sticky is very well supported now, and for old browsers better to use a sticky polyfill

nicgordon commented 3 years ago

Thanks for the reply @jquense.

For any others that might stumble upon this here are some alternatives that I have found:

Or yes, write something custom using the position: sticky css property.