[pdm-devel] [PATCH yew-comp] tasks: make column sizes a bit more dynamic

Dominik Csapak d.csapak at proxmox.com
Thu Jan 23 15:41:02 CET 2025


make the user and status relative in size to the desription
(while keeping the current size as minimum)

This makes it more usable by default when those fields contain longer
text.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/tasks.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/tasks.rs b/src/tasks.rs
index 1b65c8e..9518313 100644
--- a/src/tasks.rs
+++ b/src/tasks.rs
@@ -126,17 +126,17 @@ impl ProxmoxTasks {
                     })
                     .into(),
                 DataTableColumn::new(tr!("User name"))
-                    .width("150px")
+                    .width("minmax(150px, 1fr)")
                     .render(|item: &TaskListItem| {
                         html! {&item.user}
                     })
                     .into(),
                 DataTableColumn::new(tr!("Description"))
-                    .flex(1)
+                    .flex(4)
                     .render(move |item: &TaskListItem| html! {format_upid(&item.upid)})
                     .into(),
                 DataTableColumn::new(tr!("Status"))
-                    .width("200px")
+                    .width("minmax(200px, 1fr)")
                     .render(|item: &TaskListItem| {
                         let text = item.status.as_deref().unwrap_or("");
                         html! {text}
-- 
2.39.5





More information about the pdm-devel mailing list