-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 [Frontend] Fix: Disabled actions in Project's menu #7808
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] Fix: Disabled actions in Project's menu #7808
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 fixes an issue with Project menu actions by ensuring that metadata for services is correctly evaluated, especially for projects containing services not in their latest version. Key changes include the removal of the HoverMenuButton, renaming functions and method calls for better clarity (e.g. getCantExecuteServices to getCantReadServices), and updates to the service caching and menu handling logic.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| services/static-webserver/client/source/class/osparc/ui/form/HoverMenuButton.js | Entire file removal; ensure that this widget is no longer needed |
| services/static-webserver/client/source/class/osparc/study/Utils.js | Renamed getCantExecuteServices to getCantReadServices for improved clarity |
| services/static-webserver/client/source/class/osparc/store/Services.js | Updated extra type info functions and service caching logic; potential undefined ref issue |
| services/static-webserver/client/source/class/osparc/product/Utils.js | Renamed export-related and menu functions for consistent behavior |
| services/static-webserver/client/source/class/osparc/navigation/StudyTitleWOptions.js | Adjusted menu item logic for pipeline conversion and removal of restore item |
| services/static-webserver/client/source/class/osparc/metadata/ServicesInStudyUpdate.js | Updated usage of service access function (renamed) |
| services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js | Wrapped new menu button addition conditions and updated export function names |
| services/static-webserver/client/source/class/osparc/dashboard/ListButtonItem.js | Removed _applyMenu override; verify menu handling is correctly delegated |
| services/static-webserver/client/source/class/osparc/dashboard/GridButtonItem.js | Removed _applyMenu override; verify menu handling is correctly delegated |
| services/static-webserver/client/source/class/osparc/dashboard/CardBase.js | Changed _applyMenu from throwing an error to a concrete implementation |
Comments suppressed due to low confidence (3)
services/static-webserver/client/source/class/osparc/study/Utils.js:297
- [nitpick] The function is renamed from getCantExecuteServices to getCantReadServices, yet it still filters based on the 'execute' property. Consider updating the filtering logic or renaming the function to accurately reflect the checked access right.
getCantReadServices: function(studyServices = []) {
services/static-webserver/client/source/class/osparc/dashboard/CardBase.js:988
- [nitpick] The abstract _applyMenu method has been replaced with a concrete implementation. Ensure that all subclasses that previously relied on the abstract error throw are updated to accommodate this new behavior.
_applyMenu: function(menu) {
services/static-webserver/client/source/class/osparc/store/Services.js:397
- The variable 'value' is referenced but not defined in __addServiceToCache. Replace 'value' with 'service' to ensure the correct object is cached.
console.log("don't save", this.__servicesCached[key][version], value);
…iz/osparc-simcore into fix/reevaluate-study-menu-buttons
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 3d8ae69 |
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!
|



What do these changes do?
Spotted by @sanderegg
In order to
OpenorDuplicatea project, the frontend needs to know the metadata of the services in it. If these are "unknown", it will disable those actions.A few weeks ago there was a big refactoring of when and how much metadata of a service and its history is fetched. As a side effect, if your project contains a service which is not in its latest version, you can be affected by this bug.
Buggy (first the buttons are disabled, when the card is opening more info is fetched and they get enabled):

Fixed:

Related issue/s
How to test
Dev-ops