Skip to content

Adds missing callback functions in container #4257

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

walmazacn
Copy link
Contributor

Description

Changes proposed in this pull request:

  • adds missing callback functions in container

Related issue(s)

Resolves #4249

@walmazacn walmazacn linked an issue Apr 15, 2025 that may be closed by this pull request
@walmazacn walmazacn marked this pull request as ready for review April 17, 2025 11:09
@JohannesDoberer JohannesDoberer self-assigned this Apr 22, 2025
Copy link
Contributor

@hardl hardl left a comment

Choose a reason for hiding this comment

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

there are still some missing callbacks, e.g. pathExist, getCurrentRoute, ...

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

Copy link
Contributor

@hardl hardl left a comment

Choose a reason for hiding this comment

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

Extending the e2e test setup to check the whole flows could help a lot.
See https://github.com/SAP/luigi/blob/main/container/cypress/e2e/test-app/iframe/iframe-container.cy.js,

LuigiClient.linkManager().getCurrentRoute();
,
LuigiClient.linkManager().pathExists('/projects/pr2');
,...

target.postMessage(
{
msg: LuigiInternalMessageID.SEND_PATH_EXISTS_ANSWER,
data: { exists }
Copy link
Contributor

Choose a reason for hiding this comment

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

correlationId in the data object is missing.
Take a look here
LuigiClient expects a correlationId to resolve the correct promise.

target.postMessage(
{
msg: LuigiInternalMessageID.SEND_CURRENT_ROUTE_ANSWER,
data: { route }
Copy link
Contributor

Choose a reason for hiding this comment

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

correlationId in the data object is missing.
Take a look here.

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.

In addition I think it would make sense that we extend the current function https://github.com/SAP/luigi/blob/main/container/test-app/iframe/microfrontend.html#L210
using the promise and add a corresponding e2e test.
Same for pathExists

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.

Container: add missing callback functions in container service
3 participants