Bug 128814 - Navigator: right-clicking on any item should bring context menu as right-clicking the item in document, not custom navigator menu
Summary: Navigator: right-clicking on any item should bring context menu as right-clic...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Jim Raykowski
URL:
Whiteboard: target:7.0.0 target:7.3.0
Keywords:
Depends on:
Blocks: Context-Menu Navigator
  Show dependency treegraph
 
Reported: 2019-11-15 09:52 UTC by Mike Kaganski
Modified: 2021-07-19 01:32 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
outline and shapes context menus (67.20 KB, image/png)
2020-01-20 08:44 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2019-11-15 09:52:29 UTC
Currently, right-clicking on most items shown in Navigator a custom menu is shown, with elements specific to Navigator (e.g., in Writer, these are "Outline Level", "Drag Mode", and "Display"). These elements are not related to the clicked item, and control the settings of Navigator itself. For *some* elements, e.g. Tables, additional item is appended, specific to the element, but not identical to what is shown when right-clicking he object.

The suggestion is to make Navigator-specific menu only shown when whitespace is right-clicked in Navigator; and make it show normal object context menu when an object is right-clicked. That would e.g. make it easier to control frames that are hard to select (e.g., because of their wrap mode and arrangement). If needed, items like "Delete" or "Select" could be added; and where there's no item-specific context menu (as with tables), such a menu could be composed exclusively for Navigator (like is done now, only without irrelevant items).

See [1] for an example where that would likely be handy (a user could use right-click menu on frames in Navigator to control, e.g. cut (and undo when needed), and clearly see which object is that; "Select" would be even better).

[1] https://ask.libreoffice.org/en/question/217319/how-do-i-remove-an-image-from-the-page-footer-in-writer/
Comment 1 V Stuart Foote 2019-11-16 00:39:18 UTC
Yes, makes sense.
Comment 2 Heiko Tietze 2019-11-19 11:13:10 UTC
(In reply to Mike Kaganski from comment #0)
> The suggestion is to make Navigator-specific menu only shown when whitespace
> is right-clicked in Navigator

The Navigator contains of a tree with no white-space. If you right-click somewhere it selects this item. So this works only below the tree.
Comment 3 Roman Kuznetsov 2019-12-25 09:22:49 UTC Comment hidden (obsolete)
Comment 4 Roman Kuznetsov 2019-12-25 09:57:58 UTC
(In reply to Roman Kuznetsov from comment #3)
> There is special "Images" submenu for images inserted in Writer in
> Navigator's context menu. But there isn't the same for Calc... 
> 
> I think we should make these submenus for objects in Navigator for all
> modules

There are submenus for Indexes, for Comments, for Bookmarks, for OLE-objects in Writer's Navigator too
There are Section action items in Navigator's context menu for Sections => should be move to Section submenu

So I think I'm right. We just should finalize that work and finally to have submenus for all elements in Navigator for Writer, Calc, Draw, Impress.
Comment 5 Heiko Tietze 2020-01-06 20:42:55 UTC Comment hidden (off-topic)
Comment 6 Jim Raykowski 2020-01-20 08:16:29 UTC
Hi All,

Here is an effort that:

1) Removes content type sub menus
2) Incorporates enhancement request bug 128222
3) Adds Promote/Demote Chapter/Level menu items to the Outline content context menu
4) Adds Rename... to the Draw Objects content context menu  

https://gerrit.libreoffice.org/#/c/core/+/87053/
Comment 7 Jim Raykowski 2020-01-20 08:44:36 UTC
Created attachment 157260 [details]
outline and shapes context menus
Comment 8 Roman Kuznetsov 2020-01-20 09:01:45 UTC
(In reply to Jim Raykowski from comment #6)
> Hi All,
> 
> Here is an effort that:
> 
> 1) Removes content type sub menus
> 2) Incorporates enhancement request bug 128222
> 3) Adds Promote/Demote Chapter/Level menu items to the Outline content
> context menu
> 4) Adds Rename... to the Draw Objects content context menu  
> 
> https://gerrit.libreoffice.org/#/c/core/+/87053/

What about all other context menus for different objects in the Navigator?
Comment 9 Commit Notification 2020-01-20 11:19:11 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/062309078740e2d3ce2d6257d93055dce57a485b

tdf#128814 Make Writer Navigator context menus content specific

It will be available in 6.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 10 Jim Raykowski 2020-01-21 22:46:30 UTC
Hello all,

Here is a that patch implements chapter selection from the Writer Navigator context menu for outline entries:

https://gerrit.libreoffice.org/c/core/+/87168

Only the chapter that is selected in the Navigator is selected in the document. Multi selection of chapters can be done in Headings root mode where multi outline selection is possible.

Perhaps delete chapter should behave like this instead of clobbering all sub chapters of a chapter?
Comment 11 Mike Kaganski 2020-01-22 07:17:22 UTC
(In reply to Jim Raykowski from comment #10)
> Here is a that patch implements chapter selection from the Writer Navigator
> context menu for outline entries:

Nice!

> Perhaps delete chapter should behave like this instead of clobbering all sub
> chapters of a chapter?

I suppose that this should follow the "promote/demote" logic, and possibly be split to two submenus: "Chapter" and "Level", with own Select/Delete/Promote/Demote, which would allow to decide what to select and delete.
Comment 12 Mike Kaganski 2020-01-22 07:27:41 UTC
I seem to have misunderstood the "promote/demote chapter" meaning.

So given that "promote/demote chapter" move chapters *with subchapters* up and down the outline, and "promote/demote level" work with all sublevels, I'd suppose that other manipulations also handle all the sublevels, too. If one needs to keep some sublevels from deletion, one needs to move kept chapters to another root; removal of a level and keeping its sublevels automatically joining some previous chapters is not intuitive and manageable IMO. Not sure if "select" should be an exception (selecting only chapter without subchapters) - I'd prefer not to make exceptions from "everything including children", but I can understand if this is decided to be as in current implementation of the patch.
Comment 13 Jim Raykowski 2020-01-22 08:39:32 UTC
ctrl + promote/demote chapters/levels toolbox button allows operations to be done without sub chapters. I don't know if there is a way to use ctrl with the menu items to change the behavior in this way.
Comment 14 Jim Raykowski 2020-01-30 04:37:03 UTC
Here is effort that: 

1) Allows document content selection from Select menu item in Chapter, Table, and Section content context menus. This resolves bug 105600 and bug 63967. Selection of content in the document for collapsed chapters includes all sub chapters. Multi chapter selections can be made from the Headings content navigation view.

2) Reworks chapter delete to follow chapter selection behavior.

3) Makes chapter delete in undo/redo drop down toolbar buttons show as 'Delete chapter' or 'Delete chapters' depending on single or multi chapter delete.

4) Shows accelerator/shortcut keys for context menu items Delete and Chapter/Level Promote/Demote.

https://gerrit.libreoffice.org/c/core/+/87168
Comment 15 sdc.blanco 2020-01-30 13:13:50 UTC
(In reply to Commit Notification from comment #9)
> Affected users are encouraged to test the fix and report feedback.
In 6.3.4.2, right-click Comments (in Navigator), gives a Comments submenu for {Show, Hide, Delete} All --  gone in the new version.
Comment 16 V Stuart Foote 2020-01-30 14:16:34 UTC
(In reply to sdc.blanco from comment #15)
> In 6.3.4.2, right-click Comments (in Navigator), gives a Comments submenu
> for {Show, Hide, Delete} All --  gone in the new version.

It is still available.

Was never there for individual comments. Rather, just a submenu for the Comments entry context menu (5.3.7, 6.3.4, 6.4.0).

It now (current master / 7.0.0) has been moved up out of the submenu onto the Comments context menu directly.
Comment 17 sdc.blanco 2020-01-30 14:25:46 UTC
(In reply to V Stuart Foote from comment #16)
> It now (current master / 7.0.0) has been moved up out of the submenu onto
> the Comments context menu directly.
My misunderstanding.  Can see that edit/delete for individual comments is also moved to context menu from submenu.  Definite improvement.
Comment 18 Commit Notification 2020-02-01 19:26:03 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#128814 Navigator content context menu related

It will be available in 6.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 19 Commit Notification 2020-02-05 06:15:19 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#128814 Add delete to Hyperlinks Navigator context menu

It will be available in 7.0.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 20 sdc.blanco 2020-02-12 15:40:48 UTC
Adding bug #122891 for its parts about context menus for bookmarks in Navigator (and how it might interact with the Bookmarks dialog).
Comment 21 sdc.blanco 2020-02-12 16:06:14 UTC
Three comments about "bookmarks" context menu.

1. When I first saw "Delete Delete"  I thought it was a mistake. 
   a.  maybe it should be "Del" ?
   b.  or maybe it is irrelevant to mention at all?  
   (or is the idea to inform that a shortcut can be used instead of context menu?)
2.  Maybe add "Go to" action in context menu
3.  Maybe drop "Edit" in context menu (for now)

Explanation:  

1. As bug #122891 points out -- everything in the Edit Bookmark dialog box can be done already in the Navigator. (The "hidden" and "conditional" part does not seem to be functional right now, i.e., no way to edit "hide" and "condition")

2.  From experiments, I can see that right-click - "Edit" in Navigator brings the cursor position to the bookmark position -- even if the cursor was in another position in the document  (maybe that is a bug?)  Anyway -- with that behavior - it means that a bookmark can only be inserted where a bookmark already exists. (Maybe there are use cases where two bookmarks with different names but same location are desired.  But for now, this seems to be the only reason to have "Edit" in the context menu -- so it seems better not to give action choices that are not useful)

No strong opinions expressed here -- just some casual reactions/feedback from a user.
Comment 22 Heiko Tietze 2020-02-18 13:44:28 UTC
(In reply to sdc.blanco from comment #21)
> 2.  Maybe add "Go to" action in context menu
+1, the primary action should be on top of the context menu

> 3.  Maybe drop "Edit" in context menu (for now)
Can follow your arguments.
Comment 23 Jim Raykowski 2020-02-23 00:16:26 UTC Comment hidden (obsolete)
Comment 24 V Stuart Foote 2020-02-23 00:39:54 UTC
(In reply to Jim Raykowski from comment #23)
> Maybe "Go to" would be useful as the first item in all of the content items
> popup menus?

Yes please +1 -- Object focus, with text edit cursor focus if appropriate for the object.
Comment 25 Commit Notification 2020-02-23 12:47:03 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

related tdf#128814: Add 'Go to' to Navigator popup menu

It will be available in 7.0.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 26 Commit Notification 2020-02-25 18:12:33 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6d23f2667edc9f8b867066a432dff152f8427ce0

tdf#128814 follow up: check for nullptr and dispose unused sub pop menu

It will be available in 7.0.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 27 john 2020-07-12 05:35:56 UTC
I came across this bug just now -- it is a major issue for using the 'Scenarios' feature in Calc. The functionality to delete or access properties of scenarios is not available anywhere else, apparently. Hence significant loss of functionality (see documentation Calc->Scenarios->Using Scenarios). Basically Scenarios are useless until this bug is fixed, I think.

Any chance the fix could be applied to LO 6.3 stable version?
Comment 28 Heiko Tietze 2020-07-13 10:54:47 UTC
(In reply to john from comment #27)
> Any chance the fix could be applied to LO 6.3 stable version?

Please test the issue with either a nightly build or RC1 of the upcoming release. 

Even when you are happy with the result I'm not sure if backporting this enhancement keeping the _still_ version still (all builds are stable, only the fresh receives new features).
Comment 29 sdc.blanco 2020-11-08 10:18:18 UTC
Not sure if "Master Document Navigator" is included in this bug.  If not, I will file separate report:

With Navigator for a Master Document (.odm)

1.  Select "text" (in content view), right-click and choose "Insert"

Result:  Insert submenu shows, among other items, "Text" as an option.

Expected:  "Text" is not shown (or greyed out) -- (when "text" is selected item, but otherwise is shown when a link is selected).

Reason:  Cannot insert text "next to" a "text" in Master document.


Additional information:

The "Insert" icon (in top panel of Master Navigator) behaves as expected (i.e., only shows "Text" as an option, when a non-Text item is selected).
Comment 30 Jim Raykowski 2021-01-26 20:13:07 UTC
(In reply to sdc.blanco from comment #29)
> Not sure if "Master Document Navigator" is included in this bug.  If not, I
> will file separate report:
Hi Seth,

This should probably be filed under a separate report. Add me, and I will provide code pointers.
Comment 31 Mike Kaganski 2021-07-10 20:20:32 UTC
Note that in current versions, right-clicking an object in the Navigator does *not* select that object.

See https://ask.libreoffice.org/en/question/317688/why-is-text-deleted-instead-of-bookmark/ for the actual problem arising from that. People expand bookmarks, right-click one, and choose "Delete", and have currently selected chapter deleted, because the right-click didn't select the bookmark.
Comment 32 Jim Raykowski 2021-07-10 23:15:45 UTC
(In reply to Mike Kaganski from comment #31)
> Note that in current versions, right-clicking an object in the Navigator
> does *not* select that object.
> 

Here is a link to a patch that makes right-clicking select the entry before showing the context menu:
https://gerrit.libreoffice.org/c/core/+/118709
Comment 33 Commit Notification 2021-07-19 01:29:11 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#128814 sw navigator: Make right-click select entry

It will be available in 7.3.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.