- 
                Notifications
    
You must be signed in to change notification settings  - Fork 32
 
🎨 [Frontend] Enh: Publish and Template in different sections #7674
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] Enh: Publish and Template in different sections #7674
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 splits the existing "Publish Template" section into two distinct sections: one for publishing projects and one for creating templates. Key changes include modifying the SaveAsTemplate module to support a new flag for public publishing, updating UI labels in both the study and share modules, and refactoring the dashboard to expose separate pages for publish and template actions.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description | 
|---|---|
| services/static-webserver/client/source/class/osparc/study/SaveAsTemplate.js | Modified constructor and layout to support a new makeItPublic parameter; renamed publish button logic accordingly. | 
| services/static-webserver/client/source/class/osparc/share/ShareTemplateWith.js | Updated text labels to better describe sharing options. | 
| services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js | Split the existing save-as-template page into two pages (__getPublishPage and __getCreateTemplatePage) with corresponding label and id updates. | 
Comments suppressed due to low confidence (3)
services/static-webserver/client/source/class/osparc/study/SaveAsTemplate.js:143
- [nitpick] Consider renaming the method getPublishTemplateButton (which returns __createTemplateBtn) to a name that reflects its dual purpose (e.g., getActionButton) to avoid confusion between the 'Publish' and 'Create Template' actions.
 
return this.__createTemplateBtn;
services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js:788
- [nitpick] Consider updating the page id to better reflect its purpose (for example, changing it to 'Template') since the functionality now differentiates between publishing and creating a template.
 
const id = "SaveAsTemplate";
services/static-webserver/client/source/class/osparc/study/SaveAsTemplate.js:134
- [nitpick] Consider renaming the 'publishTemplate' event to a name that encompasses both actions (such as 'templateAction') to reduce ambiguity between publishing and template creation.
 
this.fireDataEvent("publishTemplate", {
…-simcore into enh/publish-and-template
| 
           @Mergifyio queue  | 
    
          
 ✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 5ff7809  | 
    
          
 | 
    
| 
           Please retry analysis of this Pull-Request directly on SonarQube Cloud  | 
    



What do these changes do?
In this PR, the "Publish Template" sections gets split into two sections: yes, into "Publish" and "Template".
The difference is that, now, all users will be able to Publish (share with everyone) their own Projects (templates) and also create templates that can be shared.
Related issue/s
How to test
Dev-ops