-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 [Frontend] Support any image url in the Hypertool buttons #7720
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
Conversation
There was a problem hiding this 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;
services/static-webserver/client/source/class/osparc/data/model/StudyUI.js
Outdated
Show resolved
Hide resolved
matusdrobuliak66
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful cat, thanks!
|
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
sanderegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting considerations ;) thanks
pcrespov
left a comment
There was a problem hiding this 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 ;-)
GitHK
left a comment
There was a problem hiding this 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 🤣
|
This pull request has been removed from the queue for the following reason: 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. |
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 1147ace |
|



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:

Enhanced:

Related issue/s
How to test
Dev-ops