Bug 167559 - Tabbed Notebookbar's "Edit Comment" button shown when no comment exists in selected cells, and "Comment" button not hidden on selected cells with existing comment
Summary: Tabbed Notebookbar's "Edit Comment" button shown when no comment exists in se...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.4.3 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Notebookbar Comments
  Show dependency treegraph
 
Reported: 2025-07-18 02:59 UTC by Jeff Fortin Tam
Modified: 2025-12-19 21:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Demonstration video (489.25 KB, video/mp4)
2025-07-18 02:59 UTC, Jeff Fortin Tam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Fortin Tam 2025-07-18 02:59:35 UTC
Created attachment 201857 [details]
Demonstration video

Actual behavior:

When using the "Tabbed" notebookbar UI layout type, in Calc, in the "Review" tab, both the "Comment" and "Edit comment" buttons are shown at all times, which is wasting precious horizontal space in the toolbar, because those two actions are mutually exclusive, particularly when a single cell is selected (but even if multiple cells are selected, you can only insert a comment in one cell at a time, and you can only edit a single comment at a time, both of which behave unpredictably wrt the selection).


Expected behavior, when a cell is selected:

* If the cell doesn't have an existing comment: only show the "Comment" button
* If the cell has an existing comment: only show the "Edit comment" button


---

This was observed with:

Version: 25.2.4.3 (X86_64) / LibreOffice Community
Build ID: 33e196637044ead23f5c3226cde09b47731f7e27
CPU threads: 8; OS: Linux 6.14; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 1 Jeff Fortin Tam 2025-07-18 03:07:39 UTC
The potentially simpler alternative to playing whack-a-mole (always toggling the statuses of those two buttons from that pair) might be to have only one button that does both functions, i.e.:
* Automatically create the comment when there is none;
* Edit the comment when there is an existing one.

With that, I believe it would also make sense to disable the button entirely when a selection comprises more than one cell, since comments apparently can't be applied to regions in practice, only single cells.
Comment 2 GJord 2025-12-14 11:38:50 UTC
Tested on my system & I'm unable to reproduce.

Using Calc with the Tabbed Notebookbar UI and when selecting a cell without an existing comment, only the “Comment” button is shown.

When selecting a cell with an existing comment, only “Edit Comment” is shown.

The toolbar buttons correctly toggle based on the selected cell’s comment state. I do not observe both buttons being shown at the same time.

Tested with:
Version: 25.8.2.0.alpha0+
Build ID: 8ca8d55c16d60284f4528fa…
CPU threads: 32; OS: Windows 11 x86_64 (build 26200)
UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Marking as WORKSFORME from my testing.
Comment 3 Jeff Fortin Tam 2025-12-17 15:31:38 UTC
Still occurs for me exactly as shown in the video with the GTK3 Linux version in LibreOffice 25.8.3.2, even with a blank new user profile or after resetting the toolbars, so maybe a Linux-specific/GTK3-specific bug?
Comment 4 Buovjaga 2025-12-19 21:11:35 UTC
Repro.

Notable is that with gtk3 and Windows UIs, Edit Comment and the comment deletion buttons do not show as disabled, but are clickable. Clicking Edit Comment will insert a comment. I observed a change in the linux-64-7.0 bibisect repo, but when bibisecting it turned out to be a phantasm. Safe mode did not help here, nor did git clean -f -X when testing on Windows in a different repo.

Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 680(Build:0)
CPU threads: 2; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Arch Linux 64-bit
Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: a20dec704fb4e542ab0dc30776d8161605c603ce
CPU threads: 8; OS: Linux 6.17; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 17 December 2025