8.2 height calculation error
Open
Nobody has claimed this yet.
Stale
workaround
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
HorizontalLayouts which have no components in them have non-zero height, but apparently aren't included in height calculation, which causes issues with calculating the height of expanding components.
Sample:
public class LayoutCalculation extends VerticalLayout {
public LayoutCalculation() {
setSizeFull();
addComponent(new HorizontalLayout());
Panel p = new Panel();
p.setSizeFull();
addComponent(p);
setExpandRatio(p, 1.0f);
addComponent(new HorizontalLayout());
addComponent(new Button("TEST"));
}
}
The button will be rendered partially outside the screen.
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 by reproducing the LayoutCalculation sample with empty HorizontalLayout instances, an expanding Panel, and the Button. Trace the layout height-calculation entry points for HorizontalLayout and VerticalLayout; done means empty horizontal layouts contribute their non-zero height and the sample renders the Button fully within the screen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100