-
Notifications
You must be signed in to change notification settings - Fork 76
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
Initial render issues due to dynamic import of custom elements in calcite-components-react #8143
Closed
2 of 5 tasks
Labels
4 - verified
Issues that have been released and confirmed resolved.
breaking change
Issues and pull requests with code changes that are not backwards compatible.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
Calcite (dev)
Issues logged by Calcite developers.
calcite-components-react
Issues specific to the @esri/calcite-components-react package.
Milestone
Comments
benelan
added
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
0 - new
New issues that need assignment.
needs triage
Planning workflow - pending design/dev review.
labels
Nov 8, 2023
github-actions
bot
added
Calcite (dev)
Issues logged by Calcite developers.
p3 - want for upcoming milestone
calcite-components-react
Issues specific to the @esri/calcite-components-react package.
labels
Nov 8, 2023
benelan
added
2 - in development
Issues that are actively being worked on.
and removed
0 - new
New issues that need assignment.
labels
Nov 15, 2023
benelan
added
the
breaking change
Issues and pull requests with code changes that are not backwards compatible.
label
Nov 21, 2023
benelan
added a commit
that referenced
this issue
Nov 22, 2023
…ender issues (#8248) **Related Issue:** #8143 ## Summary The `ReferenceError: navigator is not defined` error is still present in Stencil v4 when removing the patch. Disabled [`includeImportCustomElements`](https://stenciljs.com/docs/react#includeimportcustomelements) for now while we investigate an alternative fix that doesn't cause initial render issues. BREAKING CHANGE: Disabled `includeImportCustomElements`. Make sure to import components from `@esri/calcite-components` in addition to the react wrappers. For example, the first code snippet in #7185 is now required, or else the custom elements will not be defined on the window.
benelan
added a commit
that referenced
this issue
Nov 23, 2023
…ender issues (#8248) **Related Issue:** #8143 ## Summary The `ReferenceError: navigator is not defined` error is still present in Stencil v4 when removing the patch. Disabled [`includeImportCustomElements`](https://stenciljs.com/docs/react#includeimportcustomelements) for now while we investigate an alternative fix that doesn't cause initial render issues. BREAKING CHANGE: Disabled `includeImportCustomElements`. Make sure to import components from `@esri/calcite-components` in addition to the react wrappers. For example, the first code snippet in #7185 is now required, or else the custom elements will not be defined on the window.
geospatialem
added
3 - installed
Issues that have been merged to master branch and are ready for final confirmation.
and removed
2 - in development
Issues that are actively being worked on.
needs triage
Planning workflow - pending design/dev review.
labels
Nov 27, 2023
Installed and assigned for verification. |
benelan
added a commit
that referenced
this issue
Nov 29, 2023
…ender issues (#8248) **Related Issue:** #8143 ## Summary The `ReferenceError: navigator is not defined` error is still present in Stencil v4 when removing the patch. Disabled [`includeImportCustomElements`](https://stenciljs.com/docs/react#includeimportcustomelements) for now while we investigate an alternative fix that doesn't cause initial render issues. BREAKING CHANGE: Disabled `includeImportCustomElements`. Make sure to import components from `@esri/calcite-components` in addition to the react wrappers. For example, the first code snippet in #7185 is now required, or else the custom elements will not be defined on the window.
Verified on code sandbox |
4 tasks
DitwanP
added
4 - verified
Issues that have been released and confirmed resolved.
and removed
3 - installed
Issues that have been merged to master branch and are ready for final confirmation.
labels
Nov 29, 2023
benelan
added a commit
that referenced
this issue
Dec 1, 2023
…ender issues (#8248) **Related Issue:** #8143 ## Summary The `ReferenceError: navigator is not defined` error is still present in Stencil v4 when removing the patch. Disabled [`includeImportCustomElements`](https://stenciljs.com/docs/react#includeimportcustomelements) for now while we investigate an alternative fix that doesn't cause initial render issues. BREAKING CHANGE: Disabled `includeImportCustomElements`. Make sure to import components from `@esri/calcite-components` in addition to the react wrappers. For example, the first code snippet in #7185 is now required, or else the custom elements will not be defined on the window.
benelan
added a commit
that referenced
this issue
Dec 1, 2023
…ender issues (#8248) **Related Issue:** #8143 ## Summary The `ReferenceError: navigator is not defined` error is still present in Stencil v4 when removing the patch. Disabled [`includeImportCustomElements`](https://stenciljs.com/docs/react#includeimportcustomelements) for now while we investigate an alternative fix that doesn't cause initial render issues. BREAKING CHANGE: Disabled `includeImportCustomElements`. Make sure to import components from `@esri/calcite-components` in addition to the react wrappers. For example, the first code snippet in #7185 is now required, or else the custom elements will not be defined on the window.
benelan
added a commit
that referenced
this issue
Dec 2, 2023
…ender issues (#8248) **Related Issue:** #8143 ## Summary The `ReferenceError: navigator is not defined` error is still present in Stencil v4 when removing the patch. Disabled [`includeImportCustomElements`](https://stenciljs.com/docs/react#includeimportcustomelements) for now while we investigate an alternative fix that doesn't cause initial render issues. BREAKING CHANGE: Disabled `includeImportCustomElements`. Make sure to import components from `@esri/calcite-components` in addition to the react wrappers. For example, the first code snippet in #7185 is now required, or else the custom elements will not be defined on the window.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
4 - verified
Issues that have been released and confirmed resolved.
breaking change
Issues and pull requests with code changes that are not backwards compatible.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
Calcite (dev)
Issues logged by Calcite developers.
calcite-components-react
Issues specific to the @esri/calcite-components-react package.
Check existing issues
Actual Behavior
Some initial render issues have popped up that I traced back to the patch created in #7521. The patch uses a dynamic import to ensure the custom elements are not defined on the server, which causes errors. This may be an issue on Stencil's end, where they need to force a VDOM rerender when the components are hydrated.
The current workaround is to import/define the custom elements in addition to the react components. This was the only possible behavior until
@esri/calcite-components-react@v1.5.0
, when we enabledincludeImportCustomElements
. See #7185 for examples.Expected Behavior
I expect one of the following:
includeImportCustomElements
. This means we would likely need to remove the patch and find a new solution for the SSR build errors brought up in Calcite React tests fail in vitest #7486 and Error using calcite components in Gatsby site during server-side rendering #7493. We should do additional testing after build(deps)!: bump Stencil to v4 #8108 is installed, because Stencil may have resolved the issues on their end in the new versions.includeImportCustomElements
to prevent confusion and buggy behavior. This would be a breaking change.Reproduction Sample
https://codesandbox.io/p/sandbox/calcite-components-react-hm5rwn?file=%2Fsrc%2FApp.tsx%3A5%2C74
Reproduction Steps
0
even though the internal state is50
. The banana icon at the end of the title also didn't render initially.Reproduction Version
1.10.0
Relevant Info
No response
Regression?
No response
Priority impact
p3 - want for upcoming milestone
Impact
No response
Calcite package
Esri team
Calcite (dev)
The text was updated successfully, but these errors were encountered: