[bug] thumbnails overflowing with more than one attachment #456

Closed
opened 2025-10-14 23:44:50 +00:00 by lamp · 3 comments

Version

3.12.0

What were you trying to do?

look at my akkoma

What did you expect to happen?

it look not broken like before (3.10.0)

What actually happened?

image thumbnails are overflowing when there are more than one images

2025-10-14_16-37-51.426_Katzenhaus_-_Vivaldi

2025-10-14_16-41-36.188_Katzenhaus_-_Vivaldi

Severity

I can manage

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Version 3.12.0 ### What were you trying to do? look at my akkoma ### What did you expect to happen? it look not broken like before (3.10.0) ### What actually happened? image thumbnails are overflowing when there are more than one images ![2025-10-14_16-37-51.426_Katzenhaus_-_Vivaldi](/attachments/84ef9d86-cef1-4a39-bf54-e94e6985103e) ![2025-10-14_16-41-36.188_Katzenhaus_-_Vivaldi](/attachments/7b56c4f6-9c67-465c-838f-2f8efc60c788) ### Severity I can manage ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
Owner

I guess this went unnoticed because it’s not too apparent if each row has the same amount of images.

Just removing the min-height: 200px setting added in the attachment alt fix, or reverting it to height: 200px gets rid of the overflow. But I assume it was added for a reason in e1b4d8f59a.
This actually also changes how images are displayed. With the current state it zooms into just a part of the image, with it unset or using height the full image is scaled down to fit into the preview box.

Note, min-height was actuallly already unset for notifications inbetween the release and subsequent hotfix frontend release in c2db0e66ef

cc @Riedler, what issue with previews was min-height meant to solve again and any ideas how to best fix it?

I guess this went unnoticed because it’s not too apparent if each row has the same amount of images. Just removing the `min-height: 200px` setting added in the attachment alt fix, or reverting it to `height: 200px` gets rid of the overflow. But I assume it was added for a reason in e1b4d8f59a9ba205f31c5664e353f93132349c0d. This actually also changes how images are displayed. With the current state it zooms into just a part of the image, with it unset or using `height` the full image is scaled down to fit into the preview box. Note, `min-height` was actuallly already unset for notifications inbetween the release and subsequent hotfix frontend release in c2db0e66ef4ccd3e8a22bc1608263077bb9cd053 cc @Riedler, what issue with previews was `min-height` meant to solve again and any ideas how to best fix it?
Contributor

argh I was dreading something like this. I will reiterate that this whole set of components should be rewritten from the ground up, it's a whole mess… The attachment system is in my opinion the most complex piece of frontend code in akkoma =~=

I can't remember for sure why I added min-height but if my guess is correct, it's about height setting a default height (duh) which will restrict the content inside from growing the container instead of overflowing it.

Sidenote but during testing just now I found out there's a bug I didn't catch last time (only happens with height, but definitely unrel to why I added min- in the first place) - in some circumstances, the .placeholder-container>p element will not fill the entire width. To fix this, we can put width:100%;box-sizing:border-box on the p element. Should be done in the same PR since it's a really minor fix.

I would personally fix this but unfortunately I don't have the time rn. Sorry!

I think it's safe to remove min-height in favour of height, but please test all of these corner-cases both for regular galleries and .-type-unknown attachments before merging:

  • normal post obv
  • drafting (bottom overflow is known and unrel, will fix eventually)
  • post as popup (e.g. when hovering over "reply to")
  • post in notification bar
  • any other differently-rendered instances of a post that I'm forgetting about
argh I was dreading something like this. I will reiterate that this whole set of components should be rewritten from the ground up, it's a whole mess… The attachment system is in my opinion the most complex piece of frontend code in akkoma =~= I can't remember for sure why I added `min-height` but if my guess is correct, it's about `height` setting a default height (duh) which will restrict the content inside from growing the container instead of overflowing it. Sidenote but during testing just now I found out there's a bug I didn't catch last time (only happens with `height`, but definitely unrel to why I added `min-` in the first place) - in some circumstances, the `.placeholder-container>p` element will not fill the entire width. To fix this, we can put `width:100%;box-sizing:border-box` on the `p` element. Should be done in the same PR since it's a really minor fix. I would personally fix this but unfortunately I don't have the time rn. Sorry! I think it's safe to remove `min-height` in favour of `height`, but please test all of these corner-cases both for regular galleries and `.-type-unknown` attachments before merging: - normal post obv - drafting (bottom overflow is known and unrel, will fix eventually) - post as popup (e.g. when hovering over "reply to") - post in notification bar - any other differently-rendered instances of a post that I'm forgetting about
Owner

should be fixed by #459, but more real-world testing before merge welcome

should be fixed by #459, but more real-world testing before merge welcome
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AkkomaGang/akkoma-fe#456
No description provided.