[PR #3852] [MERGED] Add "Not Updateable" tooltip to scripts #4590

Closed
opened 2025-11-20 06:10:44 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/3852
Author: @BramSuurdje
Created: 4/12/2025
Status: Merged
Merged: 4/12/2025
Merged by: @MickLesk

Base: mainHead: add-extra-tooltip


📝 Commits (6)

  • c60cf4a Refactor Tooltips component to use BadgeProps for variant type and enhance updateable logic with failure state
  • 3083e06 Update tooltip content in Tooltips component to clarify update process for non-updateable scripts
  • f43ccd4 Refactor Tooltips component to make content optional and improve conditional rendering for better UX
  • 22d455c Refactor conditional rendering in Tooltips component to simplify updateable logic and enhance clarity for non-updateable scripts
  • 1fb5f40 Refactor TooltipBadge component in Tooltips to enhance readability and streamline conditional rendering for privileged and non-updateable states
  • 4a53650 Update @radix-ui/react-tooltip to version 1.2.0 and update tooltip component

📊 Changes

4 files changed (+403 additions, -50 deletions)

View changed files

📝 frontend/package-lock.json (+376 -18)
📝 frontend/package.json (+1 -1)
📝 frontend/src/app/scripts/_components/ScriptItems/Tooltips.tsx (+14 -19)
📝 frontend/src/components/ui/tooltip.tsx (+12 -12)

📄 Description

✍️ Description

This pull request includes changes to the Tooltips.tsx file to enhance the functionality and improve the type safety of the tooltips component. The most important changes include the addition of a new type import, updating the TooltipProps interface, and modifying the logic for displaying updateable tooltips.

Enhancements to type safety and functionality:

Link: #

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines

📋 Additional Information (optional)

image image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/3852 **Author:** [@BramSuurdje](https://github.com/BramSuurdje) **Created:** 4/12/2025 **Status:** ✅ Merged **Merged:** 4/12/2025 **Merged by:** [@MickLesk](https://github.com/MickLesk) **Base:** `main` ← **Head:** `add-extra-tooltip` --- ### 📝 Commits (6) - [`c60cf4a`](https://github.com/community-scripts/ProxmoxVE/commit/c60cf4a73dc2b49fa83d7a88bbaf5dd1935e466e) Refactor Tooltips component to use BadgeProps for variant type and enhance updateable logic with failure state - [`3083e06`](https://github.com/community-scripts/ProxmoxVE/commit/3083e06099fa624abf8e30576f161f2cd976677b) Update tooltip content in Tooltips component to clarify update process for non-updateable scripts - [`f43ccd4`](https://github.com/community-scripts/ProxmoxVE/commit/f43ccd431dc1d186236bea544c55d8da3b66f5a0) Refactor Tooltips component to make content optional and improve conditional rendering for better UX - [`22d455c`](https://github.com/community-scripts/ProxmoxVE/commit/22d455ce702baeb29212c20b8b11b995128e8860) Refactor conditional rendering in Tooltips component to simplify updateable logic and enhance clarity for non-updateable scripts - [`1fb5f40`](https://github.com/community-scripts/ProxmoxVE/commit/1fb5f404a9153a1e297da72e7f107f2c0fc08652) Refactor TooltipBadge component in Tooltips to enhance readability and streamline conditional rendering for privileged and non-updateable states - [`4a53650`](https://github.com/community-scripts/ProxmoxVE/commit/4a536502e2747627fa79f0572f1769930cb59b50) Update @radix-ui/react-tooltip to version 1.2.0 and update tooltip component ### 📊 Changes **4 files changed** (+403 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `frontend/package-lock.json` (+376 -18) 📝 `frontend/package.json` (+1 -1) 📝 `frontend/src/app/scripts/_components/ScriptItems/Tooltips.tsx` (+14 -19) 📝 `frontend/src/components/ui/tooltip.tsx` (+12 -12) </details> ### 📄 Description <!--🛑 New scripts must first be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing. PRs for new scripts that skip this process will be closed. --> ## ✍️ Description This pull request includes changes to the `Tooltips.tsx` file to enhance the functionality and improve the type safety of the tooltips component. The most important changes include the addition of a new type import, updating the `TooltipProps` interface, and modifying the logic for displaying updateable tooltips. Enhancements to type safety and functionality: * [`frontend/src/app/scripts/_components/ScriptItems/Tooltips.tsx`](diffhunk://#diff-c6ed439e012bdb7bde3a0a421ed362225e8c48fd4d3b09644e3172f0eca4f9a8L1-R1): Added `BadgeProps` type import to improve type safety for the `variant` property. * [`frontend/src/app/scripts/_components/ScriptItems/Tooltips.tsx`](diffhunk://#diff-c6ed439e012bdb7bde3a0a421ed362225e8c48fd4d3b09644e3172f0eca4f9a8L13-R13): Updated `TooltipProps` interface to use `BadgeProps["variant"]` for the `variant` property, ensuring consistency with the `Badge` component. * [`frontend/src/app/scripts/_components/ScriptItems/Tooltips.tsx`](diffhunk://#diff-c6ed439e012bdb7bde3a0a421ed362225e8c48fd4d3b09644e3172f0eca4f9a8L43-R54): Modified the logic for displaying updateable tooltips to include a new condition for non-updateable scripts, providing appropriate feedback to the user. ## 🔗 Related PR / Issue Link: # ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [x] **No breaking changes** – Existing functionality remains intact. - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [x] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- ## 🔍 Code & Security Review (**X** in brackets) - [ ] **Follows `Code_Audit.md` & `CONTRIBUTING.md` guidelines** ## 📋 Additional Information (optional) <img width="345" alt="image" src="https://github.com/user-attachments/assets/2520c34c-3640-4ec0-8fd0-e244686cdb49" /> <img width="399" alt="image" src="https://github.com/user-attachments/assets/033f821e-3c89-4b9e-889f-b21bde461ee1" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 06:10:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#4590