Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Add a html import 'valo-all' for Vaadin Flow users #47

Closed
tmattsso opened this issue Jan 4, 2018 · 8 comments
Closed

Add a html import 'valo-all' for Vaadin Flow users #47

tmattsso opened this issue Jan 4, 2018 · 8 comments

Comments

@tmattsso
Copy link

tmattsso commented Jan 4, 2018

Many Flow users don't care which of the components they use, or if they have custom styles or not. For them, just importing a 'valo-all.html' file in a root layout would be a sensible default. From there, they can move to their own file that still imports all but with a few custom definitions. Individual imports would also be possible for real hardcore users.

@jouni
Copy link
Member

jouni commented Jan 4, 2018

Now that the individual element themes are moved to the corresponding element repos, and are imported by default, do you mean that there should be a all-imports.html (Polymer convention) file that imports the foundational style modules (color, typography, sizing, spacing, icons, font-icons, badges, etc)?

@jouni jouni changed the title Add a html import 'valo-all' for flow users Add a html import 'valo-all' for Vaadin Flow users Jan 4, 2018
@tmattsso
Copy link
Author

tmattsso commented Jan 4, 2018

I want a single import to get me everything, including those you mentioned and styles for all individual elements (the maven import of flow/valo should also include all of them).

@jouni
Copy link
Member

jouni commented Jan 4, 2018

and styles for all individual elements

As this “styles” package can’t know which elements you actually have in your project, it can’t import those files (e.g. bower_components/vaadin-button/theme/valo/vaadin-button.html).

I’m still wondering what the benefit of importing all the other stuff at the same time is. If you are using some of the style modules or custom properties defined in those imports, you should import them manually.

Since Flow will be using Valo by default anyways, it can automatically import all of these files. Perhaps Flow wants a convenient way for doing that. @pleku, any thoughts about that?

@heruan
Copy link
Member

heruan commented Jan 4, 2018

@tmattsso Now that the theme style is included in the components themselves, as @jouni explained this repo should have reference to them.

Note that many Flow components based on Vaadin Elements are still importing the unstyled file (e.g. src/vaadin-button.html instead of the styled theme/valo/vaadin-button.html) and there are plans to provide annotation based theme selection in Flow:

@tmattsso
Copy link
Author

tmattsso commented Jan 4, 2018

As this “styles” package can’t know which elements you actually have in your project

Yes, it does. All of them. That's the whole point. This ticket is specifically to add convenience for those who do not want to spent time configuring their theme. We can make it easy for those users.

@heruan this might be the wrong repo, but this is a discussion specifically on how to use the theme from a flow application. IMO the proposed change would be an easy fix for the issue, at least until there can be a 'real solution' for Flow.

@jouni
Copy link
Member

jouni commented Jan 4, 2018

Yes, it does. All of them. That's the whole point. This ticket is specifically to add convenience for those who do not want to spent time configuring their theme. We can make it easy for those users.

I really don’t agree. This package can serve other 3rd party elements, so should it import those as well?

@jouni
Copy link
Member

jouni commented Jan 23, 2018

I don’t understand the intent of this request properly, and I think we should open an issue in Flow instead to continue the discussion.

@jouni jouni closed this as completed Jan 23, 2018
@pleku
Copy link

pleku commented Jan 23, 2018

I think this issue is invalid here and even in Flow.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants