Bug 156610 - Rename from Navigator context menu does not work on first try / tries
Summary: Rename from Navigator context menu does not work on first try / tries
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Jim Raykowski
URL:
Whiteboard: target:24.2.0
Keywords: implementationError
Depends on:
Blocks: 139633
  Show dependency treegraph
 
Reported: 2023-08-04 13:55 UTC by Stéphane Guillou (stragu)
Modified: 2023-08-29 16:01 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2023-08-04 13:55:09 UTC
Since Jim's ace75043781b5fe36546ec75574a14617f4feb30, we have the "Rename" command in an object's context menu listed in the Navigator.
However, it doesn't lead anywhere.

Steps:
1. Open impress
2. Insert shape
3. Right click in shape name in Navigator, click "Rename"

Result: nothing.

Still reproduced in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: eef0c5d4d45ba35acfb6d8f7551fe565ca4badaa
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Tested gtk3 and gen VCLs.
Comment 1 Stéphane Guillou (stragu) 2023-08-04 14:02:42 UTC
Reading the commit message, I understand it is not supposed to open the same dialog as right-click on shape > Name, it is supposed to be in the navigator.
However, the issue is that it does not work straight away. Not 100% sure about the logic, but on first try, one needs to either:

1. right-click > rename
2. click on name
3. write

Or:

1. left-click on object
2. right-click > rename
3. write
Comment 2 Jim Raykowski 2023-08-05 01:10:22 UTC
I don't repro with any of the VCL plugins for:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4ff824b4658cac8ae0ecf733466bd57537b2b4a1
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

For me, on right-click > rename, the entry name is selected. Text entered after that replaces the selected text. An addition click on the entry removes the selection and places the cursor at the point of the click.
Comment 3 sdc.blanco 2023-08-10 13:28:24 UTC
In Writer, using "rename" (from context menu in Navigator for a shape) pops up a dialog box to enter a new name.
In Impress, using "rename" (from context menu in Navigator for a shape) requires that the name is changed directly in the Navigator window (i.e., no popup dialog box) 

A user familiar with Writer, might be a little confused with the Impress behavior (as Stephane illustrates here, and which I experienced in trying to repro).

In short, it appears that Rename in Navigator in Impress works, but is different in behavior than Writer.

Additional info:  

1. Beyond Navigator, both Writer and Impress have a "Name" command in the context menu for selected shapes, and a "Name" dialog box is opened for this command.  (This appears to be the same dialog as Writer Navigator opens). 

2. The "Rename..." label in Impress Navigator has the three dots, which usually indicates a popup dialog. 

3. Just presenting observations -- no opinions intended or implied about whether or what possible UI changes should be made.

Tested with Windows, but seems to be the same as Linux...

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 693411e60c6bbd1c2ef25490cc3902f6b2461682
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL threaded
Comment 4 Jim Raykowski 2023-08-11 16:07:25 UTC
I agree this needs some tweaking. I think better behavior would be to start inline editing when an already selected entry is clicked on and to launch the rename dialog for the Rename... menu item.
Comment 5 Jim Raykowski 2023-08-13 23:17:26 UTC
Here's a patch that makes the Rename... menu item open the Name dialog and makes name editing start in the tree when a selected entry is left-clicked and released without moving the mouse pointer to begin a drag operation:
https://gerrit.libreoffice.org/c/core/+/155647
Comment 6 Stéphane Guillou (stragu) 2023-08-15 10:22:20 UTC
Thanks Seth and Jim for having a look at this.
I appreciate the patch to make it more consistent across components.

However, what I originally reported seems to be a GTK3-only issue: if the Navigator is not focused, a first, direct right-click > Rename on the object does not make the field editable (but instead draws a selection rectangle around its icon).

Please test on a fresh start:
1. Open Draw with GTK3 VCL plugin
2. Open the Navigator sidebar
3. Draw a rectangle
4. _without first clicking in the navigator_, directly right-click onto the object > Rename...

Not sure if you can also see that, but I can reproduce on two computers with LO 7.5.5 and Ubuntu 20.04, with or without Wayland.
Comment 7 Commit Notification 2023-08-16 06:02:21 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#156610 tdf#139633 SDNavigator: Fix object naming/renaming

It will be available in 24.2.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 8 Jim Raykowski 2023-08-16 06:19:25 UTC
@stragu, I put the patch in before seeing your comment 6. Right-click Rename... should now open the Name dialog. I repro that sometimes the dialog does not open when using GTK3. I can't repro it using gen and qt5 vcl plugins.
Comment 9 Jim Raykowski 2023-08-20 05:41:28 UTC
Here is a patch that fixes the Gtk3 issue of the Rename... menu item not showing the Name dialog as expected, caused by the object not being selected in the view before the popup menu is shown for the entry right-clicked on in the Navigator tree:
https://gerrit.libreoffice.org/c/core/+/155867
Comment 10 Commit Notification 2023-08-22 17:47:01 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6761b79e7b48a5885adecf445f0206f141888613

tdf#156610 tdf#139633 SdNavigator: Fix object not selected

It will be available in 24.2.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 Stéphane Guillou (stragu) 2023-08-29 16:01:20 UTC
Thank you Jim for the various fixes!

Verified as fixed in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 16d43b7c5396d6382926d514dc9ce10b3ce94cba
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded