Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppShellConfigurator can't be used but still is needed #19792

Closed
khauser opened this issue Aug 16, 2024 · 2 comments
Closed

AppShellConfigurator can't be used but still is needed #19792

khauser opened this issue Aug 16, 2024 · 2 comments

Comments

@khauser
Copy link

khauser commented Aug 16, 2024

Description of the bug

With #18012 the AppShellConfigurator couldn't be used anymore in my MainLayout.

Like:

@PWA(name = "UI", shortName = "UI", backgroundColor = "#233348", themeColor = "#233348")
@Push
public class MainLayout extends FlexBoxLayout implements RouterLayout, AppShellConfigurator, AfterNavigationObserver
...
    @Override
    public void configurePage(AppShellSettings settings)
    {
        settings.addMetaTag("apple-mobile-web-app-capable", "yes");
        settings.addMetaTag("apple-mobile-web-app-status-bar-style", "black");

But if i remove the AppShellConfigurator I get another problem in my CICD-pipeline:

Execution failed for task ':vaadinPrepareFrontend'.
> com.vaadin.flow.server.ExecutionFailedException: Error occured during goal execution: There can only be one @PWA annotation and it must be set on the AppShellConfigurator implementor.

Expected behavior

My pipeline should not fail and keeping the apple styling would be also nice.

Minimal reproducible example

not needed

Versions

  • Vaadin / Flow version: 24.4.8
  • Java+OS version: eclipse-temurin:21.0.3_9-jre-alpine
@khauser khauser changed the title AppShellConfigurator can be used but still is needed AppShellConfigurator can't be used but still is needed Aug 16, 2024
@knoobie
Copy link
Contributor

knoobie commented Aug 16, 2024

How about a class for it?

@PWA(name = "UI", shortName = "UI", backgroundColor = "#233348", themeColor = "#233348")
@Push
public class AppShellConfiguration implements AppShellConfigurator {

  @Override
  public void configurePage(AppShellSettings settings) {    
        settings.addMetaTag("apple-mobile-web-app-capable", "yes");
        settings.addMetaTag("apple-mobile-web-app-status-bar-style", "black");
  }
}

@khauser
Copy link
Author

khauser commented Aug 16, 2024

This works. Thank you!

@khauser khauser closed this as completed Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants