Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented May 21, 2025

What do these changes do?

We foresee that the hypertool icon will need to be changed in the last minute and POs might want to go with an image that's not part of the Material or Fontawesome icons repositories we support.

This PR enhances the Hypertools buttons to support any image hosted out in the internet.

Before:
Before

Enhanced:
replaceIconWithThumbnail

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz added this to the Bazinga! milestone May 21, 2025
@odeimaiz odeimaiz self-assigned this May 21, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels May 21, 2025
@odeimaiz odeimaiz marked this pull request as ready for review May 21, 2025 15:23
@odeimaiz odeimaiz changed the title 🎨 [Frontend] Support image url in the Hypertools 🎨 [Frontend] Support any image url in the Hypertools May 21, 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 enhances the Hypertools buttons by allowing them to display an image from an external URL instead of a predefined icon. Key changes include introducing a new utility method to replace icons with thumbnails, updating StudyUI to use a custom image URL, and refactoring various UI components to apply the new thumbnail-based icon rendering.

Reviewed Changes

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

Show a summary per file
File Description
services/static-webserver/client/source/class/osparc/utils/Utils.js Added replaceIconWithThumbnail to overlay a thumbnail on UI widgets.
services/static-webserver/client/source/class/osparc/data/model/StudyUI.js Updated HYPERTOOL_ICON to return a static image URL.
services/static-webserver/client/source/class/osparc/dashboard/SearchBarFilter.js Updated the Hypertools menu button to use the new thumbnail functionality.
services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js Adjusted title extraction and simplified condition for showing an Activity Overview popup.
services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserFilter.js Revised Hypertools filter button to integrate the new thumbnail mechanism.
services/static-webserver/client/source/class/osparc/dashboard/NewPlusMenu.js Replaced several direct icon settings with calls to the new setIcon method for consistent behavior.
Comments suppressed due to low confidence (1)

services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js:101

  • [nitpick] Previously, the title included both a resource alias and name for context. Please confirm if removing the alias from the title is an intentional design change to avoid potential confusion.
const title = resourceDetails.__resourceData.name;

@odeimaiz odeimaiz changed the title 🎨 [Frontend] Support any image url in the Hypertools 🎨 [Frontend] Support any image url in the Hypertool buttons May 21, 2025
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.

Beautiful cat, thanks!

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

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented May 21, 2025

queue

🛑 The pull request has been removed from the queue default

The merge conditions cannot be satisfied due to failing checks.

You can take a look at Queue: Embarked in merge queue check runs for more details about the failure.

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.

interesting considerations ;) thanks

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.

I kind of liked the previous version since I could clearly see the icon ;-)

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.

I also agree with PC, previous version was way better, icons were clear 🤣

@mergify
Copy link
Contributor

mergify bot commented May 22, 2025

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks:

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@odeimaiz
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented May 22, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 1147ace

@sonarqubecloud
Copy link

@mergify mergify bot merged commit 1147ace into ITISFoundation:master May 22, 2025
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.

5 participants