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 context update bug #1953

Merged
merged 21 commits into from
Mar 31, 2021
Merged

Fix context update bug #1953

merged 21 commits into from
Mar 31, 2021

Conversation

ndricimrr
Copy link
Contributor

@ndricimrr ndricimrr commented Mar 26, 2021

Description
Navigating inside of a micro-frontend (ex: Angular based) using its internal angular routing is facilitated using withoutSync. However, even though the navigation is successfully prevented with this function, there seems to be no context update upon internal navigation.

Changes

  • Have the Core send a message to the iframe when withoutSync is activated. An additional withoutSync parameter is added. The rest of the message body is the same.
  • Catch the event message on the Client side in the lifecycle manager and handle it differently if withoutSync is activated:
    • Omit navigation if withoutSync is present
    • Add extra parameters to the context as useful information for the virtualTree structure

How to test

  1. Open e2e-test-application and navigate to projects/pr2/developers
  2. Click the withoutSync link and check the console for Context Changed print outs.
  3. A context update event is fired and the printed context should have pathParams and viewUrl as properties.

Related issue(s)
Fixes #1940

@ndricimrr ndricimrr added the bug Something isn't working label Mar 26, 2021
@ndricimrr ndricimrr added this to the Sprint 18 milestone Mar 26, 2021
@ndricimrr ndricimrr added the WIP Work in progress label Mar 26, 2021
@JohannesDoberer JohannesDoberer self-assigned this Mar 29, 2021
@ndricimrr ndricimrr removed the WIP Work in progress label Mar 30, 2021
Copy link
Contributor

@JohannesDoberer JohannesDoberer left a comment

Choose a reason for hiding this comment

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

LGTM!

@ndricimrr ndricimrr merged commit a9b451f into SAP:master Mar 31, 2021
@ndricimrr ndricimrr deleted the fix-context-update-bug branch March 31, 2021 15:07
@ndricimrr ndricimrr mentioned this pull request Apr 1, 2021
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
context was not being updated when navigating with withoutSync enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

contextUpdate event is not sent to micro frontends when navigating internally using withoutSync
2 participants