-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support for Quarkus Web Bundler #876
Comments
Stupid thought, why not look at any |
Because all html files cannot be an user tag. Today only HTML files coming friom src/main/resources/templates/tags are considered as user tags. We need to flag HTML file as user tag to provide proper completion, validation, etc for user tag |
There is 99% chance that a file in You could probably use a list of directories we know for sure contains tags to fill the flag Map, then have a "best guess" flag Map with the other src/main/resoucres/**/*.html`. |
Today we consider that user tags comes from src/main/resources/templates/tags (it follows the behavior of Quarkus support for Qute).
We need to know if HTML file is an user tag or not because:
We need to follow the behavior of component like Quarkus Qute integration or Quarkus Web Bundler which register user tag with |
Ok that makes sense, then having a static list of path to look for is alright :) |
Today src/main/resources/templates is hard coded, but in this issue I would like to provide an extension point to contribute to Qute HTML paths. In the future if it will have new component (like Quarkus Web Bundler), it will be easy to contribute to manage new paths scanning. I think too we should provide an user settings to add custom paths to scan. |
We need to add web/templates folder to scan if Quarkus web bundler is on classpath, see @ia3andy comments at quarkusio/quarkus#37005 (comment) |
Support for https://github.com/quarkiverse/quarkus-web-bundler
If you open https://github.com/ia3andy/renotes/blob/98b21e4b465d49171f22e11296f6a1bc6ff0e75b/src/main/resources/templates/Notes/notes.html#L13
You see the unexpected error "No section helper found for
NoteSearch
.qute(UndefinedSectionTag)":It is because we don't scan the folder
https://github.com/ia3andy/renotes/tree/main/src/main/resources/web/components
which contains user tags (like NoteSearch).According my understand
Quarkus Web Bundler scans the
web/components
folder to collect all HTML files. Seehttps://github.com/quarkiverse/quarkus-web-bundler/blob/dccfa84afdea9479678dd9fa761a2ba9d4706598/deployment/src/main/java/io/quarkiverse/web/bundler/deployment/WebAssetsScannerProcessor.java#L88
After that all collected HTML files are registered as Qute user tags. See https://github.com/quarkiverse/quarkus-web-bundler/blob/dccfa84afdea9479678dd9fa761a2ba9d4706598/runtime/src/main/java/io/quarkiverse/web/bundler/runtime/qute/WebAssetsQuteEngineObserver.java#L48
It seems that the
web
folder root can be custumized with application.properties https://github.com/quarkiverse/quarkus-web-bundler/blob/dccfa84afdea9479678dd9fa761a2ba9d4706598/deployment/src/main/java/io/quarkiverse/web/bundler/deployment/WebBundlerConfig.java#L25 We could start to hard coding this web root folder withweb
//cc @ia3andy is it correct?
The text was updated successfully, but these errors were encountered: