-
Notifications
You must be signed in to change notification settings - Fork 169
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
Parse html import dependencies and add them as dependencies via UIInternals #3568
Conversation
Reviewed 11 of 11 files at r1. flow-server/src/main/java/com/vaadin/flow/component/internal/ComponentMetaData.java, line 79 at r1 (raw file):
You could store the URIs as unmodifiable collection right in the constructor, so you wouldn't need to build a new collection every time flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 85 at r1 (raw file):
"return the root uri and return" ? What does it mean? flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java, line 785 at r1 (raw file):
This lambda inside lamba has become a bit ugly. Could refactor by using flatMap or extract to a method. flow-server/src/test/java/com/vaadin/flow/component/internal/HtmlDependencyParserTest.java, line 94 at r1 (raw file):
Should it consider closing tags ( flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/template/ThemedTemplateIT.java, line 78 at r1 (raw file):
Missing space between Comments from Reviewable |
Review status: all files reviewed at latest revision, 6 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 96 at r1 (raw file):
What about webJars? flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 106 at r1 (raw file):
Do we actually want to delve deeper and deeper based on the found links? As now for a import containing a vaadin button reference (src version) we would delve and parse:
etc. etc. flow-server/src/test/java/com/vaadin/flow/component/internal/HtmlDependencyParserTest.java, line 94 at r1 (raw file): Previously, gilberto-torrezan (Gilberto Torrezan) wrote…
Comments from Reviewable |
Review status: all files reviewed at latest revision, 7 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/component/internal/ComponentMetaData.java, line 79 at r1 (raw file): Previously, gilberto-torrezan (Gilberto Torrezan) wrote…
Done. flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 85 at r1 (raw file): Previously, gilberto-torrezan (Gilberto Torrezan) wrote…
Outdated comment. flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 96 at r1 (raw file): Previously, caalador wrote…
What about them ? flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 106 at r1 (raw file): Previously, caalador wrote…
I don't know. Yes, in many cases it has no sense especially for the our web components where we just know that there is no reason to go deeply. But why there can't be a situation when some file (it doesn't even have to be a component) imports other file which imports other file and all of them should be styled. flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java, line 785 at r1 (raw file): Previously, gilberto-torrezan (Gilberto Torrezan) wrote…
flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/template/ThemedTemplateIT.java, line 78 at r1 (raw file): Previously, gilberto-torrezan (Gilberto Torrezan) wrote…
Done. Comments from Reviewable |
|
||
return parsedDocument.getElementsByTag("link").stream() | ||
.filter(link -> link.hasAttr("rel") && link.hasAttr("href")) | ||
.filter(link -> link.attr("rel").equals("import")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r2. flow-server/src/test/java/com/vaadin/flow/component/internal/HtmlDependencyParserTest.java, line 94 at r1 (raw file): Previously, caalador wrote…
Oddly enough, Comments from Reviewable |
Review status: all files reviewed at latest revision, 5 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 106 at r1 (raw file): Previously, denis-anisimov (Denis) wrote…
Then we should at least have a cache for checked as running through the polymer-element stack many times is a bit useless and will start creating lots of overhead (think bakery, storefront.html has that at least 5 times through refrences, probably even more) Comments from Reviewable |
Review status: all files reviewed at latest revision, 5 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 96 at r1 (raw file): Previously, denis-anisimov (Denis) wrote…
If you want to parse a html inside a webjar then you wont get it this way as the path is wrong. Comments from Reviewable |
Review status: all files reviewed at latest revision, 5 unresolved discussions, some commit checks broke. flow-server/src/test/java/com/vaadin/flow/component/internal/HtmlDependencyParserTest.java, line 94 at r1 (raw file): Previously, gilberto-torrezan (Gilberto Torrezan) wrote…
Is it really important? Comments from Reviewable |
Review status: all files reviewed at latest revision, 5 unresolved discussions, some commit checks broke. flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 96 at r1 (raw file): Previously, caalador wrote…
One thing to note is that there is a chance that we don't have a Comments from Reviewable |
Review status: 10 of 13 files reviewed at latest revision, 5 unresolved discussions. flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 96 at r1 (raw file): Previously, caalador wrote…
Tests will be broken most likely, need jaavdocs, but does it work correctly now ? flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 106 at r1 (raw file): Previously, caalador wrote…
Will need to take care about this. Comments from Reviewable |
Reviewed 2 of 3 files at r3. flow-server/src/main/java/com/vaadin/flow/component/internal/HtmlDependencyParser.java, line 96 at r1 (raw file): Previously, denis-anisimov (Denis) wrote…
Yes this should now handle things as expected. flow-server/src/main/java/com/vaadin/flow/server/VaadinServlet.java, line 662 at r3 (raw file):
By default we usually first test servletContext and the webJars as servlet context is simpler. flow-server/src/main/java/com/vaadin/flow/server/VaadinServlet.java, line 667 at r3 (raw file):
here you could just use Comments from Reviewable |
Review status: 12 of 13 files reviewed at latest revision, 5 unresolved discussions, some commit checks failed. flow-server/src/main/java/com/vaadin/flow/server/VaadinServlet.java, line 662 at r3 (raw file): Previously, caalador wrote…
I've changed the logic to be able to gather URLs so that they can be cached. flow-server/src/main/java/com/vaadin/flow/server/VaadinServlet.java, line 667 at r3 (raw file): Previously, caalador wrote…
Done. Comments from Reviewable |
Reviewed 4 of 5 files at r4, 1 of 1 files at r5. Comments from Reviewable |
Reviewed 2 of 2 files at r6. Comments from Reviewable |
SonarQube analysis reported 37 issues Watch the comments in this conversation to review them. Top 10 extra issuesNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
Fix for #3479
This change is