Skip to content

Qute Server Side Components Not Discovered #1040

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

Open
akil-rails opened this issue Jan 9, 2025 · 5 comments
Open

Qute Server Side Components Not Discovered #1040

akil-rails opened this issue Jan 9, 2025 · 5 comments

Comments

@akil-rails
Copy link

akil-rails commented Jan 9, 2025

As per the qute guide, , user defined tags are automatically registered when placed under template/tags, and this works fine.

As per the quarkus-web-bunlder guide, qute components can be placed under src/main/resources/web/components/[name], this also works

The quarkus extension for vs-code however complains for 'missing section helper' when the quarkus-web-bundler guide's conventions are followed (it works when the qute-reference convention is followed) .. Is something to be done to let vscode extension know about these?

image image

Steps to reproduce:


1. clone from https://github.com/akil-rails/watch
2. open vscode, and you will see errors
3. quarkus dev, the application will start

Original discussion - quarkusio/quarkus#45246

Reproducer - https://github.com/akil-rails/watch

@angelozerr

@angelozerr
Copy link
Contributor

Thanks @akil-rails for having reported the issue.

To fix this ussue we need to:

  • add : "src/main/resources/web/components/"

in

private static final String[] TEMPLATES_BASE_DIRS = { "src/main/resources/web/templates/" };

  • manage a new rule which consider that "src/main/resources/web/components/[name]" should be considered as a section. @ia3andy can we consider that as user tag or it is an another feature?

@ia3andy
Copy link

ia3andy commented Mar 26, 2025

It's not that easy as it seems, the web-component dir is configurable by the user :-/

Not sure how we could fix this...

@angelozerr
Copy link
Contributor

It's not that easy as it seems, the web-component dir is configurable by the user :-/

Not sure how we could fix this...

It is the same thing for roq application and we hard code those default path.

To support user configuration we will need to read application.properties, and we will need to track changes of this file

@ia3andy
Copy link

ia3andy commented Mar 26, 2025

Then we should do this, because it's 100% configured:
https://docs.quarkiverse.io/quarkus-web-bundler/dev/advanced-guides.html#qute-components

quarkus.web-bundler.bundle.components=true
quarkus.web-bundler.bundle.components.key=main 
quarkus.web-bundler.bundle.components.qute-tags=true 

qute-tags is the trigger

the dir is src/main/resources/web/components, it can be multiple dirs, and also the dir can be edited:

quarkus.web-bundler.bundle.components=true
quarkus.web-bundler.bundle.components.key=main 
quarkus.web-bundler.bundle.components.dir=foo 
quarkus.web-bundler.bundle.components.qute-tags=true 

@angelozerr
Copy link
Contributor

Thanks @ia3andy for yourclarification! It is not a trivial issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants