From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id EE2E51FF13A for ; Wed, 10 Jun 2026 14:39:20 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CDA48D052; Wed, 10 Jun 2026 14:39:20 +0200 (CEST) From: Dominik Csapak 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 Message-ID: <20260610123916.2651267-2-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260610123916.2651267-1-d.csapak@proxmox.com> References: <20260610123916.2651267-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.049 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [mod.rs] Message-ID-Hash: QAFZRHBENACREDFXYPIWGXS2T5MDHRWI X-Message-ID-Hash: QAFZRHBENACREDFXYPIWGXS2T5MDHRWI X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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! {
}) .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