-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 [Frontend] Create Function: Do not allow registering functions without exposing 1 input AND 1 output #8412
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
Conversation
…ore into enh/function-checks
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
Refactors the function creation validation logic to require both inputs AND outputs instead of inputs OR outputs, with improved UI feedback for disabled states.
- Moved
isPotentialFunctionfromosparc.study.Utilstoosparc.study.CreateFunctionwith updated logic requiring both parameters and probes - Added validation in
__createFunctionto check for exposed inputs and outputs before proceeding - Created reusable tooltip utility for disabled widgets to improve user experience
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/static-webserver/client/source/class/osparc/utils/Utils.js | Added toolTipTextOnDisabledWidget utility function for consistent tooltip handling |
| services/static-webserver/client/source/class/osparc/study/Utils.js | Removed isPotentialFunction method (moved to CreateFunction class) |
| services/static-webserver/client/source/class/osparc/study/CreateFunction.js | Added static methods including updated isPotentialFunction logic and validation functions |
| services/static-webserver/client/source/class/osparc/form/renderer/PropForm.js | Refactored to use new tooltip utility function |
| services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js | Updated to use new isPotentialFunction location and added disabled state handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
services/static-webserver/client/source/class/osparc/study/CreateFunction.js
Show resolved
Hide resolved
services/static-webserver/client/source/class/osparc/study/CreateFunction.js
Show resolved
Hide resolved
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.
👍
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 @odeimaiz
🧪 CI InsightsHere's what we observed from your CI run for 662401f. 🟢 All jobs passed!But CI Insights is watching 👀 |
|
|
Please retry analysis of this Pull-Request directly on SonarQube Cloud |



What do these changes do?
This PR implements Function Creation validation logic to require both inputs AND outputs to be exposed. It also updates the
isPotentialFunctionto expect both, input(s) AND output(s). If the project is not "Funcionable" instead of hiding the button, it's now disabled and it shows a tooltip explaining why it's disabled.Related issue/s
How to test
Dev-ops