UI.setDirection Causes ToggleDrawer to stop working in Vaadin 23.

Reprodcing the problem in a Vaadin AppLayout Starter.

MainView

@Override
    public void beforeEnter(BeforeEnterEvent bee) {
        
        String lang = bee.getLocation().getQueryParameters().getParameters().getOrDefault("lang", List.of("en")).get(0);
        if(lang.equals("en")){
            UI.getCurrent().setDirection(Direction.LEFT_TO_RIGHT);
        }
        if(lang.equals("ar")){
            UI.getCurrent().setDirection(Direction.RIGHT_TO_LEFT);
        }
        
        
    }

HelloWorldView.java


public HelloWorldView() {
        
        Anchor a=new Anchor("/?lang=ar", "Arabic RTL");
        Anchor b=new Anchor("/?lang=en", "English LTR");
        
        add(a,b);
        
        
    }

unknown.png

Hi, tested this and can confirm that the drawer-toggle doesn’t seem to work in RTL mode.

I’ll create a bug ticket.

Ticket: https://github.com/vaadin/web-components/issues/4682

Great to get this sorted out and solved👍
Should I expect this available by running Maven?

looks like the fix just missed 23.2.4, so I’d expect it to be in 23.2.5 next week.

But how to get it depends on the Vaadin version in your pom.xml. If it’s set to 23.2, doing a mvn clean install should fetch you the latest patch release of 23.2, i.e. 23.2.4.

That’s not how maven works Rolf :wink: (at least not by default; and it’s discouraged)

Thanks guys,

@useful-whale is clearly a rebel :smile:

ah, my bad – it’s been a while since I’ve had to do that so my mvn knowhow is a bit rusty :smile:

The solution worked for 23.2.5 ,

However, the next version 23.2.6 and 23.3.0.alpha1 (to test TabSheets)

they both fail the drawer,

reverting back to 23.2.5

Now even this version is not working!!

what went wrong!

so, if the fix worked in 23.2.5, and now (after switching versions back and forth a bit) suddenly doesn’t, my guess would be a Maven cache issue or something, but as mentioned I’m realllly not a Maven expert, so maybe @secure-leopard has a better idea?

(I very much doubt that the fix would somehow not have made it into versions after 23.2.5)

After cleaning and creating a new project , the problem was fixed, seems the IDE netbeans, did not update maven accordingly for some reason. Thank you.

glad to hear it!