From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>, pmg-devel@lists.proxmox.com
Subject: Re: [pmg-devel] [PATCH pmg-gui 3/4] quarantine: add common controller for all quarantines
Date: Sat, 22 Oct 2022 15:37:29 +0200 [thread overview]
Message-ID: <1fba7b13-cda2-14b3-7b16-c720b29c33ba@proxmox.com> (raw)
In-Reply-To: <20221020191500.2414-4-s.ivanov@proxmox.com>
Am 20/10/2022 um 21:14 schrieb Stoiko Ivanov:
> over the time the spam quarantine has gained quite a few nice
> usability improvments and features, which would be useful in
> the virus and attachment quarantines as well - e.g.:
>
> * multi-mail selection
> * keyboard actions
> * context menu
> * download mail as .eml
>
> by adding the common class (which is mostly a copy of the controller
> part of SpamQuarantine.js with changes of 'var' to 'let' and removal of the
> spam-specific parts), we can reuse it for all the quarantines.
>
great re-use! Can you please move the original implementation in SpamQuarantine
directly over in this path, that'd would better separate the "factor out" and
"add new functionality to components" parts.
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> js/Makefile | 1 +
> js/controller/QuarantineController.js | 170 ++++++++++++++++++++++++++
> 2 files changed, 171 insertions(+)
> create mode 100644 js/controller/QuarantineController.js
>
> diff --git a/js/Makefile b/js/Makefile
> index b904598..9a2bcf2 100644
> --- a/js/Makefile
> +++ b/js/Makefile
> @@ -19,6 +19,7 @@ JSSRC= \
> RuleInfo.js \
> RuleEditor.js \
> MainView.js \
> + controller/QuarantineController.js \
> QuarantineContextMenu.js \
> QuarantineList.js \
> SpamInfoGrid.js \
> diff --git a/js/controller/QuarantineController.js b/js/controller/QuarantineController.js
> new file mode 100644
> index 0000000..dfe2915
> --- /dev/null
> +++ b/js/controller/QuarantineController.js
> @@ -0,0 +1,170 @@
> +Ext.define('PMG.controller.QuarantineController', {
I'd drop the 'Controller' at the end, if one uses the full path to instantiate/refer to this,
it's already clear that it's a controller due to the middle part.
> + extend: 'Ext.app.ViewController',
> + xtype: 'controller.Quarantine',
xtype doesn't gets the controller. part, and please keep our general style of prefixing with
the product abbrev, e.g.: 'pmgQuarantine'
> + alias: 'controller.quarantine',
I guess both as the "wrong" xtype did not work? anyhow, either xtype or alias, but
not both. I've lessend my strong preference of one of them more recently, so I don't
care much which one, more for only using one, not both.
next prev parent reply other threads:[~2022-10-22 13:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 19:14 [pmg-devel] [PATCH pmg-gui 0/4] low-hanging improvments for the quarantine interface Stoiko Ivanov
2022-10-20 19:14 ` [pmg-devel] [PATCH pmg-gui 1/4] fix #4137: display receiver in attachment/virus quarantine Stoiko Ivanov
2022-10-22 14:30 ` [pmg-devel] applied: " Thomas Lamprecht
2022-10-20 19:14 ` [pmg-devel] [PATCH pmg-gui 2/4] quarantine: contextmenu: refactor for use in other quarantines Stoiko Ivanov
2022-10-22 14:32 ` [pmg-devel] applied: " Thomas Lamprecht
2022-10-20 19:14 ` [pmg-devel] [PATCH pmg-gui 3/4] quarantine: add common controller for all quarantines Stoiko Ivanov
2022-10-22 13:37 ` Thomas Lamprecht [this message]
2022-10-20 19:15 ` [pmg-devel] [PATCH pmg-gui 4/4] quarantine: move all quarantines to the new controller Stoiko Ivanov
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=1fba7b13-cda2-14b3-7b16-c720b29c33ba@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
--cc=s.ivanov@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