From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Aaron Lauterer <a.lauterer@proxmox.com>
Subject: [pve-devel] applied: [PATCH manager 2/2] ui: FirewallRules: Add tooltip to comments
Date: Mon, 22 Feb 2021 14:41:33 +0100 [thread overview]
Message-ID: <683c2ed0-99c8-7a09-ac95-d97ef8f5a73e@proxmox.com> (raw)
In-Reply-To: <20210222101626.19240-2-a.lauterer@proxmox.com>
On 22.02.21 11:16, Aaron Lauterer wrote:
> The comment columns might not be wide enough for longer comments. Since
> it is the most right columns, it can be tricky to grab the right pixel
> to drag it wider.
>
> A tooltip that shows up on hover should be okay.
>
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
>
> As an additional patch as I realized that the comment column can be a
> bit hard to use on smaller screens.
I fixed a style nit and bug and added a heuristic to only add it when
required (i.e., text length is ~ longer than cell width) in a followup.
>
> www/manager6/grid/FirewallRules.js | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js
> index 5a2241a0..f7f304b8 100644
> --- a/www/manager6/grid/FirewallRules.js
> +++ b/www/manager6/grid/FirewallRules.js
> @@ -763,8 +763,10 @@ Ext.define('PVE.FirewallRules', {
> dataIndex: 'comment',
> flex: 6,
> renderer: function(value, metaData, record) {
> - return render_errors('comment', Ext.util.Format.htmlEncode(value), metaData, record);
> - },
> + let comment = render_errors('comment', Ext.util.Format.htmlEncode(value), metaData, record);
> + return `<span data-qtip="${comment}">${comment}</span>`;
returned literally "undefined" if no comment was set
> +},
bad indentation
> +
> },
> );
>
>
next prev parent reply other threads:[~2021-02-22 13:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-22 10:16 [pve-devel] [PATCH manager 1/2] ui: FirewallRules: make columns flexible Aaron Lauterer
2021-02-22 10:16 ` [pve-devel] [PATCH manager 2/2] ui: FirewallRules: Add tooltip to comments Aaron Lauterer
2021-02-22 13:41 ` Thomas Lamprecht [this message]
2021-02-22 13:40 ` [pve-devel] applied: [PATCH manager 1/2] ui: FirewallRules: make columns flexible Thomas Lamprecht
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=683c2ed0-99c8-7a09-ac95-d97ef8f5a73e@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=a.lauterer@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