Skip to content

Refactor render method to add config for wrapper element #1888 - #1889

Merged
pmi merged 2 commits into
masterfrom
issue-1888
Aug 15, 2025
Merged

pmi merged 2 commits into
masterfrom
issue-1888

Conversation

@pmi

@pmi pmi commented Aug 14, 2025

Copy link
Copy Markdown
Member

No description provided.

@pmi
pmi requested a review from Copilot August 14, 2025 14:35
@pmi pmi linked an issue Aug 14, 2025 that may be closed by this pull request
@codecov

codecov Bot commented Aug 14, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.06%. Comparing base (ca15395) to head (c08f2f5).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1889   +/-   ##
=======================================
  Coverage   61.06%   61.06%           
=======================================
  Files           9        9           
  Lines         226      226           
  Branches       19       19           
=======================================
  Hits          138      138           
  Misses         88       88           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds a new wrapper configuration option to the render method that controls whether a wrapper element is generated when rendering React components. This allows developers to disable automatic wrapper generation when not needed.

  • Adds wrapper parameter to the render method chain to control wrapper element generation
  • Updates type definitions to include the new wrapper parameter
  • Refactors the renderTargetContainer method to handle the wrapper configuration with cleaner conditional logic

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/resources/lib/enonic/react4xp/types/React4xp.ts Adds wrapper parameter to renderBody interface
src/main/resources/lib/enonic/react4xp/React4xp/methods/renderTargetContainer.ts Refactors logic to use wrapper parameter and simplifies conditional flow
src/main/resources/lib/enonic/react4xp/React4xp/methods/renderSSRIntoContainer.ts Passes wrapper parameter through to renderTargetContainer
src/main/resources/lib/enonic/react4xp/React4xp/methods/renderBody.ts Passes wrapper parameter through the render chain
src/main/resources/lib/enonic/react4xp/React4xp.ts Adds wrapper parameter to render options interface

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/main/resources/lib/enonic/react4xp/React4xp/methods/renderSSRIntoContainer.ts Outdated
…SSRIntoContainer.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pmi
pmi merged commit eb411a5 into master Aug 15, 2025
5 checks passed
@pmi
pmi deleted the issue-1888 branch August 15, 2025 08:42
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.

Refactor render method to add config for wrapper element

3 participants