Skip to content

addNodeParams reloads whole iframe, should only change url #4255

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
JJPandari opened this issue Apr 15, 2025 · 0 comments
Open

addNodeParams reloads whole iframe, should only change url #4255

JJPandari opened this issue Apr 15, 2025 · 0 comments
Assignees

Comments

@JJPandari
Copy link

Description

I have an extension on hyperspace portal, which is a react app, plugged into the portal as an iframe, communicating with the portal using Luigi: https://portal.hyperspace.tools.sap/projects/sf-demo-ext/components/sf-demo-ext-ui/sf-ring-deployment

I use addNodeParams to add some params to the url of the hosting website, and this function not only update the url, but also reloads the whole iframe.

Expected result

visit the extension, you can see "Service Version" combobox. Select a version in it, the version should be updated to current url, which is working, but also the whole extension/iframe is reloaded when you select, which is unwanted. As a react app, my extension will rerender data in the page, but labels like "Service Version", "Quality Status" will remain unchanged.

Actual result

When selected a new version, the whole page blinks/reloads, while as a react app it should only rerender charts, tables, not the whole page.

Steps to reproduce

(See the expected result and actual result sections)

Troubleshooting

This unwanted reload behavior happens after I add a addNodeParams call to update the url. Looking at that function's implementation, I can see it essentially does a window.history.pushState, and a LuigiConfig.configChanged(). pushState should only change the url, but never reload the page, I suspect configChanged reloads the whole iframe.

@JohannesDoberer JohannesDoberer self-assigned this Apr 22, 2025
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

No branches or pull requests

2 participants