From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text
Date: Wed, 29 Jan 2025 11:44:49 +0100 [thread overview]
Message-ID: <20250129104450.1286995-1-d.csapak@proxmox.com> (raw)
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@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
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next reply other threads:[~2025-01-29 10:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 10:44 Dominik Csapak [this message]
2025-01-29 10:44 ` [pdm-devel] [PATCH datacenter-manager 2/2] server: api: task: return upid in status Dominik Csapak
2025-01-29 17:31 ` [pdm-devel] applied: " Thomas Lamprecht
2025-01-29 17:22 ` [pdm-devel] [PATCH datacenter-manager 1/2] ui: pve tree: make name column collapse the text Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250129104450.1286995-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox