-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 [Frontend] Hide template used to register function #7886
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] Hide template used to register function #7886
Conversation
|
wvangeit
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 @odeimaiz
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 hides the function-registration template by default and adds custom metadata to it, while also updating the resources API to support these changes.
- Adds a
hidden: trueflag when publishing templates andhidden: falsewhen copying studies - Introduces
__updateTemplateMetadatato patch project metadata before registering the function - Extends
osparc.data.Resourceswith ahiddenURL parameter and anupdateMetadataPATCH endpoint
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| services/static-webserver/client/source/class/osparc/study/CreateFunction.js | Mark template as hidden, split creation into metadata update and function registration |
| services/static-webserver/client/source/class/osparc/desktop/MainPage.js | Pass hidden: false when copying a study to a new template |
| services/static-webserver/client/source/class/osparc/data/Resources.js | Add hidden query param to postToTemplate and define updateMetadata endpoint |
Comments suppressed due to low confidence (3)
services/static-webserver/client/source/class/osparc/study/CreateFunction.js:315
- [nitpick] The custom metadata key
hiddenoverlaps with the template creation flag. Consider renaming this field to clarify its purpose (e.g.,template_descriptionormetadata_note).
"hidden": "Base template for function"
services/static-webserver/client/source/class/osparc/study/CreateFunction.js:290
- The new
hiddenflag on template creation and theupdateMetadataworkflow lack corresponding unit or integration tests. Consider adding tests to verify both behaviors.
"hidden": true,
services/static-webserver/client/source/class/osparc/study/CreateFunction.js:312
- [nitpick] This method would benefit from a brief JSDoc comment explaining its responsibility, parameters, and any important side effects.
__updateTemplateMetadata: function(templateData) {
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
services/static-webserver/client/source/class/osparc/desktop/MainPage.js
Show resolved
Hide resolved
|
@Mergifyio queue |
🟠 Waiting for conditions to match
|



What do these changes do?
As discussed, this PR hides the template that is used to register a function and adds some
project_metadatato it.Related issue/s
How to test
Dev-ops