Allow fill-parent/wrap-content paradox in certain cases
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
Please see the following situation:

The VerticalLayout's width is null and thus it wraps its children; all buttons have their widths set to 100%. This seemingly creates the fill-parent/wrap-content paradox; Vaadin's VerticalLayout resolves this by acting as if all button widths were null and will wrap them.
However, often it is desirable to have all buttons share the width of the widest one. In Android this case has been made to work properly: http://stackoverflow.com/questions/4606613/combining-wrap-content-on-parent-and-fill-parent-on-child - in such case a widest button is found and all other buttons will be made as wide as the widest button.
Current workaround is to mark the widest button with width being null, leaving other buttons having 100% width. This works properly with VerticalLayout. It would be great if VerticalLayout could support also the all-children-having-100% width case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with VerticalLayout's width and child-measurement behavior, using the described all-children-100% case as the reproduction. Compare it with the existing behavior when the widest child has a null width. Done means a wrapping VerticalLayout can determine the widest button and apply that width consistently without requiring a manual workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100