Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented May 23, 2025

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:

{
  "type": "openFunction",
  "message": {
    "functionId": {function_id}
  }
}

ListenToOpenFunction

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz added this to the Bazinga! milestone May 23, 2025
@odeimaiz odeimaiz self-assigned this May 23, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels May 23, 2025
@odeimaiz odeimaiz marked this pull request as ready for review May 23, 2025 07:54
Copy link
Contributor

Copilot AI left a 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)

@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label May 23, 2025
@odeimaiz
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented May 23, 2025

queue

🛑 The pull request has been synchronized by a user

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

👀

@mergify
Copy link
Contributor

mergify bot commented May 23, 2025

This pull request has been removed from the queue for the following reason: pull request manually updated.

The pull request #7741 has been manually updated.

If you want to requeue this pull request, you can post a @mergifyio requeue comment.

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

thanks

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

🪄

@odeimaiz
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented May 23, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at e5ef303

@sonarqubecloud
Copy link

@mergify mergify bot merged commit e5ef303 into ITISFoundation:master May 23, 2025
59 checks passed
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 6, 2025
92 tasks
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:frontend issue affecting the front-end (area group) t:enhancement Improvement or request on an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot edit pricing unit in frontend

6 participants