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-nextjs] Placeholder applies the modifyComponentProps prop. #1668

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Adamduehansen
Copy link

@Adamduehansen Adamduehansen commented Nov 18, 2023

Description / Motivation

The Placeholder component in the "nextjs package" does not apply the modifyComponentProps when given. Instead, the component adds its own implementation of modifyComponentProps that it provides to the Placeholder component from the "react package". The component needs to also apply the modifyComponentProps property as well.

Testing Details

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

I tried to add a unit test but I lack knowledge of how Enzyme works. When I attempt to call mount on the Placeholder component it fails with the message Cannot read properties of null (reading 'useContext'). All other tests seem to have no problems though.

So far I tested this solution by modifying the module files inside the node_modules folder of my particular project.

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)

@Adamduehansen Adamduehansen changed the title [Next.js] Placeholder Applies the modifyComponentProps prop. [packages-jss-nextjs] Placeholder Applies the modifyComponentProps prop. Nov 18, 2023
@Adamduehansen Adamduehansen changed the title [packages-jss-nextjs] Placeholder Applies the modifyComponentProps prop. [sitecore-jss-nextjs] Placeholder Applies the modifyComponentProps prop. Nov 18, 2023
@Adamduehansen Adamduehansen changed the title [sitecore-jss-nextjs] Placeholder Applies the modifyComponentProps prop. [sitecore-jss-nextjs] Placeholder applies the modifyComponentProps prop. Nov 18, 2023
@illiakovalenko illiakovalenko added the backlog Issue/PR/discussion is reviewed and added to backlog for the further work label Nov 20, 2023
@illiakovalenko
Copy link
Contributor

@Adamduehansen Thank you for submitting your contribution! I've added a ticket containing all the details, which has been added to our internal backlog for thorough review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issue/PR/discussion is reviewed and added to backlog for the further work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants