Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented May 19, 2025

What do these changes do?

Found by @matusdrobuliak66

PP

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this May 19, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels May 19, 2025
@odeimaiz odeimaiz added this to the Bazinga! milestone May 19, 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 frontend issues by replacing the “Templates” tab with a “Tutorials” tab across tests and UI components, and streamlines pricing plan editing by fetching plans synchronously and adjusting the editor’s object handling.

  • Rename dashboard template browser to tutorials in tests and components
  • Update navigation bar and search filter to use tutorials terminology
  • Refactor pricing plan edit flow to use getPricingPlan and remove deep cloning

Reviewed Changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/e2e/utils/auto.js Renamed __dashboardTemplatesBrowser__dashboardTutorialsBrowser and updated related calls.
tests/e2e-playwright/tests/conftest.py Swapped template tab selector for tutorials and updated test IDs.
tests/e2e-frontend/tests/navigationBar/navigationBar.spec.js Changed tab check from templates to tutorials.
services/static-webserver/client/source/class/osparc/store/Templates.js Added getTemplate method that checks __tutorials then __hypertools.
services/static-webserver/client/source/class/osparc/pricing/Plans.js Switched to synchronous getPricingPlan and guarded null case.
services/static-webserver/client/source/class/osparc/pricing/PlanEditor.js Removed deep clone of pricingPlan and updated ID getter call.
services/static-webserver/client/source/class/osparc/dashboard/SearchBarFilter.js Redirected filter resourceType "template""tutorial".
services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js Replaced templates tab definition with tutorials tab.
Files not reviewed (3)
  • services/static-webserver/client/source/resource/osparc/tours/osparc_tours.json: Language not supported
  • services/static-webserver/client/source/resource/osparc/tours/s4l_tours.json: Language not supported
  • services/static-webserver/client/source/resource/osparc/tours/s4llite_tours.json: Language not supported
Comments suppressed due to low confidence (4)

tests/e2e-playwright/tests/conftest.py:647

  • The search bar filter ID is still using "template" even though the tab has been renamed to tutorials. Update this to "searchBarFilter-textField-tutorial" to match the new tab.
const _textbox = page.get_by_test_id("searchBarFilter-textField-template")

tests/e2e-frontend/tests/navigationBar/navigationBar.spec.js:177

  • [nitpick] The visibility predicate isTemplatesVisible and templatesLabel do not match the tutorials tab. Either rename these variables to reflect tutorials or add a separate predicate for tutorials.
await checkButton("tutorialsTabBtn", isTemplatesVisible, templatesLabel);

tests/e2e/utils/auto.js:223

  • The function __filterTemplatesByText now drives the tutorial browser. Rename this to __filterTutorialsByText (and update calls) to avoid confusion.
async function __filterTemplatesByText(page, templateName) {

services/static-webserver/client/source/class/osparc/pricing/PlanEditor.js:39

  • Removing the deep clone means edits will mutate the original plan object, which can introduce side effects. Consider cloning (deepCloneObject) again or freezing the original to prevent unintended mutations.
this.__pricingPlan = pricingPlan;

@sonarqubecloud
Copy link

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.

thanks

@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.55%. Comparing base (6d446c9) to head (0e0910c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7702   +/-   ##
=======================================
  Coverage   87.54%   87.55%           
=======================================
  Files        1814     1814           
  Lines       70414    70414           
  Branches     1144     1144           
=======================================
+ Hits        61646    61648    +2     
+ Misses       8457     8454    -3     
- Partials      311      312    +1     
Flag Coverage Δ *Carryforward flag
integrationtests 64.43% <ø> (+0.04%) ⬆️
unittests 86.77% <ø> (ø) Carriedforward from 6d446c9

*This pull request uses carry forward flags. Click here to find out more.

Components Coverage Δ
api 76.84% <ø> (ø)
pkg_aws_library 93.92% <ø> (ø)
pkg_dask_task_models_library 98.48% <ø> (ø)
pkg_models_library 93.07% <ø> (ø)
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.58% <ø> (ø)
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library 72.36% <ø> (ø)
pkg_settings_library 90.90% <ø> (ø)
pkg_simcore_sdk 85.07% <ø> (-0.18%) ⬇️
agent 96.46% <ø> (ø)
api_server 91.68% <ø> (ø)
autoscaling 96.07% <ø> (ø)
catalog 92.70% <ø> (ø)
clusters_keeper 99.25% <ø> (ø)
dask_sidecar 89.86% <ø> (ø)
datcore_adapter 98.12% <ø> (ø)
director 76.87% <ø> (ø)
director_v2 91.12% <ø> (-0.05%) ⬇️
dynamic_scheduler 96.76% <ø> (ø)
dynamic_sidecar 90.18% <ø> (ø)
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
payments 92.63% <ø> (ø)
resource_usage_tracker 88.22% <ø> (ø)
storage 87.49% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 85.85% <ø> (+0.03%) ⬆️

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 6d446c9...0e0910c. 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
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented May 19, 2025

queue

🟠 Waiting for conditions to match

  • -closed [📌 queue requirement]
  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • label=🤖-automerge
      • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
      • label!=🤖-do-not-merge
      • any of: [🛡 GitHub branch protection]
        • check-skipped = deploy to dockerhub
        • check-neutral = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [🛡 GitHub branch protection]
        • check-success = system-tests
        • check-neutral = system-tests
        • check-skipped = system-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = unit-tests
        • check-neutral = unit-tests
        • check-skipped = unit-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [🛡 GitHub branch protection]
        • check-success = integration-tests
        • check-neutral = integration-tests
        • check-skipped = integration-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = build-test-images (frontend) / build-test-images
        • check-neutral = build-test-images (frontend) / build-test-images
        • check-skipped = build-test-images (frontend) / build-test-images
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed

Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

Thanks

@odeimaiz odeimaiz merged commit 01eeeaf into ITISFoundation:master May 20, 2025
95 checks passed
@odeimaiz odeimaiz deleted the fix/pricing-plan branch May 20, 2025 06:58
@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

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