rubyforgood / homeward-tails

Homeward Tails is an application making it easy to link adopters/fosters with pets. We work with grassroots pet rescue organizations to understand how we can make the most impact.
MIT License
69 stars 117 forks source link

Fix: Pet settings dropdown on staff "Pets" page are cut off when only one pet is displayed #672

Closed jmilljr24 closed 6 months ago

jmilljr24 commented 6 months ago

When only one pet is shown on the table, the setting's dropdown is cut off at the bottom so not all of the options are displayed.

The settings dropdown should display the same as when multiple pet's are in the table.

Fix Screenshot from 2024-04-26 16-26-07

Correct Screenshot from 2024-04-26 16-27-25

OliverLeighC commented 6 months ago

Could I work on this?

jmilljr24 commented 6 months ago

@OliverLeighC All yours! Let me know if you have any questions.

OliverLeighC commented 6 months ago

Looks like it's "expected behavior" for responsive tables 😭 https://github.com/tabler/tabler/issues/1343#issuecomment-1308569481

but I am going to see if I can get the suggested popper config fix to work

OliverLeighC commented 6 months ago

Hmm... setting popper config to {strategy: "fixed"} reveals the full menu but doesn't behave nicely when scrolling

https://github.com/rubyforgood/pet-rescue/assets/51760107/571bbcfc-206a-454f-a411-786570443ce5

Will keep investigating

jmilljr24 commented 6 months ago

Hmm... setting popper config to {strategy: "fixed"} reveals the full menu but doesn't behave nicely when scrolling Clip.mov

Will keep investigating

I really appreciate you playing around with this. If none of the suggestions that you linked to give good results or if there will be some compromises, post an update and the team can discuss it.

jmilljr24 commented 6 months ago

@OliverLeighC Setting a mini-height of the table might be the easiest option. The dropdown doesn't have a lot cut off so it might work out ok to set a min-height and adjust table headers to fit. But whatever works best!

Also #694 will add a mobile view so if you need to adjust the responsiveness to get it to work feel free. The breakpoint in that issue 1100 px

OliverLeighC commented 6 months ago

Sounds good, will play around with the min height and see what works

OliverLeighC commented 6 months ago

here is what it looks like with the min-height:

image image

more rows for comparison:

image image

I think it looks okay, will submit my PR but let me know if it needs tweaking