[PR #175] [MERGED] feat: hide widget title bar when empty, fix clone CSS copy #167

Closed
opened 2026-02-26 17:37:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Corsinvest/cv4pve-admin/pull/175
Author: @franklupo
Created: 2/18/2026
Status: Merged
Merged: 2/18/2026
Merged by: @franklupo

Base: mainHead: feat/dashboard-hide-title-when-empty


📝 Commits (1)

  • eca9678 feat: hide widget title bar when empty, fix clone CSS copy

📊 Changes

4 files changed (+33 additions, -28 deletions)

View changed files

📝 src/Corsinvest.ProxmoxVE.Admin.Core/Components/WidgetGrid/WidgetGrid.razor (+29 -26)
📝 src/Corsinvest.ProxmoxVE.Admin.Module.Dashboard/Components/Dashboard.razor.cs (+2 -0)
📝 src/Corsinvest.ProxmoxVE.Admin.Module.Dashboard/Components/WidgetDialog.razor (+1 -1)
📝 src/Corsinvest.ProxmoxVE.Admin.Module.Dashboard/Models/Widget.cs (+1 -1)

📄 Description

Summary

  • WidgetGrid: hide the header card when widget title is empty in view mode; always visible in edit mode for drag/resize/menu access
  • Widget.cs: changed [Required] to [Required(AllowEmptyStrings = true)] so empty string title passes form validation; default changed to string.Empty
  • WidgetDialog: updated label from "Title (text or html)" to "Title (empty = hide)" for clarity
  • Dashboard clone: widget clone now copies TitleCss and BodyCss in addition to existing fields

Use case

Allows using the Memo widget as a visual separator/group header by setting an empty title. The card body fills the full widget area with no header bar in view mode.

Test plan

  • Add a widget with empty title → header bar not visible in view mode
  • Same widget in edit mode → header bar visible (drag indicator + menu accessible)
  • Add a widget with non-empty title → header bar always visible
  • Clone a widget → cloned widget has same TitleCss and BodyCss as original
  • Form validation: saving a widget with empty title should succeed

🔄 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/Corsinvest/cv4pve-admin/pull/175 **Author:** [@franklupo](https://github.com/franklupo) **Created:** 2/18/2026 **Status:** ✅ Merged **Merged:** 2/18/2026 **Merged by:** [@franklupo](https://github.com/franklupo) **Base:** `main` ← **Head:** `feat/dashboard-hide-title-when-empty` --- ### 📝 Commits (1) - [`eca9678`](https://github.com/Corsinvest/cv4pve-admin/commit/eca9678a52b3b26443212576dc141ec3bf2bffb0) feat: hide widget title bar when empty, fix clone CSS copy ### 📊 Changes **4 files changed** (+33 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `src/Corsinvest.ProxmoxVE.Admin.Core/Components/WidgetGrid/WidgetGrid.razor` (+29 -26) 📝 `src/Corsinvest.ProxmoxVE.Admin.Module.Dashboard/Components/Dashboard.razor.cs` (+2 -0) 📝 `src/Corsinvest.ProxmoxVE.Admin.Module.Dashboard/Components/WidgetDialog.razor` (+1 -1) 📝 `src/Corsinvest.ProxmoxVE.Admin.Module.Dashboard/Models/Widget.cs` (+1 -1) </details> ### 📄 Description ## Summary - **WidgetGrid**: hide the header card when widget title is empty in view mode; always visible in edit mode for drag/resize/menu access - **Widget.cs**: changed `[Required]` to `[Required(AllowEmptyStrings = true)]` so empty string title passes form validation; default changed to `string.Empty` - **WidgetDialog**: updated label from `"Title (text or html)"` to `"Title (empty = hide)"` for clarity - **Dashboard clone**: widget clone now copies `TitleCss` and `BodyCss` in addition to existing fields ## Use case Allows using the Memo widget as a visual separator/group header by setting an empty title. The card body fills the full widget area with no header bar in view mode. ## Test plan - [x] Add a widget with empty title → header bar not visible in view mode - [x] Same widget in edit mode → header bar visible (drag indicator + menu accessible) - [x] Add a widget with non-empty title → header bar always visible - [x] Clone a widget → cloned widget has same TitleCss and BodyCss as original - [x] Form validation: saving a widget with empty title should succeed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 17:37:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-admin#167
No description provided.