public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 2/3] headerbar: show shortcut for search in emptyText
Date: Fri, 21 Jul 2023 16:04:54 +0200	[thread overview]
Message-ID: <ebe71baf-1e95-b81f-d60f-0cdad6d8905f@proxmox.com> (raw)
In-Reply-To: <89b8322f-ee76-4574-941a-4c86d4f42aac@proxmox.com>

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




  reply	other threads:[~2023-07-21 14:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21  9:39 [pve-devel] [PATCH manager 1/3] headerbar: use same height and padding for product name as PBS and PMG Lukas Wagner
2023-07-21  9:39 ` [pve-devel] [PATCH manager 2/3] headerbar: show shortcut for search in emptyText Lukas Wagner
2023-07-21 13:31   ` Thomas Lamprecht
2023-07-21 14:04     ` Lukas Wagner [this message]
2023-07-21  9:39 ` [pve-devel] [PATCH manager 3/3] headerbar: center search box, make it adapt to the width of the browser Lukas Wagner
2023-07-21 13:54   ` Thomas Lamprecht
2023-07-21 14:54     ` Lukas Wagner
2023-07-21 14:04 ` [pve-devel] [PATCH manager 1/3] headerbar: use same height and padding for product name as PBS and PMG Thomas Lamprecht
2023-07-24  8:25   ` Lukas Wagner

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=ebe71baf-1e95-b81f-d60f-0cdad6d8905f@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal