* [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide
@ 2026-05-28 11:11 Christoph Heiss
2026-05-28 11:11 ` [PATCH yew-widget-toolkit 1/2] form: field: make peek icon tooltip overridable Christoph Heiss
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Christoph Heiss @ 2026-05-28 11:11 UTC (permalink / raw)
To: pdm-devel
When (re-)generating a new secret for an auto-installer token, the
command field has a show/hide button, to reveal the contents if wanted.
The tooltip for that button fixed to "Show Password" and "Hide
Password", depending on the action.
This series makes that overridable and sets an appropriate tooltip for
the command line field in PDM.
Diffstat
========
proxmox-yew-widget-toolkit:
Christoph Heiss (1):
form: field: make peek icon tooltip for password customizable
src/widget/form/field.rs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
proxmox-datacenter-manager:
Christoph Heiss (1):
ui: auto-installer: set correct tooltip for command line peek icon
ui/src/remotes/auto_installer/prepared_answer_form.rs | 1 +
1 file changed, 1 insertion(+)
--
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH yew-widget-toolkit 1/2] form: field: make peek icon tooltip overridable
2026-05-28 11:11 [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide Christoph Heiss
@ 2026-05-28 11:11 ` Christoph Heiss
2026-05-28 11:11 ` [PATCH datacenter-manager 2/2] ui: auto-installer: use correct tooltip for command line peek icon Christoph Heiss
2026-05-28 11:19 ` [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide Dominik Csapak
2 siblings, 0 replies; 6+ messages in thread
From: Christoph Heiss @ 2026-05-28 11:11 UTC (permalink / raw)
To: pdm-devel
A field with `InputType::Password` may also be useful in other
contexts, which don't necessarily need to be passwords.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
src/widget/form/field.rs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/widget/form/field.rs b/src/widget/form/field.rs
index 1d694b0..ee49f08 100644
--- a/src/widget/form/field.rs
+++ b/src/widget/form/field.rs
@@ -184,6 +184,10 @@ pub struct Field {
#[builder]
pub show_peek_icon: bool,
+ #[prop_or((tr!("Show Password").into(), tr!("Hide Password").into()))]
+ #[builder]
+ pub peek_icon_tip: (AttrValue, AttrValue),
+
/// Icons to show on the left (false) or right(true) side of the input
#[prop_or_default]
#[builder]
@@ -481,9 +485,9 @@ impl ManagedField for StandardField {
"pwt-pointer"
);
let tooltip_text = if is_hidden {
- tr!("Show Password")
+ &props.peek_icon_tip.0
} else {
- tr!("Hide Password")
+ &props.peek_icon_tip.1
};
Some(Tooltip::new(html! { <i {class} {onclick}/> }).tip(tooltip_text))
} else {
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH datacenter-manager 2/2] ui: auto-installer: use correct tooltip for command line peek icon
2026-05-28 11:11 [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide Christoph Heiss
2026-05-28 11:11 ` [PATCH yew-widget-toolkit 1/2] form: field: make peek icon tooltip overridable Christoph Heiss
@ 2026-05-28 11:11 ` Christoph Heiss
2026-05-28 11:19 ` [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide Dominik Csapak
2 siblings, 0 replies; 6+ messages in thread
From: Christoph Heiss @ 2026-05-28 11:11 UTC (permalink / raw)
To: pdm-devel
The default is "Show Password" and "Hide Password", respectively, which
isn't correct in this case.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Depends on a bump of proxmox-yew-widget-toolkit with the previous patch
applied.
ui/src/remotes/auto_installer/prepared_answer_form.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/src/remotes/auto_installer/prepared_answer_form.rs b/ui/src/remotes/auto_installer/prepared_answer_form.rs
index 560503a4..84cb5ea4 100644
--- a/ui/src/remotes/auto_installer/prepared_answer_form.rs
+++ b/ui/src/remotes/auto_installer/prepared_answer_form.rs
@@ -1041,6 +1041,7 @@ pub fn render_show_secret_dialog(
Field::new()
.input_type(InputType::Password)
.class(FlexFit)
+ .peek_icon_tip((tr!("Show Command Line").into(), tr!("Hide Command Line").into()))
.value(commandline.to_owned())
.read_only(true),
)
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide
2026-05-28 11:11 [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide Christoph Heiss
2026-05-28 11:11 ` [PATCH yew-widget-toolkit 1/2] form: field: make peek icon tooltip overridable Christoph Heiss
2026-05-28 11:11 ` [PATCH datacenter-manager 2/2] ui: auto-installer: use correct tooltip for command line peek icon Christoph Heiss
@ 2026-05-28 11:19 ` Dominik Csapak
2026-05-28 12:15 ` Thomas Lamprecht
2 siblings, 1 reply; 6+ messages in thread
From: Dominik Csapak @ 2026-05-28 11:19 UTC (permalink / raw)
To: Christoph Heiss, pdm-devel
i get what the end result should be, but i don't think we should
override the 'password' feature with something else.
another way to do this would be to have a custom trigger
on the use site and show '******' manually?
i just don't believe we will have many uses for changing this tooltip..
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide
2026-05-28 11:19 ` [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide Dominik Csapak
@ 2026-05-28 12:15 ` Thomas Lamprecht
2026-05-28 12:56 ` Dominik Csapak
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Lamprecht @ 2026-05-28 12:15 UTC (permalink / raw)
To: Dominik Csapak, Christoph Heiss, pdm-devel
Am 28.05.26 um 13:19 schrieb Dominik Csapak:
> i get what the end result should be, but i don't think we should
> override the 'password' feature with something else.
Why not? A generic "this includes a secret" field seems to be a good
fit for both? Why duplicate that? (honest question)
>
> another way to do this would be to have a custom trigger
> on the use site and show '******' manually?
>
>
> i just don't believe we will have many uses for changing this tooltip..
Sure, but what's the cost of having it vs. duplicating the field for
just having custom tooltips?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide
2026-05-28 12:15 ` Thomas Lamprecht
@ 2026-05-28 12:56 ` Dominik Csapak
0 siblings, 0 replies; 6+ messages in thread
From: Dominik Csapak @ 2026-05-28 12:56 UTC (permalink / raw)
To: Thomas Lamprecht, Christoph Heiss, pdm-devel
On 5/28/26 2:15 PM, Thomas Lamprecht wrote:
> Am 28.05.26 um 13:19 schrieb Dominik Csapak:
>> i get what the end result should be, but i don't think we should
>> override the 'password' feature with something else.
>
> Why not? A generic "this includes a secret" field seems to be a good
> fit for both? Why duplicate that? (honest question)
>
Judging from the past, we generally don't have any such fields where
it's not a password, so I don't think we'll use this often.
I think we have to be careful what we add to the public API of
the widgets, otherwise we'll add a ton of stuff we don't (often) use.
E.g. the next one maybe needs a different icon for the peek trigger,
or want it left, etc.
Maybe the answer here could also be that the peek trigger be a custom
one? then it's generic enough for my taste to include it.
E.g. something like (would have to flesh out the details of course)
pub peek_trigger: Option<(Trigger, bool)>
(which could get a sensible default implementation)
this way we could also get rid of the 'show_peek_icon' property
and just set it to None on the use site
Don't get me wrong, we can add this property if you prefer that.
>>
>> another way to do this would be to have a custom trigger
>> on the use site and show '******' manually?
>>
>>
>> i just don't believe we will have many uses for changing this tooltip..
> Sure, but what's the cost of having it vs. duplicating the field for
> just having custom tooltips?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-05-28 12:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28 11:11 [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide Christoph Heiss
2026-05-28 11:11 ` [PATCH yew-widget-toolkit 1/2] form: field: make peek icon tooltip overridable Christoph Heiss
2026-05-28 11:11 ` [PATCH datacenter-manager 2/2] ui: auto-installer: use correct tooltip for command line peek icon Christoph Heiss
2026-05-28 11:19 ` [PATCH datacenter-manager/yew-widget-toolkit 0/2] auto-installer: set proper tooltip for command line show/hide Dominik Csapak
2026-05-28 12:15 ` Thomas Lamprecht
2026-05-28 12:56 ` Dominik Csapak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox