Bug 154389 - Auto assign mnemonic even when all characters are used (No option to select "Delete Comment" via a letter press in the context men)
Summary: Auto assign mnemonic even when all characters are used (No option to select "...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.4.5.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Comments
  Show dependency treegraph
 
Reported: 2023-03-25 15:33 UTC by byebyebugaylon
Modified: 2023-04-11 13:22 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the context menu for a cell with a comment (Linux) (17.03 KB, image/png)
2023-03-25 15:34 UTC, byebyebugaylon
Details
Screenshot of the context menu for a cell with a comment (Windows) (10.74 KB, image/png)
2023-03-25 15:35 UTC, byebyebugaylon
Details
Context menu with a shortcut added to "Delete Comment" (10.06 KB, image/png)
2023-03-26 01:52 UTC, byebyebugaylon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description byebyebugaylon 2023-03-25 15:33:48 UTC
Description:
In Libreoffice Calc, if you select a cell with a comment attached to it and bring up the context menu (via the Menu key or right-click), the "Delete Comment" option does not have a letter that you can press on your keyboard to select it. It is the only option on the menu with this issue.

This bug is present on both the Windows and Linux versions of Calc; I'm attaching screenshots of both.

Steps to Reproduce:
1. Select a cell in LibreOffice Calc that has a comment attached to it and open the context menu.

Actual Results:
"Delete Comment" is the only option you cannot select with a letter press.

Expected Results:
There should be an underline under one of the letters for "Delete Comment" so that it can be selected in the context menu without using the arrow keys or mouse, like the other options in the context menu.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.4.5.1 / LibreOffice Community
Build ID: 40(Build:1)
CPU threads: 6; OS: Linux 5.10; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Debian package version: 4:7.4.5-1~bpo11+1
Calc: threaded
Comment 1 byebyebugaylon 2023-03-25 15:34:51 UTC
Created attachment 186215 [details]
Screenshot of the context menu for a cell with a comment (Linux)
Comment 2 byebyebugaylon 2023-03-25 15:35:52 UTC
Created attachment 186216 [details]
Screenshot of the context menu for a cell with a comment (Windows)
Comment 3 Rafael Lima 2023-03-25 23:04:47 UTC
You can set a shortcut for this command in Tools - Customize - Keyboard. Simply choose the "Delete Comment" command and assign a shortcut for it.

The shortcut you choose will appear in the context menu.

As for pressing Alt and an underline appearing, then this should get fixed.
Comment 4 Rafael Lima 2023-03-25 23:10:16 UTC
(In reply to Rafael Lima from comment #3)
> As for pressing Alt and an underline appearing, then this should get fixed.

The reason why it doesn't get an underline (in English) is because all initial and final letters from "Delete Comment" were already taken by other commands.
Comment 5 byebyebugaylon 2023-03-26 01:51:34 UTC
(In reply to Rafael Lima from comment #4)
> (In reply to Rafael Lima from comment #3)
> > As for pressing Alt and an underline appearing, then this should get fixed.
> 
> The reason why it doesn't get an underline (in English) is because all
> initial and final letters from "Delete Comment" were already taken by other
> commands.

Is it not possible for the letters "m" or "n" to be used based on their position? They are unused by the rest of the context menu.

(In reply to Rafael Lima from comment #3)
> You can set a shortcut for this command in Tools - Customize - Keyboard.
> Simply choose the "Delete Comment" command and assign a shortcut for it.
> 
> The shortcut you choose will appear in the context menu.
> 
> As for pressing Alt and an underline appearing, then this should get fixed.

I assigned a shortcut but it looks like there is still no underline. See the next uploaded attachment.
Comment 6 byebyebugaylon 2023-03-26 01:52:06 UTC
Created attachment 186227 [details]
Context menu with a shortcut added to "Delete Comment"
Comment 7 m_a_riosv 2023-03-26 02:01:23 UTC
Letter 'l' works for me:
Version: 7.5.2.1 (X86_64) / LibreOffice Community
Build ID: e8bf3b441b8370f8440b0339fd9490765a8d57ca
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 8 byebyebugaylon 2023-03-26 02:56:53 UTC
(In reply to m.a.riosv from comment #7)
> Letter 'l' works for me:
> Version: 7.5.2.1 (X86_64) / LibreOffice Community
> Build ID: e8bf3b441b8370f8440b0339fd9490765a8d57ca
> CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL:
> win
> Locale: es-ES (es_ES); UI: en-US Calc: CL threaded

Just to be sure, is "l" appearing for "Delete Comment" for you? Normally, "l" is mapped to "Delete" (which is a different option with a similar name).
Comment 9 m_a_riosv 2023-03-26 03:33:14 UTC
Sorry, you are right, my mistake.

Reproducible.
Version: 7.5.2.1 (X86_64) / LibreOffice Community
Build ID: e8bf3b441b8370f8440b0339fd9490765a8d57ca
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 10 Julien Nabet 2023-03-26 08:47:57 UTC
I added Ctrl-Alt-D to delete the comment, it worked to delete the comment.
Nevertheless, I don't think adding a shortcut is supposed to add something in context menu.
Comment 11 Heiko Tietze 2023-03-27 11:36:06 UTC
The command .uno:DeleteNote / Delete Comments can be assigned freely to any shortcut via tools > customize, see comment 3. And I think we should not set anything by default (see also comment 10).

Talking about the mnemonic I was under the impression that it is assigned automatically but in fact no character is underlined for this command. See comment 4 why the automatic assignment fails.

We could a) remove all hard-coded accelerators, b) remove hard-coded accelerators for commands in this menu, c) enhance the automatic to pick any letter and accept the double assignment if nothing is left.
Comment 12 Rafael Lima 2023-03-27 11:41:27 UTC
(In reply to Heiko Tietze from comment #11)
> We could a) remove all hard-coded accelerators, b) remove hard-coded
> accelerators for commands in this menu, c) enhance the automatic to pick any
> letter and accept the double assignment if nothing is left.

I think "c" would be the best approach. In cases like this we should allow letters in the middle of the word to be picked. Note that in this case the letter "m" could have been used.

I remember seeing another bug ticket about this issue, but I could not find it.
Comment 13 Rafael Lima 2023-03-27 12:53:31 UTC
A similar (more general) request has already been made in bug 147762.
Comment 14 Heiko Tietze 2023-04-11 12:24:10 UTC
We discussed the topic in the design meeting.

A quick way to solve would be to assign a mnemonic (and require the user to press it twice). But better we improve the auto assignment algorithm and do it programmatically.

The currently alternative workflow is via main menu _Sheet > Cell _Comments > _Delete Comment.
Comment 15 Julien Nabet 2023-04-11 13:20:14 UTC
(In reply to Heiko Tietze from comment #14)
> We discussed the topic in the design meeting.
> 
> A quick way to solve would be to assign a mnemonic (and require the user to
> press it twice). But better we improve the auto assignment algorithm and do
> it programmatically.
> ...
I suppose lots of users would like to find their MsOffice by default shortcuts which can differ for each localized MsOffice so the algo should also take this into account.
Comment 16 Heiko Tietze 2023-04-11 13:22:22 UTC
(In reply to Julien Nabet from comment #15)
> I suppose lots of users would like to find their MsOffice by default
> shortcuts which can differ for each localized MsOffice so the algo should
> also take this into account.

The mnemonics/accelerator will not align with MSO, at least since MSO has no menu by default. Shortcuts remain hand-picked, of course.