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

Support for the new runtime feature "default theme" #864

Open
codeworrior opened this issue Aug 25, 2023 · 2 comments
Open

Support for the new runtime feature "default theme" #864

codeworrior opened this issue Aug 25, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@codeworrior
Copy link
Member

Is your feature request related to a problem? Please describe.

Since SAP/openui5@01e9de75c, the UI5 runtime supports a so called default theme. If an application configures no theme at all, no longer the incomplete base theme is used, but a default theme which depends on the used UI5 version. This feature has not only been added in master, but also in all older maintenance branches.

However, during development, one always has to reference a concrete theme project in the ui5.yaml's framework section . It's not yet possible to omit this and let the tooling pick the right dependency.

Describe the solution you'd like

It would be nice if one could specify the use of the default theme also in the dependencies of a project, either

  • by a 'magic' dependency name (like themelib_sap_default) which the tooling then translates into the default theme of the referenced UI5 version
  • or by omitting theme libs in the framework section and rather specifying a dedicated configuration (e.g. useDefaultTheme: true).

Describe alternatives that you've considered

Using the CDN is an alternative as the CDN always contains the necessary default theme per version. But this would limit the use of the default-theme feature.

Relevance

As changes of the default theme are not that frequent in UI5, this is not a hot topic. Nevertheless, support for default themes feels a bit incomplete without it.

@codeworrior codeworrior added the enhancement New feature or request label Aug 25, 2023
@matz3
Copy link
Member

matz3 commented Aug 28, 2023

Thanks for mentioning this. There have already been ideas to add a theme configuration, where a list of concrete themes can be maintained (rather than only listing a theme-family), which can then also be used to reduce the build output size by omitting theme content that is not required.
This configuration could then also have a special <default> value (or separate flag) to support what you've described.

And as long as we keep the concept of the themelib_* libraries, it would also make the declaration of them obsolete, as they can be derived from the theme configuration.

Just some ideas, but we should definitely follow-up on this.

@codeworrior is there a way to retrieve the version-dependent default theme information other than looking into the source code file?

@codeworrior
Copy link
Member Author

codeworrior commented Aug 28, 2023

is there a way to retrieve the version-dependent default theme information other than looking into the source code file?

Not yet, at least not that I would be aware of. Maybe in the theme metadata in the base content?

[Update] Thinking about it again, the base content can't know the decision of UI5 which theme to pick as default. UI5 might adopt a theme later than the base content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants