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

[Extension Proposal] Qute Web #35739

Closed
ia3andy opened this issue Sep 5, 2023 · 40 comments
Closed

[Extension Proposal] Qute Web #35739

ia3andy opened this issue Sep 5, 2023 · 40 comments
Labels
area/quarkiverse This issue/PR is part of the Quarkiverse organization area/qute The template engine kind/extension-proposal Discuss and Propose new extensions

Comments

@ia3andy
Copy link
Contributor

ia3andy commented Sep 5, 2023

Description

As discussed on this topic https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Make.20Qute.20Server.20Page.20part.20of.20RESTEasy.20Qute

It would be good for the Qute Web story to introduce Qute Web (in Quarkus Core) in the place of Qute Server Page.

The idea would be to have:

  • Qute (templating)
  • Qute Web (templating for the web, if there is a template in templates/web serve it like currently done in QSP (/ by default, with priority over static resources)
  • If you add RESTEasy or RR then its Qute counterpart comes alongside it using conditional dependencies (and hide them from tooling)

This way for the end user "Qute Web" becomes the only extension to use Qute for the Web, whether or not you want to use it with a bean Resource (which requires RESTEasy [R] anyway).

Repository name

quarkus-qute-web

Short description

Qute for the Web

@ia3andy ia3andy added kind/extension-proposal Discuss and Propose new extensions area/quarkiverse This issue/PR is part of the Quarkiverse organization labels Sep 5, 2023
@quarkus-bot quarkus-bot bot added the area/qute The template engine label Sep 5, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 5, 2023

/cc @mkouba (qute)

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 5, 2023

You added a link to a Zulip discussion, please make sure the description of the issue is comprehensive and doesn't require accessing Zulip

This message is automatically generated by a bot.

@maxandersen
Copy link
Member

why do you want this in quarkus core repo? or is it some other core you are referring to?

@ia3andy
Copy link
Contributor Author

ia3andy commented Sep 5, 2023

why do you want this in quarkus core repo? or is it some other core you are referring to?

I believe we don't really have the choice as Qute RESTEasy [R] are in core?

@ia3andy
Copy link
Contributor Author

ia3andy commented Sep 5, 2023

why do you want this in quarkus core repo? or is it some other core you are referring to?

I believe we don't really have the choice as Qute RESTEasy [R] are in core?

@maxandersen Aw sorry I meant part of the platform, the actual repository location doesn't matter.

@ia3andy
Copy link
Contributor Author

ia3andy commented Sep 29, 2023

@mkouba how could we plan this? I could help if needed? I think it's very important as part of the Quarkus Fullstack/Web story.

@mkouba
Copy link
Contributor

mkouba commented Oct 2, 2023

Hm, but if I understand it correctly the functionality described above is basically the same as in quarkus-qute-server-pages, except the default value for quarkus.qsp.hidden-templates which would be "everything but /web/*"?

If you add RESTEasy or RR then its Qute counterpart comes alongside it using conditional dependencies (and hide them from tooling)

Do you want the pages in /web/* to coexist with RR endpoints?

Maybe we could just rename the quarkus-qute-server-pages extension and change the defaults?

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

@mkouba yes that's pretty much it (and the conditional deps), we also have to put Qute Web in the platform @maxandersen @aloubyansky it should be ok right?

Do you want the pages in /web/* to coexist with RR endpoints?

Yes that's what I do in Quinoa, maybe we could allow to configure which one has priority (I didn't in Quinoa)

@mkouba
Copy link
Contributor

mkouba commented Oct 11, 2023

and the conditional deps...

So if RR is present then add quarkus-resteasy-reactive-qute automatically, right?

Yes that's what I do in Quinoa, maybe we could allow to configure which one has priority (I didn't in Quinoa)

This is also configurable with the quarkus.qsp.route-order config property.

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

and the conditional deps...

So if RR is present then add quarkus-resteasy-reactive-qute automatically, right?

Yes and the same for RC

Yes that's what I do in Quinoa, maybe we could allow to configure which one has priority (I didn't in Quinoa)

This is also configurable with the quarkus.qsp.route-order config property.

Awesome!

I need to add the same in Quinoa

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

Let me know if I can help..

@mkouba mkouba changed the title Qute Web [Extension Proposal] Qute Web Oct 11, 2023
@mkouba
Copy link
Contributor

mkouba commented Oct 11, 2023

This is also configurable with the quarkus.qsp.route-order config property.

I need to add the same in Quinoa

@ia3andy The problem is that this config property is fixed at build time. So you can't use the RunTimeConfigurationDefaultBuildItem... I wonder if there's a way to set the default value of a build time config property from a different extension?

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

I mean I need to add a new similar config quarkus.quinoa.route-order for Quinoa.

Also you might need to rename the config prefix if we rename the extension

@mkouba
Copy link
Contributor

mkouba commented Oct 11, 2023

Ok, so I think that "adapting" the quarkus-qute-server-pages extension would be the best way.

To sum it up, we would:

  • rename the groupId from io.quarkiverse.quteserverpages to io.quarkiverse.quteweb
  • rename the artifactId from quarkus-qute-server-pages to quarkus-qute-web
  • rename the config prefix from quarkus.qsp to quarkus.qute-web
  • modify the defaults for:
    • root-path from /qsp to /
    • hidden-templates from tags/.* to something like ^(?!web/).*
  • add conditional dependencies for quarkus-resteasy-reactive-qute and quarkus-resteasy-qute

@gastaldi I guess that it would be easier to create a new quarkiverse repository instead of modifying the existing one?

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

I think for the conditional dependencies, having qute-web in the platform is necessary (for RR/RC versions sync)

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

@gastaldi what is the procedure to have an extension added in the platform? How does the Quarkus platform bom version sync happen?

@mkouba
Copy link
Contributor

mkouba commented Oct 11, 2023

I think for the conditional dependencies, having qute-web in the platform is necessary (for RR/RC versions sync)

According to https://quarkus.io/guides/conditional-extension-dependencies the version is not necessary. But maybe I'm missing something...

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

@mkouba for the groupId maybe io.quarkiverse.qute.web or just io.quarkiverse.qute?

@gastaldi would that be a problem? 👆

@gastaldi
Copy link
Contributor

@gastaldi I guess that it would be easier to create a new quarkiverse repository instead of modifying the existing one?

I think renaming is better given it will automatically redirect old URLs to the new one. We can rename the repository and the teams here: https://github.com/quarkiverse/quarkiverse-devops/blob/main/terraform-scripts/quarkus-qute-server-pages.tf#L3 (keeping the quarkus_qute_server_pages ID though in the script - which is not really a big deal)

@mkouba for the groupId maybe io.quarkiverse.qute.web or just io.quarkiverse.qute?

@gastaldi would that be a problem? 👆

No, not a problem, that's up to you guys to decide 😉

@mkouba
Copy link
Contributor

mkouba commented Oct 11, 2023

@gastaldi I guess that it would be easier to create a new quarkiverse repository instead of modifying the existing one?

I think renaming is better given it will automatically redirect old URLs to the new one. We can rename the repository and the teams here: https://github.com/quarkiverse/quarkiverse-devops/blob/main/terraform-scripts/quarkus-qute-server-pages.tf#L3 (keeping the quarkus_qute_server_pages ID though in the script - which is not really a big deal)

Would I be able to perform a bugfix release for quarkus-qute-server-pages 2.x afterwards?

@gastaldi
Copy link
Contributor

Yes, it should still work

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

Maybe we should also move those to the quarkiverse?

They could be in qute-web as a multi extensions repo?

Once that's done (qute-web), we should mark them as unlisted in the metadata.

@mkouba
Copy link
Contributor

mkouba commented Oct 11, 2023

Maybe we should also move those to the quarkiverse?

* https://github.com/quarkusio/quarkus/tree/main/extensions/resteasy-classic/resteasy-qute

* https://github.com/quarkusio/quarkus/tree/main/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute

They could be in qute-web as a multi extensions repo?

Once that's done (qute-web), we should mark them as unlisted in the metadata.

I don't think it's a good idea... at least I don't see any benefit.

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

@mkouba any specific reason?

@mkouba
Copy link
Contributor

mkouba commented Oct 11, 2023

@mkouba any specific reason?

Breaks compatibility for no reason?

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

@mkouba AFAIK this is what we did for everything we moved to quarkiverse (right @gsmet ?)

@mkouba
Copy link
Contributor

mkouba commented Oct 11, 2023

@mkouba AFAIK this is what we did for everything we moved to quarkiverse (right @gsmet ?)

Hm, but we're not moving anything since quarkus-qute-server-pages is a quarkiverse project already...

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 11, 2023

@mkouba AFAIK this is what we did for everything we moved to quarkiverse (right @gsmet ?)

Hm, but we're not moving anything since quarkus-qute-server-pages is a quarkiverse project already...

I mean when we created the Quarkiverse we moved a lot of extension from core (which stayed in the platform for some of them) without real reason beside clearing core.

@mkouba
Copy link
Contributor

mkouba commented Oct 11, 2023

@mkouba AFAIK this is what we did for everything we moved to quarkiverse (right @gsmet ?)

Hm, but we're not moving anything since quarkus-qute-server-pages is a quarkiverse project already...

I mean when we created the Quarkiverse we moved a lot of extension from core (which stayed in the platform for some of them) without real reason beside clearing core.

I see. But since qute, RR and RC are part of the core I don't see a reason why to move the integration bits (two maven modules) into quarkiverse.

@aloubyansky
Copy link
Member

We moved extensions out of core in a new major release though and kept relocations for a long time. It has to be thought out.

Conditional dependencies do not depend on extensions being in a platform or not.

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 13, 2023

cc @fbricon @angelozerr

@ia3andy
Copy link
Contributor Author

ia3andy commented Nov 6, 2023

@mkouba any update on this?

@mkouba
Copy link
Contributor

mkouba commented Nov 9, 2023

@ia3andy No update yet. So let's sum it up once again:

If we agree on this ^ then I can start to work on it tomorrow.

@ia3andy
Copy link
Contributor Author

ia3andy commented Nov 9, 2023

Perfect (AFAIK) @gastaldi could you add your rocket to it?

@mkouba
Copy link
Contributor

mkouba commented Nov 10, 2023

FYI: quarkiverse/quarkus-qute-web#49

@gastaldi
Copy link
Contributor

I've created quarkiverse/quarkiverse-devops#189 to perform the repository rename.

@mkouba Feel free to review and merge it when you feel necessary

mkouba added a commit to mkouba/quarkus-qute-server-pages that referenced this issue Nov 10, 2023
- related to quarkusio/quarkus#35739
- rename the groupId from io.quarkiverse.quteserverpages to
io.quarkiverse.qute.web
- rename the artifactId from quarkus-qute-server-pages to
quarkus-qute-web
- rename the package from io.quarkiverse.quteserverpages to
io.quarkiverse.qute.web
- rename the config prefix from quarkus.qsp to quarkus.qute-web
- rename class names with "Qsp" prefix to use the prefix "QuteWeb"
- convert config to ConfigMapping
- introduce new config property: web-templates-dir; defaulted to "web"
- changed the default value for root-path to "/"
- changed the default value for hidden-templates; no templates are
hidden
- rename the "qsp:" namespace to "http:"
@mkouba
Copy link
Contributor

mkouba commented Nov 10, 2023

FTR I've created quarkiverse/quarkus-qute-web#51 for the conditional dependencies feature.

I'm not so sure about this one:

mark quarkus-resteasy-reactive-qute and quarkus-resteasy-qute as unlisted in the metadata (see https://github.com/quarkusio/quarkus/blob/main/extensions/arc/runtime/src/main/resources/META-INF/quarkus-extension.yaml#L15)

Mostly because quarkiverse is not part of the "platform" (at least in the code.quarkus.io UI) and so qute-web is not visible by default.

Other than that I think that we can close this issue.

@ia3andy
Copy link
Contributor Author

ia3andy commented Nov 10, 2023

FTR I've created quarkiverse/quarkus-qute-web#51 for the conditional dependencies feature.

I'm not so sure about this one:

mark quarkus-resteasy-reactive-qute and quarkus-resteasy-qute as unlisted in the metadata (see https://github.com/quarkusio/quarkus/blob/main/extensions/arc/runtime/src/main/resources/META-INF/quarkus-extension.yaml#L15)

Mostly because quarkiverse is not part of the "platform" (at least in the code.quarkus.io UI) and so qute-web is not visible by default.

Other than that I think that we can close this issue.

I think we should add qute-web to the platform

@ia3andy
Copy link
Contributor Author

ia3andy commented Nov 10, 2023

I've created for what's remaining #37000

@ia3andy ia3andy closed this as completed Nov 10, 2023
@mkouba
Copy link
Contributor

mkouba commented Nov 10, 2023

I've created for what's remaining #37000

Thanks. What a nice issue number ;-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quarkiverse This issue/PR is part of the Quarkiverse organization area/qute The template engine kind/extension-proposal Discuss and Propose new extensions
Projects
None yet
Development

No branches or pull requests

5 participants