all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [PATCH yew-widget-toolkit 1/2] slidable: revert markup with old `x_actions` interface
Date: Wed, 10 Jun 2026 14:39:09 +0200	[thread overview]
Message-ID: <20260610123916.2651267-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260610123916.2651267-1-d.csapak@proxmox.com>

Curently the slidable is used with `left_actions` where a `Row` gets
used when adding multiple actions. Since
 ae9c35e (touch: slidable: improve action interface)

This results in two nested Rows with flex layout, which triggers what is
seemingly a browser bug in Chrome/Chromium where none of the text is
rendered until some layout changes. (The exact cause/reason is yet to be
determined).

To restore the original behavior, check the lenght of th action list and
use a normal container when it's a single item, and setting flex
display and direction when there are multiple.

Fixes: ae9c35e (touch: slidable: improve action interface)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/touch/slidable/mod.rs | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/touch/slidable/mod.rs b/src/touch/slidable/mod.rs
index 44c034e..e570529 100644
--- a/src/touch/slidable/mod.rs
+++ b/src/touch/slidable/mod.rs
@@ -218,8 +218,13 @@ impl PwtSlidable {
         Row::new()
             .class("pwt-w-100 pwt-h-100")
             .with_child(
-                Row::new()
+                Container::new()
                     .height(CssLength::Fraction(1.0))
+                    .class(if actions.len() > 1 {
+                        Some(classes!(css::FlexDirection::Row, css::Display::Flex))
+                    } else {
+                        None
+                    })
                     .min_width(0)
                     .style("flex", "0 1 auto")
                     .children(actions)
@@ -244,7 +249,12 @@ impl PwtSlidable {
             .class("pwt-w-100 pwt-h-100")
             .with_child(html! {<div style="flex: 1 1 auto;"></div>})
             .with_child(
-                Row::new()
+                Container::new()
+                    .class(if actions.len() > 1 {
+                        Some(classes!(css::FlexDirection::Row, css::Display::Flex))
+                    } else {
+                        None
+                    })
                     .height(CssLength::Fraction(1.0))
                     .min_width(0)
                     .style("flex", "0 1 auto")
-- 
2.47.3





  reply	other threads:[~2026-06-10 12:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 12:39 [PATCH pmg-yew-quarantine-gui/yew-widget-toolkit 0/2] pmg mobile quarantine: work around weird chrome behavior in slidable Dominik Csapak
2026-06-10 12:39 ` Dominik Csapak [this message]
2026-06-10 12:39 ` [PATCH pmg-yew-quarantine-gui 2/2] spam list: use new slidable interface Dominik Csapak
2026-06-10 14:42 ` applied: [PATCH pmg-yew-quarantine-gui/yew-widget-toolkit 0/2] pmg mobile quarantine: work around weird chrome behavior in slidable 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=20260610123916.2651267-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pmg-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal