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

Templates with multiple @JsModule fails when they are in random order #5591

Closed
manolo opened this issue May 1, 2019 · 1 comment · Fixed by #6067
Closed

Templates with multiple @JsModule fails when they are in random order #5591

manolo opened this issue May 1, 2019 · 1 comment · Fixed by #6067

Comments

@manolo
Copy link
Member

manolo commented May 1, 2019

When flow computes the template content using the stats.json file it gets the source of the first @JsModule annotation in the class

For instance this fails because @vaadin/vaadin-grid/src/vaadin-grid-column-group.js is taken:

@Tag("templated-columns")
@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-column-group.html")
@HtmlImport("src/templated-columns.html")
@JsModule("@vaadin/vaadin-grid/src/vaadin-grid-column-group.js")
@JsModule("src/templated-columns.js")
public class TemplatedColumnsPage extends PolymerTemplate<TemplateModel> {

Otherwise this works taking src/templated-columns.jscontent

@JsModule("src/templated-columns.js")
@Tag("templated-columns")
@HtmlImport("frontend://bower_components/vaadin-grid/src/vaadin-grid-column-group.html")
@HtmlImport("src/templated-columns.html")
@JsModule("src/templated-columns.js")
@JsModule("@vaadin/vaadin-grid/src/vaadin-grid-column-group.js")
public class TemplatedColumnsPage extends PolymerTemplate<TemplateModel> {
@ujoni
Copy link
Contributor

ujoni commented Jun 24, 2019

Acceptance criteria

  • Users can put @JsModule annotations in any order
  • The annotation's file name needs to match the name provided by @Tag annotation
    • @JsModule("src/templated-columns.js") + @Tag("templated-columns")
    • If this is not a convention in P3, documentation needs to be updated to highlight this requirement

@mehdi-vaadin mehdi-vaadin moved this from Product backlog to Iteration Backlog in OLD Vaadin Flow ongoing work (Vaadin 10+) Jul 10, 2019
@denis-anisimov denis-anisimov self-assigned this Jul 12, 2019
@project-bot project-bot bot moved this from Iteration Backlog to In progress in OLD Vaadin Flow ongoing work (Vaadin 10+) Jul 12, 2019
@denis-anisimov denis-anisimov moved this from In progress to Review in progress in OLD Vaadin Flow ongoing work (Vaadin 10+) Jul 15, 2019
OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from Review in progress to Done - pending release Jul 16, 2019
@denis-anisimov denis-anisimov added this to the V14 milestone Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
OLD Vaadin Flow ongoing work (Vaadin ...
  
Done - pending release
Development

Successfully merging a pull request may close this issue.

4 participants