Giter VIP home page Giter VIP logo

flow-and-components-documentation's Introduction

The Vaadin documentation is moving to vaadin/docs

This old V10-18 documentation repository is no longer accepting contributions - please use vaadin/docs instead. The open issues from this repository will be moved to the new docs repository later on.

The new docs site will be released in Q1 2021. The docs remain live in vaadin.com.

The documentation for older Vaadin versions (10-17) can be found from the branches in this repository.

flow-and-components-documentation's People

Contributors

ahie avatar alvarezguille avatar ansku avatar bogdanudrescu avatar caalador avatar diegosanzvi avatar gilberto-torrezan avatar haijian-vaadin avatar haiwan avatar haprog avatar jouni avatar legioth avatar magi42 avatar manolo avatar mehdi-vaadin avatar mikaelsu avatar mstahv avatar mvysny avatar ollitietavainenvaadin avatar pekam avatar platosha avatar pleku avatar ptdatkhtn avatar qtdzz avatar ruthstocks avatar shadikhani avatar someonetoignore avatar torok-peter avatar ujoni avatar zhesun88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flow-and-components-documentation's Issues

Avoid extending UI

There are some examples that are showing code that extend UI. These are no longer appropriate with the "new" router, and should thus be updated to show how things are done without a custom UI subclass. The cases are listed in this search listing.

tutorial-template-basic.html fixes needed for client side dependencies descriptions

Third blue info box of the page: https://vaadin.com/docs/v10/flow/polymer-templates/tutorial-template-basic.html

Is now

To get polymer-element.html into your project, you can use one of the ways provided by official Polymer page or use Maven plugins, such as frontend-maven-plugin

But probably should refer to webjars instead of frontend-maven-plugin? Since frontend-maven-plugin is used in Flow only for production builds. In pure client side projects (no Flow) frontend-maven-plugin might be used..

Add documentation on how to deploy a production mode Flow app to Tomcat via Eclipse Servers tab

Deploying a Vaadin app to Tomcat 8.0.x, 8.5.x and 9.0.x being built with production mode has some visual elements broken.

Steps to reproduce

  1. Download Beverage buddy from https://vaadin.com/start/v10-simple-ui
  2. Import it to Eclipse
  3. Download Tomcat and extract it
  4. Add Tomcat to Eclipse via the servers tab
  5. Add the app to deployment to Tomcat
  6. Double click server -> Open Launch Configuration -> Arguments -> Add to VM arguments -Dvaadin.productionMode
  7. Start up the server from servers tab.

Broken parts

When trying to start, you get the following exception and the app doesn't start.

java.lang.IllegalArgumentException: Unable to create an instance of 'com.vaadin.starter.beveragebuddy.ui.views.reviewslist.ReviewsList'. The constructor threw an exception.
	at com.vaadin.flow.internal.ReflectTools.createProxyInstance(ReflectTools.java:507)
	at com.vaadin.flow.internal.ReflectTools.createInstance(ReflectTools.java:444)
	at com.vaadin.flow.di.DefaultInstantiator.getOrCreate(DefaultInstantiator.java:64)
	at com.vaadin.flow.di.Instantiator.createRouteTarget(Instantiator.java:157)
	at com.vaadin.flow.router.internal.AbstractNavigationStateRenderer.lambda$getRouteTarget$1(AbstractNavigationStateRenderer.java:114)
	at java.util.Optional.orElseGet(Optional.java:267)
	at com.vaadin.flow.router.internal.AbstractNavigationStateRenderer.getRouteTarget(AbstractNavigationStateRenderer.java:113)
	at com.vaadin.flow.router.internal.AbstractNavigationStateRenderer.handle(AbstractNavigationStateRenderer.java:165)
	at com.vaadin.flow.router.Router.handleNavigation(Router.java:178)
	at com.vaadin.flow.router.Router.navigate(Router.java:150)
	at com.vaadin.flow.router.Router.initializeUI(Router.java:91)
	at com.vaadin.flow.component.UI.lambda$doInit$0(UI.java:205)
	at java.util.Optional.ifPresent(Optional.java:159)
	at com.vaadin.flow.component.UI.doInit(UI.java:205)
	at com.vaadin.flow.server.BootstrapHandler.createAndInitUI(BootstrapHandler.java:988)
	at com.vaadin.flow.server.BootstrapHandler.synchronizedHandleRequest(BootstrapHandler.java:388)
	at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40)
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1541)
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:345)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.vaadin.flow.internal.ReflectTools.createProxyInstance(ReflectTools.java:476)
	... 39 more
Caused by: java.lang.IllegalStateException: Can't find resource 'frontend://src/views/reviewslist/reviews-list.html' via the servlet context
	at com.vaadin.flow.component.polymertemplate.DefaultTemplateParser.getTemplateContent(DefaultTemplateParser.java:111)
	at com.vaadin.flow.component.polymertemplate.TemplateDataAnalyzer.parseTemplate(TemplateDataAnalyzer.java:180)
	at com.vaadin.flow.component.polymertemplate.TemplateInitializer.<init>(TemplateInitializer.java:91)
	at com.vaadin.flow.component.polymertemplate.PolymerTemplate.<init>(PolymerTemplate.java:78)
	at com.vaadin.flow.component.polymertemplate.PolymerTemplate.<init>(PolymerTemplate.java:93)
	at com.vaadin.starter.beveragebuddy.ui.views.reviewslist.ReviewsList.<init>(ReviewsList.java:78)
	... 44 more

```

Improve first "Migration Strategies" paragraph

Not sure what this part is supposed to look like (sentence end after 2022?), but this is confusing:

Staying with Vaadin Eight - it is Great! And supported at least until 2022 Using the upcoming Multiplatform Runtime from the Prime subscription to run views or components from a V8 app inside V10 for

...

Emphasize DataProvider tutorial in Grid tutorials

From DX testing Grid & DataProvider:
Writing custom implementation of DataProvider is hard without an example in the tutorial for Grid (no-one followed the link to DataProvider tutorial, probably it wasn’t prominent enough)

Acceptance Criteria

Need to make sure the correct parts of the data provider tutorials are highlighted in the corresponding parts of the Grid tutorials.
Another option is to somehow be able to merge these two different tutorial topics into one coherent tutorial. Or split into one journey that will introduce the listings (Grid, CompoBox etc.) and DataProviders together.

Clarification needed

Website feedback:
"Maybe i am the only one, but i am having a hard time understanding the Vaadin Flow localization documentation. What bothers me is the example given at the end:

public class MyLocale extends Div {

public MyLocale() {
    setText(getTranslation("my.translation", getUserId()));
}

}
I think it is unclear what the recommended way is for invoking the getTranslation() method.
Where does it come from? Am i supposed to inject the I18NProvider or does Vaadin somehow know where to invoke this method via the I18N provider property?

In Vaadin 8 i wrote a Singleton class for invoking I18N.get(String key) via static methods. This approach is very convenient for me and i would like to continue using that approach.

EDIT: I wrote an extra Singleton class now (just like i did with Vaadin 8) which gets my I18NProvider injected. That works fine, but i do not know if this is the way it is intended to be used. (?)"

Please also manage the website feedback issue:
vaadin/vaadin.com#33

improve the documentation for model property type coercion and value syncronization

As a developer I want to see clear documentation about which Java and JS types are supported in template model properties, how these types correspond to each other, and how the initial values of the synchronized properties are determined.

The documentation should answer the following questions:

  • When declaring a TemplateModel interface in Java, should I use primitive or boxed types (e.g. boolean or Boolean)? (answer: both ways are supported, but there are subtle differences)
  • What are the differences between using a primitive and a boxed type in a template model?
  • When defining a boolean property, should I use a different name for the property getter (isCheckboxChecked or getCheckboxChecked)?
  • How does Flow convert types between JS and Java for model properties?
    -- how a JS null is converted into a Java boolean / Boolean / int / Integer / etc
    -- how a JS undefined is converted into a Java boolean / Boolean / int / Integer / etc
  • How is the initial value of a model property determined?
    -- if a property is set on the server side, how is the value of that property visible to the client side code? (initial JS value would be undefined, then the server-set value will be delivered to the client)
    -- if a property is set on the client side, how is the value of that property visible to the server side cide?

At the moment (with the version 1.0.0.alpha20) the actual Flow behavior is confusing, and the docs are inconsistent. For example, the docs have examples for using both Boolean and boolean: https://github.com/vaadin/flow-and-components-documentation/search?l=AsciiDoc&q=Boolean&type=&utf8=%E2%9C%93

The actual behavior is confusing:

  • Boolean getCheckboxChecked(); --> java.lang.NullPointerException
  • boolean getCheckboxChecked(); --> OK
  • boolean isCheckboxChecked(); --> OK
  • Boolean isCheckboxChecked(); --> InvalidTemplateModelException: Template Model does not support: isModelProperty with return type: java.lang.Boolean with parameters.

See vaadin/flow#3556 for details.

What happened to Charts 5?

The migration documentation mentions differences between Charts 4 and Charts 6, without ever mentioning Charts 5. This makes the reader wonder whether there's a typo in the version number.

Missing Docs on how to support Internet Explorer 11

When building an addon using PolymerTemplate (or maybe even generally), by default the addon won't be able to run under IE 11.

  • This fact is I believe not mentioned in the documentation.
  • There is no documentation how to support IE 11.

Reintroduce Taking your App into Production docs

The documentation for taking your application to the prom oops production, was removed since it was in the wrong place.

We should reintroduce it, but make it better. There should be a new main level topic "Packaging for Production" with following proposed subtopics:

  1. Taking your Application into Production
  • Start with TL;DR: version
    • States the minimum things you need to have in pom.xml and how package for production by running mvn package -Dvaa...
  • Describe what the packaging does in more details, eg. transpilation and bundling
    • No details on how to customize anything, just on general level
  • Link to an example of this setup, like the project base.
  1. Customizing Bundling
  • How to configure and use fragments
  1. Advanced Topics
  • How to resolve issues
  • Any advanced customization points for the maven plugin, but in best case this should just link to the site produced by vaadin/flow#3903 and the configuration descriptions should have been added vaadin/flow#3547

Fix the documentation

Partially its done here:
#12

Still needs to be fixed because of changes related to Renderer refactoring.
Waits for Grid which depends on Renderer refactoring as well and docs depend on Grid.

Automatic Flow tests for OSGi

Similar task for FW: vaadin/framework#8594

Note that the implementation of the task in FW contains only smoke tests and also tests
custom GWT widgetset which is not applicable for Flow.

It would be nice to run the same tests in the flow-tests module in OSGi container.
At least flow-tests/test-root-context.

But I'm not sure whether it's possible.
At least smoke tests and test which validates all OSGi specific functionality implemented in Flow should be provided.

Improve “Including Style Sheets” docs

https://github.com/vaadin/flow-and-components-documentation/blob/master/documentation/importing-dependencies/tutorial-include-css.asciidoc

This document should include a warning about using a regular global stylesheet, as that can leak into components in polyfilled browsers.

For example, something like the following would most probably cause havoc in many components:

div {
  margin: 20px;
}

In addition, we should document how to included CSS that is correctly scoped in all browsers – basically, to create a HTML import that contains an import for custom-style.html (from Polymer) and then a <custom-style> declaration including the CSS you want to add.

Encourage users to import custom-style.html

The example (in Theming Crash Course) should encourage the user to import the custom-style.html from Polymer (when using <custom-style>).

Perhaps Flow always imports that, I don’t know. Lumo does import that, but for users who are not using Lumo, what happens?

App created in flow tutorial does not have a good filter text field

Flow tutorial mentions

As its name implies, the value change listener allows you to react to changes in the value contained in the text field. It is configured so that the event is fired lazily while the user is typing, when there is a small pause in the typing. This makes it perfect for this kind of automatic filtering.

If I'm not mistaken the tutorial creates a text field that applies value change in blur, which is not optimal for search field and not as advertised in tutorial.

Update documentation to use the new webjars examples

In some sections of our documentations (i.e. how to use webjars), we are giving an example of using the old webjars. As it is not supported anymore in flow, we should update the examples to use new webjars.

But on the other hand, should we mention the old way to publish the webjars and what will be the new way (Artur's script?? )? It is a little bit confusing for the users, as they cannot find the correct example from www.webjars.org (or maybe later, the website will update?)

we can following the process on -> webjars/webjars#1703

Cumbersome list and sentence structure

On https://vaadin.com/docs/v10/flow/theme/using-component-themes.html

The first list contains rules how a theme is selected. The last point is just a conclusion of the above, so it should not be contained in the list, but just a regular paragraph after the list (which is actually already there after the list).

Also, the sentence structure is cumbersome as an “if all are not”. Would probably be easier to understand as an “if none are” (since the “not“ is very disconnected from “all”).

If all the previous conditions are not met, no theme is used.
vs.
If none the previous conditions are met, no theme is used.

Prepare for V11

  • make a V10 branch
    • make branch protected
    • enable validation build, sonar, cla-assistant, etc. for the branch
    • be sure the Vcom team build from the V10 branch.
  • the master branch should still have the validation build it has now (!)
  • Add mention to both branches READMEs how the branches work, eg. master for V11 and V10 for V10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.