Skip to content

Conversation

@GauBen
Copy link
Member

@GauBen GauBen commented Aug 7, 2025

Description

Closes #251

Checklist

Source code

  • I've shared and documented any breaking change
  • I've reviewed and updated the jahia-depends

Tests

  • I've provided Unit and/or Integration Tests
  • I've updated the parent issue with required manual validations

Tip

Documentation to guide the reviews: How to do a code review

@GauBen GauBen self-assigned this Aug 7, 2025
Copilot AI review requested due to automatic review settings August 7, 2025 11:12
@GauBen GauBen requested a review from a team as a code owner August 7, 2025 11:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Island component with comprehensive TypeScript typing and flexible hydration modes
  • Deprecates HydrateInBrowser and RenderInBrowser components 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

GauBen and others added 4 commits August 12, 2025 09:33
Co-authored-by: Baptiste Grimaud <bgrimaud@jahia.com>
Co-authored-by: Baptiste Grimaud <bgrimaud@jahia.com>
@GauBen GauBen enabled auto-merge (squash) August 12, 2025 08:18
@GauBen GauBen merged commit 5eab218 into main Aug 12, 2025
12 checks passed
@GauBen GauBen deleted the refactor/island branch August 12, 2025 08:20
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

Successfully merging this pull request may close these issues.

More consistent and meaningful naming for rendering

3 participants