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

Merlin example app broken #4354

Closed
rodrigogiraoserrao opened this issue Mar 28, 2024 · 4 comments
Closed

Merlin example app broken #4354

rodrigogiraoserrao opened this issue Mar 28, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@rodrigogiraoserrao
Copy link
Contributor

The merlin example app is broken, likely because of recent changes to the way widths are resolved.

The problem is that there is no way to have a container with two children, with the container having its size set to auto and one of the children saying “be as large as the container” while the container hugs the other child widget.
(I think @davep merged a related PR recently but I can't seem to find it.)

In the merlin app, the issue is in the SwitchLabel widget.
The switch label widget contains a switch and we want the label to be as wide as the switch so that we can centre the label but there's no way of making the label automatically as wide as the switch without fixing both widths to a fixed absolute value.

After fixing the merlin example app we can merge #4036 that adds the example apps to the tests.

@rodrigogiraoserrao rodrigogiraoserrao added the bug Something isn't working label Mar 28, 2024
@davep
Copy link
Contributor

davep commented Mar 28, 2024

You might be looking for the interim fix I did on Trogon? Frogmouth has similar issues too (doubtless other apps, not just our own).

@willmcgugan has been mulling over the problem; perhaps either to roll back the change that caused this, or to come up with a different approach to this sort of layout.

@davep
Copy link
Contributor

davep commented Mar 29, 2024

Given this affects a few things across different repos I've added #4360 as a metaissue that they can all tie back to and which folk can be pointed at if they run into this.

@TomJGooding
Copy link
Contributor

Just to confirm the Merlin example looks good now on v0.55.0 following #4369:

image

Copy link

github-actions bot commented Apr 1, 2024

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants