refactor: rebrand hydration components as <Island>#447
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the hydration system by introducing a new Island component that replaces the existing HydrateInBrowser and RenderInBrowser components. The refactoring consolidates hydration functionality into a single, more flexible component following the Island Architecture paradigm.
- Introduces the new
Islandcomponent with comprehensive TypeScript typing and flexible hydration modes - Deprecates
HydrateInBrowserandRenderInBrowsercomponents while maintaining backward compatibility - Updates client-side hydration logic to use a unified DOM marker (
jsm-island) and simplified client-only detection
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| javascript-modules-library/src/components/render/Island.tsx | New comprehensive Island component implementation with complex TypeScript generics |
| javascript-modules-library/src/components/render/RenderInBrowser.tsx | Deprecated component now delegates to Island with clientOnly flag |
| javascript-modules-library/src/components/render/HydrateInBrowser.tsx | Deprecated component now delegates to Island without clientOnly flag |
| javascript-modules-library/src/components/render/internal/InBrowser.tsx | Removed internal implementation replaced by Island |
| javascript-modules-engine/src/client-javascript/react/index.tsx | Updated client hydration logic to use new DOM markers and detection |
| javascript-modules-library/tsconfig.json | Added verbatimModuleSyntax TypeScript option |
| Multiple test and example files | Updated to use new Island component API |
javascript-modules-engine/src/client-javascript/react/index.tsx
Outdated
Show resolved
Hide resolved
GauBen
commented
Aug 8, 2025
baptistegrimaud
approved these changes
Aug 11, 2025
Co-authored-by: Baptiste Grimaud <bgrimaud@jahia.com>
Co-authored-by: Baptiste Grimaud <bgrimaud@jahia.com>
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.
Description
Closes #251
Checklist
Source code
Tests
Tip
Documentation to guide the reviews: How to do a code review