public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-yew-comp] fix #7963: acme: filter ACME DNS Plugins by their human-readable name
@ 2026-08-24  7:49 Lukas Wagner
  2026-08-24  8:12 ` applied: " Dominik Csapak
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wagner @ 2026-08-24  7:49 UTC (permalink / raw)
  To: yew-devel

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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* applied: [PATCH proxmox-yew-comp] fix #7963: acme: filter ACME DNS Plugins by their human-readable name
  2026-08-24  7:49 [PATCH proxmox-yew-comp] fix #7963: acme: filter ACME DNS Plugins by their human-readable name Lukas Wagner
@ 2026-08-24  8:12 ` Dominik Csapak
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Csapak @ 2026-08-24  8:12 UTC (permalink / raw)
  To: yew-devel, Lukas Wagner

On Mon, 24 Aug 2026 09:49:47 +0200, Lukas Wagner wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] fix #7963: acme: filter ACME DNS Plugins by their human-readable name
      commit: 2384eea02c13d5da2798202226f7f5a9f8d1b2eb




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-24  8:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-24  7:49 [PATCH proxmox-yew-comp] fix #7963: acme: filter ACME DNS Plugins by their human-readable name Lukas Wagner
2026-08-24  8:12 ` applied: " Dominik Csapak

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