Skip to content

✨ [Frontend] Templates and Public Projects in Study Browser #7676

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

Merged

Conversation

odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented May 14, 2025

What do these changes do?

This PR adds the Templates and Public Projects sections to the StudyBrowser. Here the paginated templates will be listed.

TemplatesAndPublicProjects

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this May 14, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels May 14, 2025
@odeimaiz odeimaiz added this to the Bazinga! milestone May 14, 2025
@odeimaiz odeimaiz marked this pull request as ready for review May 15, 2025 08:27
@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label May 15, 2025
@odeimaiz
Copy link
Member Author

@Mergifyio queue

Copy link
Contributor

mergify bot commented May 15, 2025

queue

🟠 Waiting for conditions to match

  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • #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
      • label=🤖-automerge
      • 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

Copy link
Contributor

@Copilot 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 adds Templates and Public Projects sections to the Study Browser by introducing new store methods, UI contexts, and renaming the existing TemplateBrowser to TutorialBrowser for consistency.

  • Added paginated fetch methods for templates in osparc.store.Templates
  • Extended StudyBrowser context and filter components to support templates and public
  • Renamed TemplateBrowser to TutorialBrowser and updated related Dashboard, MainPage, and filter code

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
services/static-webserver/client/source/class/osparc/store/Templates.js Added fetchTemplatesPaginated and alias for public templates
services/static-webserver/client/source/class/osparc/store/Store.js Extended studyBrowserContext enum with templates and public
services/static-webserver/client/source/class/osparc/jobs/RunsTable.js Extracted cancel-run logic to __cancelRun and updated listener
services/static-webserver/client/source/class/osparc/info/ServiceLarge.js Refactored thumbnail min/max bound calculations
services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js Updated pipeline submission callback signature
services/static-webserver/client/source/class/osparc/desktop/MainPage.js Switched TemplateBrowser references to TutorialBrowser
services/static-webserver/client/source/class/osparc/data/Resources.js Added getPageSorted endpoint for templates
services/static-webserver/client/source/class/osparc/data/Job.js Updated job status labels
services/static-webserver/client/source/class/osparc/dashboard/TutorialBrowser.js Renamed TemplateBrowser class to TutorialBrowser
services/static-webserver/client/source/class/osparc/dashboard/StudyBrowserHeader.js Added icons and titles for templates and public contexts
services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js Integrated template/public fetching into StudyBrowser
services/static-webserver/client/source/class/osparc/dashboard/ResourceContainerManager.js Adjusted workspace/folder container visibility toggles
services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserFilter.js Added filter buttons for templates and public contexts
services/static-webserver/client/source/class/osparc/dashboard/NewPlusMenu.js Renamed "Services..." menu button label to "Apps..."
services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js Replaced TemplateBrowser tab with TutorialBrowser
Files not reviewed (1)
  • services/static-webserver/client/source/translation/en.po: Language not supported
Comments suppressed due to low confidence (2)

services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserFilter.js:153

  • [nitpick] In the public projects listener, the variable templatesEnabled is misleading. Rename it to something like publicEnabled for clarity.
const templatesEnabled = e.getData();

services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js:226

  • [nitpick] The local variable templatesView is misleading in the __createTutorialBrowser method. Consider renaming it to tutorialView for consistency.
const templatesView = this.__tutorialBrowser = new osparc.dashboard.TutorialBrowser();

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

👍

Copy link

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

This way you can now use pagination for the templates view, right?

@odeimaiz
Copy link
Member Author

This way you can now use pagination for the templates view, right?

Not sure I get the question. Pagination was already being used.

The problem with the templates is that some widgets rely on the templates (TIP plus buttons), and in order to populate them all templates were required. My plan is to mark them as Tutorials, and therefore only all Tutorials will be required.

@odeimaiz odeimaiz enabled auto-merge (squash) May 15, 2025 10:18
@odeimaiz odeimaiz requested a review from pcrespov May 15, 2025 10:30
@odeimaiz odeimaiz merged commit 81958f3 into ITISFoundation:master May 15, 2025
56 checks passed
@odeimaiz odeimaiz deleted the feature/templates-in-project-browser branch May 15, 2025 10:39
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.

3 participants