-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 [Frontend] Fix: Templates listing #7673
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
|
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 a lazy-load bug for templates by ensuring that services are properly tagged and that the aliasing logic is updated to reflect the deprecation of the old service alias. Key changes include:
- Setting the "resourceType" property on service objects in the cache.
- Updating the aliasing logic in Utils.js to use "app" instead of "service."
- Enhancing the Dashboard component with a new "preResourcesLoaded" event and guarded resource initialization.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| services/static-webserver/client/source/class/osparc/store/Services.js | Adds a "resourceType" property to service objects before caching. |
| services/static-webserver/client/source/class/osparc/product/Utils.js | Deprecates the service alias in favor of the app alias in resource type mapping. |
| services/static-webserver/client/source/class/osparc/dashboard/SearchBarFilter.js | Updates label generation to use a pre-computed resource alias variable. |
| services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js | Introduces a "preResourcesLoaded" event and adjusts resource initialization based on load state. |
Comments suppressed due to low confidence (1)
services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js:188
- [nitpick] Consider renaming the variable 'preResourcesLoaded' to a more descriptive name such as 'hasPreResourcesLoaded' to improve clarity.
let preResourcesLoaded = false;
services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js
Show resolved
Hide resolved
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 0fb45a9 |



What do these changes do?
In the lazy-load of templates a bug was introduced, the switching and lazy loading of templates would only work after the services were fetched. This issue was detected by the wpt-exposure e2e test and this PR fixes it.
Buggy:

Fixed:

Related issue/s
How to test
Dev-ops