public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH proxmox-yew-comp] fix #7963: acme: filter ACME DNS Plugins by their human-readable name
Date: Mon, 24 Aug 2026 09:49:47 +0200	[thread overview]
Message-ID: <20260824074947.91606-1-l.wagner@proxmox.com> (raw)

In the picker, we only show the human-readable plugin name. For some
plugins, this name differs from the actual plugin id (example:
"Cloudflare Managed DNS" has id "cf"), which makes filtering behavior
unexpected for users.

Fixed by setting a custom filter function for the underlying GridPicker.

The filter function uses `contains` instead of `starts_with`, as doing
so makes it easier to find certain plugins where human-readable name
does not start with most commonly used term for the service. For
instance, some users might type `aws` or `route 53` to find the
`Amazon Route 53 (AWS)` plugin.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 src/acme/acme_challenge_selector.rs | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/acme/acme_challenge_selector.rs b/src/acme/acme_challenge_selector.rs
index 34fd3ee..0b52b49 100644
--- a/src/acme/acme_challenge_selector.rs
+++ b/src/acme/acme_challenge_selector.rs
@@ -58,6 +58,9 @@ pub struct AcmeChallengeSchemaItem {
     #[serde(rename = "type")]
     pub ty: String,
     pub schema: Value,
+    /// Human-readable name.
+    /// The backend sets this to the same value as `id` if no `name` is defined the schema.
+    pub name: String,
 }
 
 impl ExtractPrimaryKey for AcmeChallengeSchemaItem {
@@ -108,6 +111,12 @@ impl Component for ProxmoxAcmeChallengeSelector {
                     .class("pwt-flex-fit");
 
                 GridPicker::new(table)
+                    .filter(|plugin: &AcmeChallengeSchemaItem, query: &str| {
+                        let name = plugin.name.to_ascii_uppercase();
+                        let query = query.to_ascii_uppercase();
+
+                        name.contains(&query)
+                    })
                     .selection(args.selection.clone())
                     .on_select(args.controller.on_select_callback())
                     .into()
-- 
2.47.3





             reply	other threads:[~2026-08-24  7:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24  7:49 Lukas Wagner [this message]
2026-08-24  8:12 ` applied: [PATCH proxmox-yew-comp] fix #7963: acme: filter ACME DNS Plugins by their human-readable name Dominik Csapak

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=20260824074947.91606-1-l.wagner@proxmox.com \
    --to=l.wagner@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