From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Matthias Heiserer <m.heiserer@proxmox.com>,
Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH widget-toolkit 1/2] Utils: add calculate max button width hack
Date: Mon, 28 Mar 2022 12:27:16 +0200 [thread overview]
Message-ID: <1608184d-53b7-09c3-d7cf-4e70f6d6563d@proxmox.com> (raw)
In-Reply-To: <0db1d80d-ec29-3b67-324c-26c8ae0d4a25@proxmox.com>
On 28.03.22 12:17, Matthias Heiserer wrote:
> On 28.03.2022 11:44, Thomas Lamprecht wrote:
>> On 28.03.22 11:43, Matthias Heiserer wrote:
>>> On 25.03.2022 09:47, Thomas Lamprecht wrote:
>>>> On 24.03.22 12:33, Matthias Heiserer wrote:
>>>>> The same code is used once in widget toolkit and twice in PVE already,
>>>>> so it makes sense to add it as a separate function.
>>>>>
>>>>
>>>> FWIW, there'd be also the possibility of adding a new button class, derived
>>>> from proxmoxButton, that would be a bit more boilerplate but also avoid having a
>>>> rather specific helper in the general utils class and avoid coupling from property
>>>> existance/behavior over such "code distance". Maybe we could also move some more
>>>> common "AltButton" behavior in there though (did not checked too closely).
>>>> What do you think?
>>>>
>>> Not a big fan tbh, as would mean it can't be used with an Ext.button.
>>
>> Not seeing the problem? You just use the derived xtype which *is* a Ext.button,
>> we alreay use an also derived variant in the respective places anyway (proxmoxButton)
>> so not sure which problems you envision...
>
> I meant in case we need the functionality with an ext button, but as you say, can just use a proxmoxButton instead then.
Still not get the issue? As the new button is a descendant of the Ext.button it
can be switched out transparently, so in that case you just use the new button
class, I mean that's the whole point..
> Will send a v2 with a separate class. You want it named AltButton?
I'd go for:
Ext.define('Proxmox.button.AltText', {
extend: 'Proxmox.button.Button',
xtype: 'proxmoxAltTextButton',
...
});
prev parent reply other threads:[~2022-03-28 10:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 11:33 Matthias Heiserer
2022-03-24 11:33 ` [pve-devel] [PATCH widget-toolkit 2/2] use the width-helper from utils Matthias Heiserer
2022-03-25 8:37 ` Thomas Lamprecht
2022-03-24 11:33 ` [pve-devel] [PATCH manager] " Matthias Heiserer
2022-03-25 8:47 ` Thomas Lamprecht
2022-03-25 8:35 ` [pve-devel] [PATCH widget-toolkit 1/2] Utils: add calculate max button width hack Thomas Lamprecht
2022-03-25 8:47 ` Thomas Lamprecht
2022-03-28 9:43 ` Matthias Heiserer
2022-03-28 9:44 ` Thomas Lamprecht
2022-03-28 10:17 ` Matthias Heiserer
2022-03-28 10:27 ` Thomas Lamprecht [this message]
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=1608184d-53b7-09c3-d7cf-4e70f6d6563d@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=m.heiserer@proxmox.com \
--cc=pve-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