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

fix(react): improve resolving component types #583

Merged

Conversation

dwirz
Copy link
Contributor

@dwirz dwirz commented Dec 23, 2024

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally for affected output targets
  • Tests (npm test) were run locally and passed
  • Prettier (npm run prettier) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

There are still some cases where resolving the correct types fails, which results in warnings and, occasionally, incorrectly rendered content.

Issue URL: #561

What is the new behavior?

Resolve component types correctly also for nested and lazy components.

Does this introduce a breaking change?

  • Yes
  • No

Other information

I’ve added some new components and new tests to the Next.js example project to verify that the generated HTML includes the expected Declarative Shadow DOM.

@dwirz dwirz requested review from a team as code owners December 23, 2024 09:59
@christian-bromann
Copy link
Member

@dwirz thanks for raising the PR, let me take a look at this after Christmas 😉

@dwirz
Copy link
Contributor Author

dwirz commented Dec 24, 2024

No worries, thanks a lot for your time and review. Happy Christmas 🙂

btw somehow the toMatchSnapshot does fail in the CI but was working locally, do I miss something?

@christian-bromann
Copy link
Member

btw somehow the toMatchSnapshot does fail in the CI but was working locally, do I miss something?

No, this may be related to webdriverio/webdriverio#14011

@dwirz dwirz force-pushed the fix/use-same-logic-to-resolve-sub-type branch from 0474a7c to 08ad3b5 Compare December 26, 2024 09:42
@dwirz
Copy link
Contributor Author

dwirz commented Dec 26, 2024

@christian-bromann My bad! I renamed the test but forgot to update the snapshots, so the names ended up misaligned. 🤦‍♂️

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

Awesome stuff, thanks so much 🙏

@christian-bromann christian-bromann merged commit 971f219 into ionic-team:main Dec 26, 2024
3 checks passed
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