-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make gallery expanded view description scrollable #3624
Make gallery expanded view description scrollable #3624
Conversation
Something I was wondering here: Should there still be some padding at the bottom? Right now, it's made so that padding isn't respected. Is this fine or should we do something else? |
By padding, do you mean padding between the bottom of the text area and the bottom of the "expanded view" area? Or between the expanded view and the bottom of the page? |
This one. Right now, if there's an overflow, it utilizes the expanded view area as much as possible. Anything beyond that will result in a scroll bar. |
Thanks! I think that a bit of padding would be best! It looks a bit squished. And we don't get that much from it since you can't actually read that 4th line anyway! |
Agreed! I'll update my PR shortly. |
The issue you referenced above was caused by a race condition I didn't notice earlier. The margin calculation function ran before the modal/expanded view was fully rendered, causing inaccurate numbers. Should be fixed now! I also reduced the font size of the gallery tags and added a max height to the gallery tags container. |
Okay! I'm cool with decreasing the font size a bit, though I'd rather do it for all the text in the expanded view, not just the tags. Especially because the tags might be the most important info here! For Gallery at least, I'd also like to lean towards using |
Maybe there's a way to do away with your JS code to calculate the margin/padding on the bottom by using |
Decreased expanded view info font size a bit and used
Absolutely, and your assumptions are 100% correct! The info section at the bottom that contains the severity, timestamp, tags, description actually had a version of this where it split each piece of information into sections. The description was 60% height and the tags were 40% height. The issue was that the same div also included the timestamp, resulting in a total height greater than 100%, leading to the overflow issues for the description. For some reason, I never noticed this layout design or issue when I first worked on the issue! I switched it to using CSS now instead of JS and much prefer the updated solution. |
…ttps://github.com/ProjectSidewalk/SidewalkWebpage into 3622-gallery-expanded-view-scrollable-description
Definitely agreed. Those issues are deal breakers. Going to work on a fix today. |
I was able to reproduce severity smileys being cut off on the Project Sidewalk Seattle production site too: Not totally sure what's going on here. I've analyzed it a bit in dev tools and can't find any reason why it'd be doing that. It felt like it was happening randomly too. I would resize the browser window size by 1px and then the issue would go away. I thought it might be a browser-specific issue. To test this hypothesis, I downloaded Firefox but also saw that the issue occurred there too. I tried increasing the vertical size of the I know you also pointed out the tags being distant from the tags header and also the tags not showing at least two rows. Hopefully these other visual issues are fixed now with my recent commits! |
Oh no!
If it seems like a pretty easy fix, I think it's fine to just throw it in to this PR! Already doing some adjustments to the area so I think it's fine :) If it seems like it would be more involved, then we can make a new ticket for it |
I fixed the issue by increasing the size of the icons' vertical viewbox very slightly. In my previous comment, I forgot to include a screenshot, so putting one here now: I'm gonna make one more commit to lessen the distance between the tags header and tags and then this should be ready. |
And the commit I referenced at the bottom of my last message is now finished! |
While I was working on another issue, I noticed the severity icons can also be cut off horizontally too. I expanded the horizontal viewbox too. Hopefully everything should be good now! Ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolves #3622
Previously, when the height was small enough, the description would overflow the expanded view modal. This is now fixed by setting the overflow property in the description body to
auto
and also some minor JS scripting to deal with the cases where css alone is not enough (in some situations where the height is very very small).Before/After screenshots (if applicable)
Testing instructions
Things to check before submitting the PR