fix multiline alt texts for generic attachments (e.g. zip files) #446

Merged
Oneric merged 6 commits from Riedler/akkoma-fe:fix-attachalt into develop 2025-10-04 22:04:12 +00:00
Contributor
. Before After
Draft image image
Timeline image image
Notification Sidebar popover post image image
| . | Before | After | |---------|---------|---------| | Draft | ![image](/attachments/12bfb9c6-02ca-411c-9e09-87f77515c343) | ![image](/attachments/f5589341-4701-496d-aace-fcce0139d725) | | Timeline | ![image](/attachments/0fdbd958-7e2b-45c5-97c2-b5018b8b0742) | ![image](/attachments/85994e3c-60b5-4fe0-b2a0-54db69b3177c) | | Notification Sidebar popover post | ![image](/attachments/82240853-25c6-4e22-b728-e7063a2104be) | ![image](/attachments/69b69444-b521-468d-966c-a0981fe0113f) |
Owner

yeah, i noticed this before too; thanks for tackling this!

I think it can be improved further though: If the description/alt text is very long this patch currently will not show all of it by default (good, we don't want it to take up the entire TL) cutting it off at ~2 paragraphs. But there’s also no way to read the rest of the description. Can you add a button to show the full text similar to image alt texts, or perhaps just a usable scrollbar? Simply changing .Attachment .attachment-wrapper’s overflow: hidden to overflow: scroll via browser devtools doesn’t appear to work

yeah, i noticed this before too; thanks for tackling this! I think it can be improved further though: If the description/alt text is very long this patch currently will _not_ show all of it by default *(good, we don't want it to take up the entire TL)* cutting it off at ~2 paragraphs. But there’s also no way to read the rest of the description. Can you add a button to show the full text similar to image alt texts, or perhaps just a usable scrollbar? Simply changing `.Attachment .attachment-wrapper`’s `overflow: hidden` to `overflow: scroll` via browser devtools doesn’t appear to work
Author
Contributor

it should only be cut off in the tiny popover-on-hover in status previews - I think making the user open the post to read the full alt text is reasonable. does it not do that? I haven't had time to test it much unfortunately (todo, maybe tomorrow)

it should only be cut off in the tiny popover-on-hover in status previews - I think making the user open the post to read the full alt text is reasonable. does it not do that? I haven't had time to test it much unfortunately (todo, maybe tomorrow)
Owner

it’s cut off in the full post view on the main timeline.
I added 13 paragraphs of stub text to a text-file attachments as a text, only 2 are shown on the TL. (though Firefox’ click-and-drag render still contains all 13)

it’s cut off in the full post view on the main timeline. I added 13 paragraphs of stub text to a text-file attachments as a text, only 2 are shown on the TL. (though Firefox’ click-and-drag render still contains all 13)
Author
Contributor

huh. I'll take a look at this (and the other thing where you pinged me) later, maybe tomorrow.

huh. I'll take a look at this (and the other thing where you pinged me) later, maybe tomorrow.
fix: scrollable gallery rows for if contents are too long
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending approval
d252e10543
like my peanits
Author
Contributor

I've made it scrollable after some debugging

image

should just work, I've made sure this doesn't affect other attachments negatively

also I found another bug, brb…

I've made it scrollable after some debugging ![image](/attachments/4094a542-cd96-465f-97c1-75a636c54da2) should just work, I've made sure this doesn't affect other attachments negatively also I found another bug, brb…
211 KiB
fix: some days I hate CSS
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pull_request_closed/woodpecker Pipeline is pending approval
f08a961199
Author
Contributor

should work now. tested on chromium and firefox.

really the whole gallery component and its children need to be rewritten from the ground up - there's so much jank in there I don't want to get into, it's insane… and it's making me go insane. I'm certainly not going to work on subcomponents of this in the future anymore :(

should work now. tested on chromium and firefox. really the whole gallery component and its children need to be rewritten from the ground up - there's so much jank in there I don't want to get into, it's insane… and it's making me go insane. I'm certainly not going to work on subcomponents of this in the future anymore :(
Owner

seems all good now, many thanks!

seems all good now, many thanks!
Oneric approved these changes 2025-10-04 14:15:37 +00:00
Oneric merged commit 37ce8352a9 into develop 2025-10-04 22:04:12 +00:00
Riedler deleted branch fix-attachalt 2025-10-04 22:05:05 +00:00
Sign in to join this conversation.
No description provided.