Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented May 16, 2025

What do these changes do?

  • Use template_type filter
  • Cache Hypertools and use cachedPromise
  • Cache Tutorials and use cachedPromise
  • Filter public and non-public Templates in the frontend
  • Let testers patch the template type

TemplateTypes

Related issue/s

How to test

Dev-ops

@codecov
Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 73.68421% with 10 lines in your changes missing coverage. Please review.

Project coverage is 87.21%. Comparing base (b86f633) to head (44cf984).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7690      +/-   ##
==========================================
- Coverage   87.57%   87.21%   -0.36%     
==========================================
  Files        1804     1559     -245     
  Lines       70181    62206    -7975     
  Branches     1137      608     -529     
==========================================
- Hits        61462    54254    -7208     
+ Misses       8409     7789     -620     
+ Partials      310      163     -147     
Flag Coverage Δ
integrationtests 64.39% <56.25%> (-0.11%) ⬇️
unittests 86.30% <73.68%> (-0.50%) ⬇️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 93.09% <100.00%> (+<0.01%) ⬆️
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.58% <100.00%> (ø)
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.66% <ø> (ø)
agent 96.46% <ø> (ø)
api_server 91.60% <ø> (ø)
autoscaling 96.08% <ø> (ø)
catalog 92.64% <ø> (ø)
clusters_keeper 99.25% <ø> (ø)
dask_sidecar 89.86% <ø> (ø)
datcore_adapter 98.12% <ø> (ø)
director 76.80% <ø> (ø)
director_v2 91.12% <ø> (-0.03%) ⬇️
dynamic_scheduler 96.76% <ø> (ø)
dynamic_sidecar 90.15% <ø> (ø)
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
payments 92.63% <ø> (ø)
resource_usage_tracker 89.02% <ø> (ø)
storage 87.56% <ø> (+0.07%) ⬆️
webclient ∅ <ø> (∅)
webserver 80.71% <68.75%> (-5.17%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b86f633...44cf984. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@odeimaiz odeimaiz self-assigned this May 16, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels May 16, 2025
@odeimaiz odeimaiz added this to the Bazinga! milestone May 16, 2025
@odeimaiz odeimaiz marked this pull request as ready for review May 16, 2025 14:06
@odeimaiz odeimaiz changed the title 🎨 [Frontend] Filter template types 🎨 [Frontend] Filter and patch template types May 16, 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 pull request refactors and extends the handling of template types by replacing legacy template methods with new ones for tutorials and hypertools while also modifying UI components to support the changes. Key updates include:

  • Removal of legacy template functions from the store and corresponding updates in NotificationUI and StudyLarge.
  • Renaming and refactoring of components and methods to handle Tutorials and Hypertools (e.g. TutorialsList, NewStudies, AppBrowser).
  • Endpoint and controller updates to support new filtering and caching mechanisms for template types.

Reviewed Changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
services/static-webserver/client/source/class/osparc/store/Store.js Removed obsolete functions (setTemplateState, getTemplate) in favor of new methods.
services/static-webserver/client/source/class/osparc/notification/NotificationUI.js Updated the source of template data to use the new Templates API.
services/static-webserver/client/source/class/osparc/info/StudyLarge.js Replaced legacy __isTemplate checks with usage of getTemplateType for UI adjustments.
services/static-webserver/client/source/class/osparc/desktop/organizations/TutorialsList.js Renamed TemplatesList to TutorialsList and updated filtering and fetching logic.
services/static-webserver/client/source/class/osparc/dashboard/* Updated several dashboard components to use hypertools and tutorials instead of legacy templates.
services/static-webserver/client/source/class/osparc/data/model/* Extended model properties and statics to support new templateType values.
services/static-webserver/client/source/class/osparc/data/Resources.js Updated API endpoint to include the new template_type filter.
eslint.config.js Added ignore paths for client resource output directories.
Files not reviewed (1)
  • .eslintignore: Language not supported
Comments suppressed due to low confidence (2)

services/static-webserver/client/source/class/osparc/desktop/organizations/TutorialsList.js:118

  • [nitpick] The variable name 'orgTemplates' is still used in a context handling tutorials; consider renaming it to 'orgTutorials' for improved clarity.
const orgTemplates = tutorials.filter(template => groupId in template["accessRights"]);

services/static-webserver/client/source/class/osparc/dashboard/CardBase.js:165

  • [nitpick] The comparison in the 'hypertool' branch directly compares resourceType with appType, which might be confusing. Consider using a comparison against metadata (if available) or clarifying the intent of this check to avoid any potential logic issues.
else if (resourceType === "hypertool") { const matches = (resourceType === appType); return !matches; }

@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label May 16, 2025
@odeimaiz
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented May 16, 2025

queue

🛑 The pull request has been synchronized by a user

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@mergify
Copy link
Contributor

mergify bot commented May 17, 2025

This pull request has been removed from the queue for the following reason: pull request manually updated.

The pull request #7690 has been manually updated.

If you want to requeue this pull request, you can post a @mergifyio requeue comment.

@sonarqubecloud
Copy link

@odeimaiz odeimaiz merged commit e32e933 into ITISFoundation:master May 17, 2025
58 of 59 checks passed
@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) t:enhancement Improvement or request on an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants