1

Is there some reason why Vaadin 24 is not using the specified theme? Its using some default light theme. You can even generate a new Vaadin 24 starter app and choose the lumo dark theme. When you run the app it doesn't use it. This was a working app in 23, just updated to 24. And I tried a new starter app, same problem.

Also, the gradle buildFrontend task now fails with licensing complaints for components that aren't being used, even in dev mode. That is broken. This problem began in version 23.

If you just need to see some code:

@Theme( value = "myapp", variant = Lumo.DARK )
public class Application extends SpringBootServletInitializer implements AppShellConfigurator {

    // the usual stuff
}
K. Taylor
  • 431
  • 5
  • 8

1 Answers1

0

It's currently a known bug that dark mode isn't rendered with the latest precompiled frontend bundle. Use the hot deploy flag if you wanna deactivate the feature for the time being.

Your second issue sounds like you are using vaadin instead of vaadin-core as Dependency, which includes licensed features.

Knoobie
  • 1,968
  • 10
  • 14
  • "hot deploy flag" ? I will look that up. Thanks. And yes I am using vaadin. I didn't realize that changed what components are included. I'll switch it. I did find a way to exclude those components in the gradle build but that's not the optimum solution. – K. Taylor Mar 17 '23 at 19:52
  • You can find all information on this page https://vaadin.com/docs/latest/configuration/development-mode/#front-end-development-server-for-easier-debugging – Knoobie Mar 17 '23 at 22:12
  • Thanks and I did set that property. – K. Taylor Mar 23 '23 at 12:49
  • I added this to my mainlayout, which worked around the bug: var js = "document.documentElement.setAttribute('theme', $0)"; getElement().executeJs(js, Lumo.DARK); – Scott Hather Mar 28 '23 at 14:32