web-components icon indicating copy to clipboard operation
web-components copied to clipboard

Having a full width container next to a MenuBar makes the MenuBar fully collapse in V24.5

Open johannest opened this issue 4 months ago • 0 comments

Description

This used to work in V24.3/4 (the menu bar was not fully collapsed) but in V24.5 it breaks which feels unexpected. It looks like this regardless of browser window width. Menu is collapsed to single button with ellipses. image

Expected outcome

In Vaadin 24.4.14 it looks like this which is maybe a bit more expected: image

Minimal reproducible example

HorizontalLayout outerLayout = new HorizontalLayout();
HorizontalLayout innerLayout = new HorizontalLayout();
outerLayout.setWidthFull();
innerLayout.setWidthFull();
MenuBar menuBar = new MenuBar();
addItems(menuBar);
outerLayout.add(innerLayout, menuBar);
add(outerLayout);

Steps to reproduce

Use the sample code above

Workaround

To get previous behaviour back: menuBar.addClassNames(LumoUtility.Flex.SHRINK_NONE);

Environment

Vaadin version(s): 24.5.0

Browsers

No response

johannest avatar Oct 22 '24 10:10 johannest