From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <l.wagner@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id B469BF604
 for <pve-devel@lists.proxmox.com>; Fri, 21 Jul 2023 16:05:26 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 99A411FFA0
 for <pve-devel@lists.proxmox.com>; Fri, 21 Jul 2023 16:04:56 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Fri, 21 Jul 2023 16:04:55 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3ABD542698
 for <pve-devel@lists.proxmox.com>; Fri, 21 Jul 2023 16:04:55 +0200 (CEST)
Message-ID: <ebe71baf-1e95-b81f-d60f-0cdad6d8905f@proxmox.com>
Date: Fri, 21 Jul 2023 16:04:54 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: de-AT, en-US
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <20230721093910.254158-1-l.wagner@proxmox.com>
 <20230721093910.254158-2-l.wagner@proxmox.com>
 <89b8322f-ee76-4574-941a-4c86d4f42aac@proxmox.com>
From: Lukas Wagner <l.wagner@proxmox.com>
In-Reply-To: <89b8322f-ee76-4574-941a-4c86d4f42aac@proxmox.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.066 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [mozilla.org, proxmox.com, stackoverflow.com]
Subject: Re: [pve-devel] [PATCH manager 2/3] headerbar: show shortcut for
 search in emptyText
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Fri, 21 Jul 2023 14:05:26 -0000

On 7/21/23 15:31, Thomas Lamprecht wrote:
> On 21/07/2023 11:39, Lukas Wagner wrote:
>> The shortcut is not really documented anywhere, so I think it make it a
>> bit more obvious to the user.
> 
> style not: commit message should wrap text at 70 character columns.
> https://pve.proxmox.com/wiki/Developer_Documentation#Commits_and_Commit_Messages
> 
Yes, I'm sorry. Usually neovim wraps automatically, but that does not work
when I edit lines afterwards. Really got to set up a color column for
commit messages.
>>
>> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
>> ---
>>   www/manager6/form/GlobalSearchField.js | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/www/manager6/form/GlobalSearchField.js b/www/manager6/form/GlobalSearchField.js
>> index c009ac8b..8e5e13c0 100644
>> --- a/www/manager6/form/GlobalSearchField.js
>> +++ b/www/manager6/form/GlobalSearchField.js
>> @@ -8,7 +8,7 @@ Ext.define('PVE.form.GlobalSearchField', {
>>       extend: 'Ext.form.field.Text',
>>       alias: 'widget.pveGlobalSearchField',
>>   
>> -    emptyText: gettext('Search'),
>> +    emptyText: gettext('Search (Ctrl-Shift-F)'),
> 
> not true for MacOS though, maybe check navigator.platform for /mac/i and
> depending on that use CTRL or ⌘

Very good point, I did not think about that.
Macs do have a control key and that ctrl key seems to have the same keycode [1], so
the label would also be correct on a Mac, and the shortcut *should* work.

However, it would of course be more idiomatic to use Cmd-Shift-F, because
browsers usually use Cmd-F for search on macOS.
So in other words, we should adapt the label AND change the code that sets
up the keyboard shortcut.
Will look into that, just need to find a way how to test this properly ;)
> 
> Semi-related, is the aria-keyshortcuts attribute actually set here?
> 
> https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-keyshortcuts

Judging from the web inspector, this attribute does not seem to be set.
I'll look into that.


[1] https://stackoverflow.com/questions/47117199/control-key-in-web-browser-on-mac

-- 
- Lukas