contentful / forma-36

A design system by Contentful
https://f36.contentful.com
MIT License
335 stars 81 forks source link

Proposal: Use tether.io for attaching absolutely positioned elements to a target #361

Closed arpl closed 4 years ago

arpl commented 4 years ago

Hi all,

Description

There is an easy win out there called tether see docs and source. The library focuses on the very specific problem of attaching an absolutely positioned element to another.

Pros

Cons

Since I'm working on porting the Autocomplete we can have an example using tether which might help towards a decision.

Your awesome point of view is an absolute must ;) Aris

wichniowski commented 4 years ago

Hey @arpl I think this is a great suggestion since we previously had issues with the component that attaches and repositions dropdowns, tooltips etc.. Since tether is widely used and well tested I'd be in favor of replacing our InViewport component with it. Although it comes with a 5kb price per component package that uses it.

kamsar commented 4 years ago

This also causes problems with the multiple reference field editor if used in an app or UI extension (https://github.com/contentful/field-editors/issues/415)

m10l commented 4 years ago

We recently refactored the tooltip component to use Popper.js and a follow-up PR is open to refactor the Dropdown component is currently open.