-
Notifications
You must be signed in to change notification settings - Fork 32
✨ [Frontend] Listen to openFunction iframe's message
#7741
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
✨ [Frontend] Listen to openFunction iframe's message
#7741
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new "openFunction" message handler in the PersistentIframe widget to open function/template details and adds a corresponding fetchTemplate method in the Templates store.
- Added a new case "openFunction" in PersistentIframe.js to handle iframe messages.
- Implemented fetchTemplate in Templates.js to retrieve function/template data via an API call.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| services/static-webserver/client/source/class/osparc/widget/PersistentIframe.js | Introduces the "openFunction" case to fetch template data and display resource details. |
| services/static-webserver/client/source/class/osparc/store/Templates.js | Adds a fetchTemplate method to perform an API call (using the "studies" resource) for retrieving template data. |
Comments suppressed due to low confidence (2)
services/static-webserver/client/source/class/osparc/widget/PersistentIframe.js:334
- [nitpick] The variable is named 'templateId' even though it is sourced from 'functionId'. Consider renaming it to 'functionId' or adjusting the field reference for clarity and consistency.
const templateId = data["message"]["functionId"];
services/static-webserver/client/source/class/osparc/store/Templates.js:52
- [nitpick] The method 'fetchTemplate' is using the 'studies' resource endpoint, which might be inconsistent with the intended purpose of fetching template data. Verify that the correct resource endpoint is used.
return osparc.data.Resources.fetch("studies", "getOne", params)
|
@Mergifyio queue |
🛑 The pull request has been synchronized by a user |
pcrespov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
…imcore into enh/open-template-info
|
This pull request has been removed from the queue for the following reason: The pull request #7741 has been manually updated. If you want to requeue this pull request, you can post a |
sanderegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
GitHK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🪄
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at e5ef303 |
|



What do these changes do?
The MetaModeling service might want to pop up some Function (template) information.
In this PR, the iframe handler listens to messages with the following structure:
Related issue/s
How to test
Dev-ops