public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH yew-widget-toolkit 2/3] widget: navigation drawer: cleanup menu toggle
Date: Thu, 18 Jun 2026 13:31:59 +0200	[thread overview]
Message-ID: <20260618113241.2140893-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260618113241.2140893-1-d.csapak@proxmox.com>

some minor cleanup changes:
* use Fa class instead of manual container
* use fixed-width for icon (useful when trailing element is just an icon)
* drop unnecessary trailing non-breaking space

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/widget/nav/navigation_drawer.rs | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/widget/nav/navigation_drawer.rs b/src/widget/nav/navigation_drawer.rs
index 0066c78..12b4d1e 100644
--- a/src/widget/nav/navigation_drawer.rs
+++ b/src/widget/nav/navigation_drawer.rs
@@ -16,7 +16,7 @@ use crate::state::{NavigationContext, NavigationContextExt, Selection};
 use crate::{impl_class_prop_builder, impl_yew_std_props_builder};
 
 use crate::dom::focus::roving_tabindex_next;
-use crate::widget::{Column, Container};
+use crate::widget::{Column, Container, Fa};
 
 use super::{Menu, MenuEntry, MenuItem};
 
@@ -242,13 +242,12 @@ impl PwtNavigationDrawer {
             .with_optional_child(item.trailing.clone())
             // add optional menu-open icon
             .with_optional_child(is_menu.then(|| {
-                Container::from_tag("i")
+                Fa::new("caret-down")
+                    .fixed_width()
                     .attribute("role", "none")
-                    .class("fa fa-caret-down")
                     .class("pwt-nav-menu-item-arrow")
                     .class(open.then_some("expanded"))
                     .onclick(ontoggle)
-                    .with_child("\u{00a0}")
             }))
             .into()
     }
-- 
2.47.3





  parent reply	other threads:[~2026-06-18 11:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 11:31 [PATCH yew-widget-toolkit 0/3] navigation drawer improvements Dominik Csapak
2026-06-18 11:31 ` [PATCH yew-widget-toolkit 1/3] widget: navigation drawer: add optional trailing element for menu items Dominik Csapak
2026-06-18 11:31 ` Dominik Csapak [this message]
2026-06-18 11:32 ` [PATCH yew-widget-toolkit 3/3] widget: navigation drawer: fix typo in comment Dominik Csapak
2026-06-19  4:58 ` applied: [PATCH yew-widget-toolkit 0/3] navigation drawer improvements Dietmar Maurer

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=20260618113241.2140893-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=yew-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal