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

Nested Components not updating the child component #685

Closed
wants to merge 1 commit into from

Conversation

carvinlo
Copy link
Contributor

Nested Components not updating the child component

New Pull Request

For more information, see the CONTRIBUTING guide.

Prerequisites

Please make sure you can check the following boxes:

  • [x ] I have read the CONTRIBUTING document
  • [x ] My code follows the code style of this project
  • [x ] All new and existing tests passed

Type(s) of Changes

Contribution Type

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • [x ] Bug fix (non-breaking change which fixes an issue, please reference the issue id)
  • New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • I have updated the documentation accordingly
  • I have added tests to cover my changes

Description

[Place a meaningful description here]

Remarks

[Optionally place any follow-up comments, remarks, observations, or notes here for future reference]

Nested Components not updating the child component
Copy link


Error: Error while trying to collect info after merging patch-2 into develop.

Error: Command failed: yarn setup
lerna notice cli v6.6.2
lerna info ci enabled
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-aurelia/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-blazor/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-cycle/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-elm/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-ember/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-hyperapp/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-inferno/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-litel/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-million/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-mithril/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-ng/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-ngjs/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-preact/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-react-15/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-react/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-riot/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-solid/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-svelte/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-vue-3/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/converters/piral-vue/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/framework/piral-base/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/framework/piral-core/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/framework/piral/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/framework/siteless/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/initializers/create-pilet/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/initializers/create-piral-instance/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/pages/docs/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/pages/www/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-adal/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-auth/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-axios/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-breadcrumbs/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-configs/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-containers/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-dashboard/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-ext/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-feeds/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-fetch/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-forms/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-lazy/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-menu/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-modals/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-notifications/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-oauth2/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-oidc/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-page-layouts/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-redux/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-search/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-tracker/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-tracking/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-translate/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-update/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/plugins/piral-urql/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/samples/empty-piral/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/samples/minimal-piral/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/samples/sample-cross-fx/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/samples/sample-piral-core/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/samples/sample-piral/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/tooling/piral-cli-webpack5/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/tooling/piral-cli/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/tooling/publish-microfrontend/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/utilities/piral-debug-utils/node_modules
lerna info clean removing /home/runner/work/piral/piral/src/utilities/piral-hooks-utils/node_modules
lerna success clean finished
lerna notice cli v6.6.2
lerna info ci enabled
lerna info bootstrap root only
warning Resolution field "[email protected]" is incompatible with requested version "ws@^8.11.0"
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
warning Resolution field "[email protected]" is incompatible with requested version "ssri@^10.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "ssri@^10.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "ssri@^10.0.0"
warning Resolution field "[email protected]" is incompatible with requested version "ssri@^10.0.0"
warning Resolution field "[email protected]" is incompatible with requested version "ssri@^10.0.0"
warning Resolution field "[email protected]" is incompatible with requested version "ssri@^10.0.0"
warning Resolution field "[email protected]" is incompatible with requested version "ssri@^9.0.0"
warning Resolution field "[email protected]" is incompatible with requested version "ssri@^9.0.0"
warning Resolution field "[email protected]" is incompatible with requested version "ansi-regex@^6.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "tslib@^1.8.0"
warning Resolution field "[email protected]" is incompatible with requested version "tslib@^1.8.1"
warning Resolution field "[email protected]" is incompatible with requested version "tslib@^1.7.1"
warning Resolution field "[email protected]" is incompatible with requested version "postcss@^8.4.38"
warning Resolution field "[email protected]" is incompatible with requested version "rxjs@^6.4.0"
warning Resolution field "[email protected]" is incompatible with requested version "rxjs@^6.4.0"
warning Resolution field "[email protected]" is incompatible with requested version "tslib@^1.9.3"
warning Resolution field "[email protected]" is incompatible with requested version "postcss@^7.0.36"
warning Resolution field "[email protected]" is incompatible with requested version "ansi-regex@^4.1.0"
warning Resolution field "[email protected]" is incompatible with requested version "highlight.js@^11.3.1"
warning Resolution field "[email protected]" is incompatible with requested version "node-fetch@^1.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "ansi-regex@^3.0.0"
warning Resolution field "[email protected]" is incompatible with requested version "ws@^8.11.0"
warning " > @testing-library/[email protected]" has unmet peer dependency "react@^18.0.0".
warning " > @testing-library/[email protected]" has unmet peer dependency "react-dom@^18.0.0".
warning " > [email protected]" has unmet peer dependency "piral-ng-common@*".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-ng > @angular/[email protected]" has incorrect peer dependency "typescript@>=4.9.3 <5.2".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-ng > @angular/[email protected]" has unmet peer dependency "zone.js@~0.13.0".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-react-15 > [email protected]" has unmet peer dependency "react@^15.7.0".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/[email protected]" has unmet peer dependency "@pidoc/components@*".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/[email protected]" has unmet peer dependency "react@*".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/[email protected]" has unmet peer dependency "react-dom@*".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/[email protected]" has unmet peer dependency "react-router-dom@*".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > [email protected]" has unmet peer dependency "[email protected] - 3".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > [email protected]" has unmet peer dependency "popper.js@^1.16.1".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > [email protected]" has unmet peer dependency "react@>=16.3.0".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > [email protected]" has unmet peer dependency "react-dom@>=16.3.0".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-ember > ember-source > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-ember > ember-source > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-ember > ember-source > [email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/core > @pidoc/[email protected]" has unmet peer dependency "react@*".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/core > @pidoc/[email protected]" has unmet peer dependency "react-dom@*".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > piral-documentation-page > @pidoc/core > @pidoc/[email protected]" has unmet peer dependency "react-router-dom@*".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > reactstrap > [email protected]" has unmet peer dependency "[email protected] || ^15.0.0 || ^16.0.0 || ^17.0.0".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > reactstrap > [email protected]" has unmet peer dependency "react@>=16.6.0".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > reactstrap > [email protected]" has unmet peer dependency "react-dom@>=16.6.0".
warning "workspace-aggregator-b77e12ed-c6fd-44a8-9852-79eaf26e92fb > sample-piral > reactstrap > react-popper > @hypnosphi/[email protected]" has unmet peer dependency "react@>=0.14.0".
lerna notice cli v6.6.2
lerna info ci enabled
error Command failed with exit code 1.
error Command failed with exit code 1.
lerna ERR! yarn install --mutex network:42424 --non-interactive exited 1 in 'piral'
lerna ERR! yarn install --mutex network:42424 --non-interactive exited 1 in 'piral'
error Command failed with exit code 1.
error Command failed with exit code 1.

    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

Generated by @jsenv/file-size-impact during check-bundle-size#8642525903 on b4e36c1

// router added for backwards compatibility
const context = React.useMemo(
() => ({ publicPath: navigation.publicPath, navigation, router: navigation.router }),
[],
);
const innerProps = React.useMemo(() => ({ ...props, ...captured }), [props]);

React.useEffect(() => () => destroyPortal(id), none);
React.useEffect(() => () => destroyPortal(id), [props.children]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Sure you want to destroy the portal then? I don't think that makes sense here.

@@ -31,15 +31,15 @@ function wrapForeignComponent<T>(
) {
return React.memo((props: T) => {
const { destroyPortal, navigation } = useGlobalStateContext();
const id = React.useMemo(() => (portalIdBase++).toString(26), none);
const id = React.useMemo(() => (portalIdBase++).toString(26), [props.children]);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see why a change of props.children should have an impact on the id of the portal.

Maybe let's first have a MWE to reproduce the issue and then let's see what the root cause is / how to improve it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The situation is a bit complicated, but it does affect the update of components, resulting in abnormal rendering. I will show you this MWE later.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure - thanks for the efforts!

Copy link
Contributor

Choose a reason for hiding this comment

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

Any update on this? 1.5.3 is out and 1.5.4 is in the making.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. It is in processing, I'm using the develop branch to make the MWE.

Copy link
Contributor Author

@carvinlo carvinlo Apr 14, 2024

Choose a reason for hiding this comment

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

I need more time to review the details of my project, so I will close it for now and will reopen it when there is progress. It's most likely not the piral-core's problem, and sorry for this.

Copy link
Contributor

Choose a reason for hiding this comment

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

All good - just reopen / open an issue if we have a reproducible or can pin it down to Piral in any way.

@carvinlo carvinlo closed this Apr 14, 2024
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