Download it now!
Bug 125146 - Function “Reply Comment” should be consistent for self replies in Edit menu and drop-down menu
Summary: Function “Reply Comment” should be consistent for self replies in Edit menu a...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: low minor
Assignee: Maxim Monastirsky
URL:
Whiteboard: target:6.4.0 target:6.3.0.1
Keywords:
Depends on:
Blocks: Main-Menu Writer-Comments
  Show dependency treegraph
 
Reported: 2019-05-06 21:48 UTC by Harald Koester
Modified: 2019-08-21 16:09 UTC (History)
1 user (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 Harald Koester 2019-05-06 21:48:45 UTC
I order to reproduce the bug:

[1] Open new text document and insert a bit of text.
[2] Insert a comment and keep the cursor inside the comment.
[3] Try to reply the comment: Menu: Edit > Comment > Reply Comment. This item is greyed. Expected: Item should not be greyed. Replying should be possible.
[4] Put the cursor inside the the bit of text. Now the command Reply Comment is not greyed. But nothing happens if you perform the command. Expected: Command should be greyed.
[5] Move the cursor inside the text to the position where the comment is inserted. The dashed line to the comment changes to a solid line.
[6] Try to reply the comment: Menu: Edit > Comment > Reply Comment. The command is not greyed, but nothing happens. Expected: Either the menu item should be greyed or, if the command is not greyed, a new comment should be opened in order to insert the reply.

The command Reply Comment was inserted to the menu with version 5.3.0. It never works correctly.
Comment 1 Roman Kuznetsov 2019-05-07 08:18:44 UTC
repro in

Version: 6.3.0.0.alpha0+
Build ID: d6e8e41c22023bc15cc4c9659b33c1cc3d6edb75
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-05-05_23:45:44
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

ps: Reply function works fine from drop-down menu on comment
Comment 2 Maxim Monastirsky 2019-05-07 08:46:12 UTC
(In reply to Harald Koester from comment #0)
> [2] Insert a comment and keep the cursor inside the comment.
> [3] Try to reply the comment: Menu: Edit > Comment > Reply Comment. This
> item is greyed. Expected: Item should not be greyed. Replying should be
> possible.
I think this part isn't a bug. Looking at the code, the Reply Comment command is disabled when the current user is the author of the comment (because what's the use in replying to your own comments?). Indeed, changing the user name in Tools > Options... > LibreOffice > User Data, makes the command work in those comments that were created with the old name. So this works as designed.

(In reply to Roman Kuznetsov from comment #1)
> ps: Reply function works fine from drop-down menu on comment
It appears to be a bug, and probably a regression from the conversion of this menu to .ui format. Looking at the code (AnnotationMenuButton::MouseButtonDown), it does the same check for the user name, and when it's the same user it does:

pButtonPopup->EnableItem(FN_REPLY, false);

which isn't going to work, as the menu now doesn't have an item with id FN_REPLY, and should instead be:

pButtonPopup->EnableItem(pButtonPopup->GetItemId("reply"), false);
Comment 3 Harald Koester 2019-05-09 20:00:46 UTC
(In reply to Maxim Monastirsky from comment #2)
> (In reply to Harald Koester from comment #0)
> > [2] Insert a comment and keep the cursor inside the comment.
> > [3] Try to reply the comment: Menu: Edit > Comment > Reply Comment. This
> > item is greyed. Expected: Item should not be greyed. Replying should be
> > possible.
> I think this part isn't a bug. Looking at the code, the Reply Comment
> command is disabled when the current user is the author of the comment
> (because what's the use in replying to your own comments?). Indeed, changing
> the user name in Tools > Options... > LibreOffice > User Data, makes the
> command work in those comments that were created with the old name. So this
> works as designed.
Thanks for your research and your reply. I agree. When I use different authors the function works as expected.

> (In reply to Roman Kuznetsov from comment #1)
> > ps: Reply function works fine from drop-down menu on comment
> It appears to be a bug, and probably a regression from the conversion of
> this menu to .ui format. Looking at the code
> (AnnotationMenuButton::MouseButtonDown), it does the same check for the user
> name, and when it's the same user it does:
> 
> pButtonPopup->EnableItem(FN_REPLY, false);
> 
> which isn't going to work, as the menu now doesn't have an item with id
> FN_REPLY, and should instead be:
> 
> pButtonPopup->EnableItem(pButtonPopup->GetItemId("reply"), false);
From my point of view you can go on with fixing this.
Comment 4 Timur 2019-05-10 12:18:06 UTC
Title should be specific. So far, it's "Function “Reply Comment” should be consistent in Edit menu and drop-down menu".
We had two opinions. First was that self-reply should be possible and that self-reply should not be possible (what's the use in replying to your own comments?). I'm in favor of the first because you may write something on a different date and want to see that). 
But anyway, we need consistency in Edit menu and drop-down menu regardless where the cursor is.
Comment 5 Commit Notification 2019-06-13 21:20:31 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/1b39bae5debe3bf952449bd7d2910defcea92b9e%5E%21

tdf#125146 Use correct id for reply command item

It will be available in 6.4.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 6 Commit Notification 2019-06-13 21:22:15 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/4d11c44673e46b134231ea825c1be36c15f8b263%5E%21

tdf#125146 Disable the reply command in UI

It will be available in 6.4.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 7 Maxim Monastirsky 2019-06-13 21:33:16 UTC
Turns out both parts were regressions, so I changed them back to how they were in older builds. Cherry-picked to 6-3 branch too (in gerrit).
Comment 8 Commit Notification 2019-06-14 05:39:06 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/630bda1b424ff262d084c000be4a8d266d0f35d8%5E%21

tdf#125146 Use correct id for reply command item

It will be available in 6.3.0.1.

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 9 Commit Notification 2019-06-14 05:40:34 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/6a1248e86feb2722843133c1d75be82c811b9d30%5E%21

tdf#125146 Disable the reply command in UI

It will be available in 6.3.0.1.

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 MacArthur 2019-06-19 12:47:49 UTC
I'm a bit annoyed that the ability to reply to your own comments is now gone. Replying to your own comments is something I commonly do in other office suites and seems perfectly normal to me. Also, it's been very useful when manually testing features which involve replies to comments, as I'm doing now.
Comment 11 Harald Koester 2019-08-21 16:09:08 UTC
Checked with version 6.3.0 (Win10). Function works as expected now. 

But I agree with Timur and Jim, that a reply of your own comment should be possible.