From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>, pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied: [PATCH widget-toolkit] object grid: fix onlineHelp setting from editorConfig for row editors
Date: Tue, 25 Feb 2025 18:12:35 +0100 [thread overview]
Message-ID: <5a8da3bf-00ad-4c1c-a917-2d084845dda7@proxmox.com> (raw)
In-Reply-To: <20250225141652.4166377-1-d.csapak@proxmox.com>
Am 25.02.25 um 15:16 schrieb Dominik Csapak:
> In our row editors helpers, we unconditionally set onlineHelp from
> 'opts.onlineHelp', even if it's undefined.
>
> Later we use 'Ext.apply' to set first the editorConfig defaults, then
> the 'rowdef.editor' settings. In javascript, the objects
>
> {} and
> { foo: undefined }
>
> are not the same, so Ext.apply overwrites the default from editorConfig
> with that from the row definition, also for undefined.
>
> This means if we have a default onlineHelp in editorConfig and none in
> the add_*_row options, we would not show it.
>
> To fix it, check if 'opts.onlineHelp' is truthy before setting it in
> the row definition. This should not happen for other options used
> from the row helper options, since those are nested
> (Ext.apply does not work recursively)
>
> This fixes a regression in pmg-gui, where we set a default onlineHelp
> for e.g. the Mail Proxy Options which would not show up anymore.
>
> Note: PMG is the only product where we used this pattern, so this
> was not visible anywhere in PVE or PBS.
>
> Fixes: 7d16f8b (object grid: allow to pass online help to row editors)
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> src/grid/ObjectGrid.js | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
>
applied, thanks!
we might need to start a policy for where patches for common repos should
(additionally) get send to to allow slightly simpler noticing then.
For now always adding pve-devel to cc for widget-toolkit patches might
be simple enough.
_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
next prev parent reply other threads:[~2025-02-25 17:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 14:16 [pmg-devel] " Dominik Csapak
2025-02-25 15:12 ` Stoiko Ivanov
2025-02-25 17:12 ` Thomas Lamprecht [this message]
2025-02-26 7:30 ` [pmg-devel] applied: " 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=5a8da3bf-00ad-4c1c-a917-2d084845dda7@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pmg-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal