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

Applying an application theme with global styles #9246

Closed
3 tasks done
pleku opened this issue Oct 27, 2020 · 7 comments
Closed
3 tasks done

Applying an application theme with global styles #9246

pleku opened this issue Oct 27, 2020 · 7 comments

Comments

@pleku
Copy link
Contributor

pleku commented Oct 27, 2020

When building an app, I want to apply a theme to the app from one location in the project which will automatically inject the defined css there as global styles, so that I don't have to do it myself

The theme folder is inside the project in frontend/theme/mytheme/ and applied with @Theme("mytheme") annotation. This means the annotation value attribute is changed to type String and the current value, an attribute of type Class, is renamed to baseTheme. Usage of both at the same time should throw an exception describing that it is not supported and only one should be used. Also the variant attribute is only relevant when the baseTheme is used.

Applying the @Theme annotation on a class implementing @AppShellConfigurator will take the theme into use. Discovering multiple theme annotations on the classpath should throw, as it used to be so that the theme was defined in the root layout and user might accidentally forget to remove that.

The webpack build will get the used theme and then load any css from there as global css. Depends on #9245.

Acceptance Criteria

@caalador
Copy link
Contributor

The single @Theme annotation is linked to tickets #9092 and #9110

@knoobie
Copy link
Contributor

knoobie commented Nov 2, 2020

@pleku is this planned to be backported to v14?

@pleku
Copy link
Contributor Author

pleku commented Nov 3, 2020

@knoobie yes it is. But as the target release is v19 beginning of March, I would not expect this to v14 before early Q2 2021 🙍‍♂️

@knoobie
Copy link
Contributor

knoobie commented Nov 3, 2020

@pleku thanks for the info! I'm really looking forward to this. Q2+ is totally fine for more.

@pleku
Copy link
Contributor Author

pleku commented Nov 20, 2020

I'm really looking forward to this. Q2+ is totally fine for more.

Great to hear, since to be honest, I feel really bad about having to say it takes almost 6 months to get the value to the users. 😅

@knoobie
Copy link
Contributor

knoobie commented Nov 20, 2020

@pleku You don't have to. Quality gates and proper development take time. It's not like the feature is already done. You are currently developing it.

Just as example: Spring Boot changed to a 6 month release circle of the upcoming 2.x releases as well. Meaning they now "publish" / "plan" the stuff that is coming in Q2 2021 like you do with theming.

@pleku
Copy link
Contributor Author

pleku commented Nov 26, 2020

To be released in 6.0.0.alpha1

@pleku pleku closed this as completed Nov 26, 2020
@pleku pleku added this to the Custom Theme Feature milestone Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants