Button.addThemeVariants deprecation

var button = new Button();
button.addThemeVariants(ButtonVariant.LUMO_SMALL);

is deprecated in Vaadin 23.3.0. What is the supposed replacement? The docs still use button.addThemeVariants: https://vaadin.com/docs/latest/components/button

You don’t have to do anything in this case. Looks like there was no overwriting of the method in the button class.

Ping fyi @flexible-kiwi

What IDE are you using?

Eclipse

It’s shown as deprecated because it’s defined in GeneratedVaadinButton<R extends GeneratedVaadinButton<R>> which is annotated as deprecated

Interesting, IDEA does it better :sweat_smile: that method from above is not deprecated don’t worry - only the generated class. The method is going to be moved to the button class

Thanks for the clarification, I’ll add some ignore rules for now

Kind of surprising, but I guess it goes to show that testing deprecation notices only in IDEA is not enough :grimacing:.

I’ve opened a PR that should address this: https://github.com/vaadin/flow-components/pull/4391