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

Weird height behavior after 1.0.0 update #5450

Open
Zatfer17 opened this issue Jan 2, 2025 · 4 comments
Open

Weird height behavior after 1.0.0 update #5450

Zatfer17 opened this issue Jan 2, 2025 · 4 comments

Comments

@Zatfer17
Copy link

Zatfer17 commented Jan 2, 2025

Hello! Today I tried bumping the textual version of my tui-network tool and couldn't see any widget content. After some fiddling I figured out the app compose is not being run. Could you have a look? Perhaps this happens only with packaged apps?

I've made a branch for my app as a proof: https://github.com/Zatfer17/tui-network/tree/textual-issue

Copy link

github-actions bot commented Jan 2, 2025

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@TomJGooding
Copy link
Contributor

Have you tried debugging by adding explicit heights to your widgets/containers?

If compose wasn't being run you wouldn't see anything at all. Your print statement is sent to the dev console, not displayed in the app.

@Zatfer17
Copy link
Author

Zatfer17 commented Jan 2, 2025

@TomJGooding forgot about the dev console thing 😅

You are right, problem is height. Is there a reason why 100h doesn't work anymore as a height? I only managed to get it working setting the height to either auto or a fixed value (% deson't work either).

Referring to https://github.com/Zatfer17/tui-network/blob/0112b62c3cc1def2e189682413d84feaedf92402/tui_network/static/style.tcss#L16 for instance

Or was my css wrong since the beginning? Perhaps I should have set the height on the vertical group in the first place, instead of the inner widget, but I wonder why it used to work before

@Zatfer17 Zatfer17 changed the title App compose is not run after 1.0.0 update Weird height behavior after 1.0.0 update Jan 2, 2025
@TomJGooding
Copy link
Contributor

I think the problem is that the VerticalGroup containers you're using have a default height: auto, so they wouldn't have any real height to base the proportional height of their children on...?

I'm not quite sure why this worked before, it looks like this changed following #5360. Probably needs a maintainer to confirm if this is expected behaviour or a possible regression!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants