Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace string-substituted fragment composition with one typed component model. Calls such as
<ui:feature props="${feature}">bind an explicit Kotlin/Java contract, and default/named slots retain the caller's lexical scope. Definitions are checked independently; unknown attributes/slots, missing required slots, incompatible or nullable props, and recursive composition fail compilation.This is deliberately breaking:
th:fragment,th:replace,th:insert,th:include, the old expander, and the old Gradle option are removed. There is no compatibility path. The example and catalog benchmark are migrated; ReAI, Eteo and Utin remain on their existing versions for separate evaluation and migration.COMPONENTS.md contains the full contract, implementation rationale, migration steps, limitations and raw benchmark links. Props are whole Kotlin/Java models so construction, defaults and enum checking stay in the host language. Components and slots compile to direct writes without runtime lookup, markup closures or browser wrappers.
Validation:
./gradlew clean build, final./gradlew build, example startup and built-in browser verification, and temporary positive/negative compiler/rendering checks covering Kotlin and Java records, nested slot forwarding, scope isolation, escaping, URLs and partitioned renderers. English and Norwegian catalog output is byte-for-byte identical. Synthetic linking measured 41–43% faster with 38–42% less allocation; this excludes independent type validation and is not a whole-build claim. Catalog rendering remains effectively unchanged (7.91 vs 7.95 µs, identical allocation).