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

[sitecore-jss-react] ErrorBoundary nested components fix #1799

Merged

Conversation

yavorsk
Copy link
Contributor

@yavorsk yavorsk commented May 20, 2024

Description / Motivation

This PR is a follow up to #1786 . It aims to fix an issue in the case where parent component is being used with withPlaceholder HOC and references its child components' props (this issue was caught in automated rendering tests for styleguide tabs component); since each child component is wrapped by ErrorBoundary, this adds additional level of nesting and changes the way parent should access its children's props; this is solved by exposing components props inside the error boundary.
This PR also:

  • renames ErrorBoundary's customErrorComponent prop;
  • updates failing Placeholder unit test to not select ErrorBoundary and check only html elements;

Testing Details

  • Unit Test Added
  • Manual Test/Other (Please elaborate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

yavorsk added 2 commits May 17, 2024 18:06
…ey are referenced by parent component; rename errorComponent property in error boundary; adjust unit tests
@yavorsk yavorsk requested a review from a team May 20, 2024 06:41
Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@illiakovalenko illiakovalenko merged commit a3c6340 into dev May 20, 2024
1 check passed
@illiakovalenko illiakovalenko deleted the feature/jss-100-error-boundary-nested-components-fix branch May 20, 2024 13:36
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.

2 participants