[PR #7894] feat: add menu icons to website #7328

Open
opened 2025-11-20 08:05:23 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/community-scripts/ProxmoxVE/pull/7894

State: closed
Merged: Yes


✍️ Description

This pull request enhances the category system by adding icon support to each category and updating the UI to display these icons alongside category names. The main changes involve updating the metadata to include icon information, extending the category type definition, and modifying the script accordion component to render the appropriate icon.

Category metadata and type updates:

  • Added an icon field to each category in metadata.json, specifying the icon to represent that category.
  • Updated the Category type in types.ts to include the new icon property.

UI enhancements for category icons:

  • Imported all Lucide icons in script-accordion.tsx and implemented a getCategoryIcon helper to dynamically render the correct icon based on the category's icon property. [1] [2]
  • Modified the script accordion UI to display the icon next to each category name, improving visual clarity and user experience.

Other minor improvements:

  • Minor refactor to className logic for script selection in the accordion for improved readability.
image

Link: #
https://github.com/community-scripts/ProxmoxVE/discussions/7296#discussioncomment-14343068

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • 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.
**Original Pull Request:** https://github.com/community-scripts/ProxmoxVE/pull/7894 **State:** closed **Merged:** Yes --- <!--🛑 New scripts must be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing. PRs without prior testing will be closed. --> ## ✍️ Description This pull request enhances the category system by adding icon support to each category and updating the UI to display these icons alongside category names. The main changes involve updating the metadata to include icon information, extending the category type definition, and modifying the script accordion component to render the appropriate icon. **Category metadata and type updates:** - Added an `icon` field to each category in `metadata.json`, specifying the icon to represent that category. - Updated the `Category` type in `types.ts` to include the new `icon` property. **UI enhancements for category icons:** - Imported all Lucide icons in `script-accordion.tsx` and implemented a `getCategoryIcon` helper to dynamically render the correct icon based on the category's `icon` property. [[1]](diffhunk://#diff-4820708f02a219519a2fbdc343314c387c27d0c2fa903bd788ec92fdb35ff1d8R2) [[2]](diffhunk://#diff-4820708f02a219519a2fbdc343314c387c27d0c2fa903bd788ec92fdb35ff1d8R13-R23) - Modified the script accordion UI to display the icon next to each category name, improving visual clarity and user experience. **Other minor improvements:** - Minor refactor to className logic for script selection in the accordion for improved readability. <img width="1485" height="800" alt="image" src="https://github.com/user-attachments/assets/21bfcb03-1e20-4671-9705-c73f96308a1f" /> ## 🔗 Related PR / Issue Link: # https://github.com/community-scripts/ProxmoxVE/discussions/7296#discussioncomment-14343068 ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [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.
saavagebueno added the pull-request label 2025-11-20 08:05:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#7328