Bug 150604 - Shortcut - delete key - doesn't delete the selected Index Entry in navigator
Summary: Shortcut - delete key - doesn't delete the selected Index Entry in navigator
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0 target:7.4.2
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-25 13:25 UTC by Telesto
Modified: 2022-09-21 09:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (10.33 KB, application/vnd.oasis.opendocument.text)
2022-08-25 13:25 UTC, Telesto
Details
Screenshot (36.78 KB, image/png)
2022-08-30 08:10 UTC, Heiko Tietze
Details
change 'delete' menu item name to 'delete [content type]' (847.15 KB, video/x-matroska)
2022-09-07 06:44 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2022-08-25 13:25:41 UTC
Description:
Pressing DELETE key inside the navigator doesn't delete the selected Index Entry

Steps to Reproduce:
1. Open the attached file
2. Sidebar -> Navigator
3. Expand Index
4. Right Click the Entry -> Notice Delete as shown as shortcut

Actual Results:
Delete button doesn't work

Expected Results:
Right context menu suggests this is possible. If this being safe without conformation dialog another topic


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1c1647e6ee252fe68d7406d01043e88f1721590f
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2022-08-25 13:25:57 UTC
Created attachment 182017 [details]
Example file
Comment 2 Telesto 2022-08-25 13:28:52 UTC
The current right Click context menu didn't exist in
Version: 6.4.0.0.beta1+ (x64)
Build ID: e75dd1fc992f168f24d66595265a978071cdd277
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL
Comment 3 Telesto 2022-08-25 13:29:42 UTC
@Heiko
Some UX opinion needed.
Comment 4 Heiko Tietze 2022-08-26 07:32:19 UTC
The command works for me and it just replicates the context menu from the ToC. => NAB

Version: 7.4.0.3 / LibreOffice Community
Build ID: 40(Build:3)
CPU threads: 8; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (en_US.UTF-8); UI: en-US
7.4.0-2
Calc: threaded
Comment 5 Telesto 2022-08-26 09:24:42 UTC
(In reply to Heiko Tietze from comment #4)
> The command works for me and it just replicates the context menu from the
> ToC. => NAB

Probably not on all platforms. 
* Windows shows delete in context menu but doesn't work.
* macOS: no shortcut key
Comment 6 Heiko Tietze 2022-08-29 09:51:08 UTC
(In reply to Telesto from comment #5)
> * macOS: no shortcut key

Works for me (v7.4.0.3). Delete is available in the context menu at the ToC as well the Navigator. Have you tried we a clean profile (restart in safe mode)?
Comment 7 Telesto 2022-08-29 11:40:02 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to Telesto from comment #5)
> > * macOS: no shortcut key
> 
> Works for me (v7.4.0.3). Delete is available in the context menu at the ToC
> as well the Navigator. Have you tried we a clean profile (restart in safe
> mode)?

The delete ToC is available in the context menu on Windows and Mac; that's not the point.

LibO Windows context menu suggests a shortcut key - delete, instead of the context menu. However the delete key doesn't do anything.

The context menu on macOS doesn't suggest a shortcut key. You can only delete an ToC using the context menu

--
If there should be a shortcut key to delete ToC and (and maybe other object; I didn't check) using the navigator is something you can argue about. 

Context: I had to trim down a document to create more accessible reproducer; which contained 35 ToC's set to read only. Right clicking every object was pretty frustrating and time consuming action :-)
Comment 8 Heiko Tietze 2022-08-30 08:10:27 UTC
Created attachment 182090 [details]
Screenshot
Comment 9 Heiko Tietze 2022-08-30 08:14:39 UTC
Now I got it. The context menu in the Navigator has the item "Delete", which is automatically amended with the "Del" shortcut. The actual ToC labels this entry "Delete index".

It's a bit unfortunate since "Delete index" wouldn't fit other contents at the Navigator such as comments or bookmarks. In all these cases we use just "Delete". Any idea how to fix that, Jim?
Comment 10 Commit Notification 2022-09-07 06:40:15 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a8e4bf44012139adff7d1343f17edca13a70d0c5

tdf#150604 Writer Navigator: Make delete shortcut key delete Indexes

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Jim Raykowski 2022-09-07 06:44:02 UTC
Created attachment 182278 [details]
change 'delete' menu item name to 'delete [content type]'

(In reply to Heiko Tietze from comment #9)
> It's a bit unfortunate since "Delete index" wouldn't fit other contents at
> the Navigator such as comments or bookmarks. In all these cases we use just
> "Delete". Any idea how to fix that, Jim?
Do you suggest what is shown in the attached demo?
Comment 12 Heiko Tietze 2022-09-07 06:54:16 UTC
(In reply to Jim Raykowski from comment #11)
> Do you suggest what is shown in the attached demo?

Brilliant. But don't hard-code the structure and rather have some %1 variable. Depending on how I translate Delete it comes after the noun in German. And probably many other languages.
Comment 13 Jim Raykowski 2022-09-08 06:35:08 UTC
Here is a patch that makes the Navigator context menu Delete entry specific to content type, e.g. Delete Index, Delete Comment, Delete Image. Delete labels are translatable through the .ui translatable mechanism:
https://gerrit.libreoffice.org/c/core/+/139628
Comment 14 Commit Notification 2022-09-09 01:09:16 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/506af0e65e8d0896e3e9f8e2d47aa65799276137

tdf#150604 related: Label Navigator context menu delete entry

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2022-09-20 08:00:06 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/30e427d4091277839f6cbe30d7232498c0b48ef9

tdf#150604 related: fix logic used in determining inclusion of

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2022-09-21 09:37:48 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/0be24b5794656f159e02e52435a7226f530787d5

tdf#150604 Writer Navigator: Make delete shortcut key delete Indexes

It will be available in 7.4.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.