communityconnect icon indicating copy to clipboard operation
communityconnect copied to clipboard

Category list of extended length does not scroll past viewport

Open timtheguy opened this issue 7 years ago • 8 comments

Currently, the 'Category List' does not scroll when longer than the height of the viewport. See below when additional categories are added:

image

This pull request should address #170 when resolving the problem on both desktop and mobile clients.

timtheguy avatar Feb 27 '19 01:02 timtheguy

I've been working on this throughout today and I'll continue with it tomorrow. I can't promise anything for Friday, I'm sorry. I can get the category list to scroll together with the organization cards, but I can't get them to scroll separately yet.

ValerieKenyon avatar Feb 28 '19 01:02 ValerieKenyon

Have you tried setting position: absolute and overflow-y: scroll to the columns? https://stackoverflow.com/a/35026098

alxhghs avatar Feb 28 '19 01:02 alxhghs

May not even need position absolute. The overflow-y should do it I think. Worth trying!

alxhghs avatar Feb 28 '19 02:02 alxhghs

Yes, I've tried those. I encountered a layout problem with position absolute. Overflow-y: scroll isn't causing a problem. I've tried with position relative and without position which don't seem to affect anything - except that position sticky (what's currently set for the Category List) seems to be preventing scrolling of the Category List, and relative or default seems to allow for tandem scrolling.

ValerieKenyon avatar Feb 28 '19 02:02 ValerieKenyon

I've also noticed in AdminPage.js that the Category List is in a separate div, but the Card Grid isn't. I don't feel comfortable messing with the JSX too much myself, and I'm not sure if it even has a bearing on it.

ValerieKenyon avatar Feb 28 '19 02:02 ValerieKenyon

Try this out:

Make the <form> have position: static Give the parent <div> of <form> overflow-y: scroll

I got this working by playing around in the dev tools so let me know if you have any issues getting it to work and I'll be happy to share some code with you.

alxhghs avatar Feb 28 '19 16:02 alxhghs

Also set the <container> of the cards to overflow-y: scroll

alxhghs avatar Feb 28 '19 16:02 alxhghs

I've just submitted a PR for this. My solution isn't perfect, it has the category list scroll in tandem with the organization cards.

ValerieKenyon avatar Feb 28 '19 18:02 ValerieKenyon