Juha Seppänen:
Thanks for your time highlighting issues for us. I’d like to know more about your expectations on modifying the components. What kind of behavioral changes you’d expect? What capabilities are missing with the current set of configuration capabilities within Lumo? We’d love to make our components more configurable but honestly we lack a bit guidance on where to focus with that effort. Meanwhile, please check out Lumo theme editor at https://demo.vaadin.com/lumo-editor/
Hi Juha,
The majority of the components are really great!!
I think a big part of the challenge is the documentation. It is scattered in many places which makes it hard to find what you need.
Say for example that you have a combobox in the menubar and you want to style the background color, label/icon/text color and overlay to blend with the menu bar. In the regular HTML/CSS world, this would be super easy with a few lines of CSS, but this is very complex in Flow.
Starting from scratch, you look at https://cdn.vaadin.com/vaadin-lumo-styles/1.4.1/demo/customization.html, which directs to https://github.com/vaadin/vaadin-themable-mixin/wiki which then states that not all parts can be styled and eventually you end up having to look at the web component (e.g. https://cdn.vaadin.com/vaadin-combo-box/5.0.0/#/elements/vaadin-combo-box) and if that doesn’t give you all the answers you then have to dig into github. Not only for the combobox itself (https://github.com/vaadin/vaadin-combo-box), but also for components that the combobox is using (textfield and overlay etc).
That’s a lot to go through to find out how to style a component.
Also, the documentation tends to leave out things that can’t be done, even if you naturally would expect the functionality to be there.
An example is the NumberField which is one of the components Sebastian mentioned in the first post in this thread. Most business apps that deal with numbers in fields will a) require a formatting pattern such as 1,234.56 or 1.234,56 as well as right justification. Ideally it should also support localization. The examples (https://vaadin.com/components/vaadin-number-field/java-examples) do not show any of these.
So you look at the Java API and you’ll notice that there is a setPattern method. However, setPattern does not affect how values are displayed, but you wouldn’t know this without looking at the actual source code.
In all, it seems that if you need formatting and/or localization, you’d be better off with a TextField and a converter. Mentioning this in the examples and possibly also the JavaDoc would save time for developers trying to get the NumberField to work.
While I’m on it, here are a few other items/ideas that might be worthwhile to consider and I think might be helpful for other people in this group.
Documentation (https://vaadin.com/docs/v13/flow/Overview.html)
- Views/components can be created using plain Java or as Polymer templates. The documentation does include information on how to create each type, but there is little guidance on why one should pick one over the other. It would be tremendously helpful with a clear comparison between the two. For example:
- Benefits and drawbacks of creating views/components in plain Java vs. Polymer
- Quantify server, memory and network overhead of using plain Java views/components over polymer templates. If I have a form with, say, 20 text fields and 5 comboboxes, what is the overhead of doing this in plain Java vs. a Polymer template?
- The examples in the polymer documentation mostly deals with fairly simple subjects such as getting or setting string values. It would be helpful with an example that illustrates how to use a collection of items. A good example may be a polymer component that has a collection of checkboxes that also can be bound using the data binder.
- Include an example of a Java component that uses an overlay to show additional selections. Example: a component that has a button and when button is clicked, an overlay opens revealing additional information that can be modified (I’m aware that this can be done using a dialog, but afaik there is no option to position the dialog where the component is).
Layout best practices.
- List best practices for doing an app layout with header, footer and content.
- Elaborate on flex box.
- Include do’s and don’ts. (Like setting width or height to 100% seems to break flex box and scrollability on iOS)
Theming and styling.
- Include more comprehensive examples, how to style background color, text color or label color for a Vaadin component
Component Documentation (https://vaadin.com/components)
- Monitor forum and gitter for questions that show up repeatedly, it’s a good sign that the documentation for the component needs to be updated.
- Consider adding a “Common Questions” section to the components - perhaps even with the ability for the community to add stuff. Some of the questions that have shown up multiple times include: How to remove the clear (X) on ComboBox or how to empty/remove the list of uploaded files in the upload component.
- Consider “Known limitations” for stuff that is broken. For example, you can’t use @Id for tabs defined in polymer template, but the documentation makes no comment about that.
Bug Fixes
- What is the priorities for fixing bugs? Bug fix priorities seems to be a black box. The 1.0 milestone which was created last summer doesn’t seem to have much traction (https://github.com/vaadin/flow/milestone/82). I’ve logged multiple bugs related to FormLayout, one of them going back to August of 2018. Without knowing whether the bugs will be fixed or not, I have no idea if I need to abandon FormLayout completely and roll my own. If we have more clarity on bug priorities, we can better determine how to work around.
Vaadin Forum
- Make it possible to narrow search results by platform so we don’t get V7 responses when we’re looking for V10
- Include more results in the search result. Seems to limited to 10 entries or so.
- Consider adding component tags to the forum thread, so you easily can find all threads for “NumberField”. This will also help find topics between this Forum and the Component forum.
- On “My Page” make it possible to see all threads that you have started as well as all thread that you have replied to.
Ok long list, but I hope at least some of the ideas will help.
Thanks for the link to the Lumo editor. I did see that a few weeks ago. Very nice tool. There is also https://labs.vaadin.com/project-wizard which seems very interesting.