Skip to content
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

[Bug]: Media causing main window to be resized #359

Open
tjipkevdh opened this issue Jul 7, 2023 · 7 comments
Open

[Bug]: Media causing main window to be resized #359

tjipkevdh opened this issue Jul 7, 2023 · 7 comments
Labels
bug Something isn't working info needed priority: high status Status widget related issue

Comments

@tjipkevdh
Copy link

Describe the bug

I ran in to an interesting bug when viewing a thread that has media that's wider than the current width of my window: It automatically resizes tuba's application window to fit the media. I would like to share a random thread on which this is happening: https://hachyderm.io/@digichelle/110669371562567813

I would have expected the media to fit the application window, instead of the application window to fit the media.

Steps To Reproduce

All you have to do to reproduce it is to add the link pasted in the bug description in your search bar, and open it. If your window was small before you opened that link, it will automatically be resized to fit the media inside the thread.

Logs and/or Screenshots

<paste your logs here>

Instance Backend

Mastodon

Operating System

Fedora Workstation 38

Package

Flatpak

Troubleshooting information

os: GNOME 44 (Flatpak runtime)
prefix: /app
flatpak: true
version: 0.3.2 (production)
gtk: 4.10.3 (4.10.3)
libadwaita: 1.3.2 (1.3.2)
libsoup: 3.4.2 (3.4.1)
libgtksourceview: 5.8.0 (5.8.0)

Additional Context

No response

@tjipkevdh tjipkevdh added the bug Something isn't working label Jul 7, 2023
@GeopJr
Copy link
Owner

GeopJr commented Jul 7, 2023

Thanks for raising this issue!
I'm having trouble reproducing, could you send me a screen recording?

Screencast.from.2023-07-07.12-11-29.webm

If you can reliably reproduce it, could you give disabling preview cards a try? (FWIW, it's probably not a media issue but rather something else that's causing the width to change)
image

@vancha
Copy link

vancha commented Jul 7, 2023

I don't think disabling the preview cards made any difference at all (it's disabled in this preview), but here it is :) I'm sorry i should have clarified you'd had to open the thread.
Screencast from 2023-07-07 12-36-51.webm

@GeopJr
Copy link
Owner

GeopJr commented Jul 7, 2023

That does look bad. Thanks for the recording!

I did open the thread on my recording too so I'm assuming there might be something different in the content returned from your instance.

  • Are there any warnings in logs when opening the thread? (related to HTML parsing) (to see the logs run tuba from terminal flatpak run dev.geopjr.Tuba)
  • If you scroll down through the thread is there anything that's might have taken the full width of the app? (any post content, for example a really long post being exactly the width of the app), if so could you tell me which one is it?
  • Does this occur on the nightlies? https://nightly.link/GeopJr/Tuba/workflows/build/main/dev.geopjr.Tuba.Devel-x86_64.zip (unzip it and run flatpak install --user ./path/to/dev.geopjr.Tuba.Devel.flatpak)

It's not an attachment issue.

Sorry for all of that but I'm still unable to reproduce it so I'm going to need your help. Otherwise if your instance is public, I could try making an account there to better debug it.

@GeopJr GeopJr added status Status widget related issue priority: high labels Jul 7, 2023
@vancha
Copy link

vancha commented Jul 7, 2023

hmm yes, it looks like the issue still happens with the nightly version as well. I tried looking through the log messages, and what stands out to me is the following: there's a whole bunch of these:
(dev.geopjr.Tuba:2): Gtk-WARNING **: 14:39:10.539: GtkImage 0x55f13dc51aa0 (image) reported min height -16, but sizes must be >= 0

And a couple of these: Gtk-WARNING **: 14:39:11.131: GtkLabel 0x55f13b2d2cc0 (label) reported min width 2368 and natural width 1563 in measure() with for_size=37; natural size must be >= min size

But i haven't been able to figure out exaclty which media the gtkImage warnings are associated with, or which text (in the mastodon thread) the gtklabel warning is associated with. Maybe finding that out can offer some clarification, and i hope to be able to provide a link to the exact part of that mastodon thread that causes this issue.

@GeopJr
Copy link
Owner

GeopJr commented Jul 7, 2023

It's not that either, those warnings are due to the labels with custom emojis

If you've got time, I'll attach all reply urls (60) below to help pinpoint which one is the culprit. You don't have to open the thread on each one, just paste one by one in the search bar until one of them expands the window:

replies.txt

If the instance your account is on is public please mention which one is it so I make an account there and further debug it

@vancha
Copy link

vancha commented Jul 10, 2023

hmm it doesn't seem to be any of those either. I haven't been able to pinpoint a specific comment that does this, yet when viewing the whole thread it increases the window size. I guess I'll keep looking for messages, or maybe just leave it until the same problem occurs in a thread that does't take literal days to check every comment? ^^

@GeopJr
Copy link
Owner

GeopJr commented Jul 10, 2023

Sounds good, thanks for giving it a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working info needed priority: high status Status widget related issue
Projects
None yet
Development

No branches or pull requests

3 participants