[pve-devel] applied-series: [PATCH widget-toolkit 0/2] notification: set 'Remove' button text to 'Reset to default' for built-ins
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Apr 10 12:25:18 CEST 2024
Am 14/12/2023 um 10:48 schrieb Lukas Wagner:
> Deleting a built-in target/matcher does not remove it, but resets it
> to its default settings. This was not really obvious from the UI.
> This patch changes the 'Remove' button text based on the
> selected target/matcher. If it is a built-in, the button text is
> changed to 'Reset to default'. Also, if the built-in is not actually
> modified, the button is disabled.
>
> Lukas Wagner (2):
> remove button: allow to set custom confirmation message
> notify: change 'Remove' button to 'Reset to default' for built-ins
>
> src/button/Button.js | 10 ++++-
> src/panel/NotificationConfigView.js | 63 +++++++++++++++++++++++++++++
> 2 files changed, 72 insertions(+), 1 deletion(-)
>
applied series, thanks!
But I reduced the text from "Reset to default" to just "Reset", the
confirmation message is telling enough for this nice case to avoid all
to much jumping of UI elements.
Note that we normally even use the proxmoxAltTextButton, which sets its
width such, that it doesn't have to change size when changing between
two (statically set) texts – like for "Remove" and "Detach" in the VM
hardware panel for non-disks vs. disks.
But this could be done afterwards, personally it's not a no-go for layout
changes, not sure how good we're currently to avoid that, but maybe
reusing that component could be worth it here.
More information about the pve-devel
mailing list