stellar / freighter

Stellar browser extension
81 stars 25 forks source link

[BUG] adds enough padding to accomodate action modal on scrollable lists #1643

Closed aristidesstaffieri closed 1 week ago

aristidesstaffieri commented 1 week ago

What Adds enough padding to allow for the action modal to show on longer lists

Why When the list got close enough to the footer, it was hidden or truncated

Details We use popper style modals pretty sparingly in Freighter, so right now we have no library or abstractions to account for popper behaviors like positioning and overflowing.

Why not just use z-index? Because the popper and the footer do not share a stacking context, z-index has no effect between the two elements. Also, since we render our modal as a child positioned under the clicked element, it would get truncated by the window even if we overlapped the footer.

Better solutions We can improve our popper behaviors by accounting for positioning and dynamically rendering the modal where it makes sense. If we plan to use poppers going forward it could be worth it to bring in a popper library to account for positioning and other common popper needs. This one is pretty popular in the ecosystem.

Should we do either of those two things in this PR instead of the "band-aid" padding fix?

Screenshot 2024-11-12 at 8 33 16 AM