Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented May 14, 2025

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:
Buggy

Fixed:
Fixed

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this May 14, 2025
@odeimaiz odeimaiz added bug buggy, it does not work as expected a:frontend issue affecting the front-end (area group) labels May 14, 2025
@odeimaiz odeimaiz added this to the Bazinga! milestone May 14, 2025
@sonarqubecloud
Copy link

@odeimaiz odeimaiz changed the title 🐛 [Frontend] Fix: e2e too quick 🐛 [Frontend] Fix: Templates listing May 14, 2025
@odeimaiz odeimaiz marked this pull request as ready for review May 14, 2025 10:50
@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label May 14, 2025
Copy link
Contributor

Copilot AI left a 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;

@odeimaiz
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented May 14, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 0fb45a9

@mergify mergify bot merged commit 0fb45a9 into ITISFoundation:master May 14, 2025
59 checks passed
@odeimaiz odeimaiz deleted the fix/e2e-to-quick branch May 14, 2025 11:21
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 6, 2025
92 tasks
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:frontend issue affecting the front-end (area group) bug buggy, it does not work as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants