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

Unify Flow and Hilla plugins and dependencies #18466

Closed
mshabarov opened this issue Jan 16, 2024 · 7 comments
Closed

Unify Flow and Hilla plugins and dependencies #18466

mshabarov opened this issue Jan 16, 2024 · 7 comments

Comments

@mshabarov
Copy link
Contributor

mshabarov commented Jan 16, 2024

Describe your motivation

A hybrid application nowadays requires developers to set the Hilla-originated dependencies in the pom.xml, e.g:

  • hilla-maven-plugin (and Gradle plugin as well)
  • hilla-react-spring-boot-starter and hilla-spring-boot-starter
  • hilla-bom and vaadin-bom
  • hilla-react and hilla-lit

These are confusing, hard to maintain and a subject of unification.

Describe the solution you'd like

A hybrid application (using Hilla and Flow views/components) should have only Vaadin-originated dependencies

Possible solutions:

  • Might be enough to set hilla-react-spring-boot-starter as a dependency of vaadin-spring-boot-starter
  • The two maven plugins should be combined into a single plugin. Might be easiest to just rename hilla-maven-plugin to vaadin-maven-plugin since it does to my knowledge cover everything currently covered by vaadin-maven-plugin in addition to the stuff specific to Hilla.
  • vaadin-maven-plugin after merging with the hilla-maven-plugin should still use the pre-compiled bundles for pure Flow apps. The expected output is that it would see that the Hilla deps are in the classpath and always force the hot deploy mode. That have to be changed (maybe by just removing this logic).

Additional Context

See the discussion in Slack.

@manolo
Copy link
Member

manolo commented Jan 16, 2024

But hilla-maven-plugin has different code base to flow-maven-plugin which is the same than vaadin-maven-plugin, so we need somehow to have a mechanism to have both aligned

@knoobie
Copy link
Contributor

knoobie commented Jan 16, 2024

Might be enough to set hilla-react-spring-boot-starter as a dependency of vaadin-spring-boot-starter

Please don't bloat the default module; react should be opt-in and not the default for flow apps.

@tarekoraby
Copy link
Contributor

@knoobie, we understand the concern. It's super important to us, too, that Flow apps stay sleek and efficient. And we'll do our best to ensure that adding React won't weigh things down.

Having said that, we also see React as a cool opportunity to give the Vaadin community more options for building awesome web apps. In our view, enabling React support by default for Flow users is an essential component of making Vaadin appealing to a wider audience. It's a bit of a balancing act, and we will do our best to keep things as light and nimble as possible for pure Java developers.

@Legioth
Copy link
Member

Legioth commented Jan 17, 2024

Two additional things to mention:

  • We want to have React Router used by default so that you won't get subtle changes in how routing works just because you add a (React) Hilla view to the application.
  • There should be an option to exclude React even if it's included by default.

@knoobie
Copy link
Contributor

knoobie commented Jan 17, 2024

Yeah, I've noticed the React Router in the other PR. I've come to terms with it, because it removes the vaadin-router - which doesn't look like it gets much love ;)

Like in the past with Vaadin Connect; it should be possible to exclude hilla-* from vaadin-core and the whole application should work. (yes, React Router can stay)

@Legioth
Copy link
Member

Legioth commented Jan 17, 2024

it should be possible to exclude hilla-* from vaadin-core and the whole application should work. (yes, React Router can stay)

That is indeed the plan.

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

No branches or pull requests

5 participants