[pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text

Dominik Csapak d.csapak at proxmox.com
Wed Jan 29 11:44:49 CET 2025


due to how the html/css layout is constructed, we have to manually take
care of the (text)overflow here to have properly ellipsed text when the
column gets too small.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 ui/src/pve/tree.rs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/ui/src/pve/tree.rs b/ui/src/pve/tree.rs
index 50a5ae4..95fb0ec 100644
--- a/ui/src/pve/tree.rs
+++ b/ui/src/pve/tree.rs
@@ -557,10 +557,15 @@ fn columns(
                         .class(AlignItems::Baseline)
                         .gap(2)
                         .with_child(utils::render_lxc_status_icon(r))
-                        .with_child(render_lxc_name(r, true)),
+                        .with_child(
+                            Container::new()
+                                .style("text-overflow", "ellipsis")
+                                .style("overflow", "hidden")
+                                .with_child(render_lxc_name(r, true)),
+                        ),
                 };
 
-                Container::new().with_child(el).into()
+                Container::new().min_width(0).with_child(el).into()
             })
             .into(),
         DataTableColumn::new(tr!("Tags"))
-- 
2.39.5





More information about the pdm-devel mailing list