Bug 134373 - Tools > Update > (submenu items) are taken out of context in alternative toolbar modes such as grouped compact
Summary: Tools > Update > (submenu items) are taken out of context in alternative tool...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0
Keywords: difficultyBeginner, easyHack, skillDesign, topicDesign
Depends on:
Blocks: Notebookbar
  Show dependency treegraph
 
Reported: 2020-06-28 19:48 UTC by Jeff Fortin Tam
Modified: 2021-04-17 12:26 UTC (History)
5 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 Jeff Fortin Tam 2020-06-28 19:48:18 UTC
Description:
See below

Steps to Reproduce:
In the normal toolbar mode, go in the "Tools > Refresh" menu, and look at the submenu items. You have "Refresh all", "Page format", "Fields", "Index and tables", etc.

Actual Results:
When you use a different toolbar mode without the menubar, such as "grouped bar compact" (or others), those options are deported to the "References" section, and while you have the "Refresh all" button or menu item, if you look at the rest, they are listed as-is without a change in their strings and without being inside a submenu, and therefore you lose the context because there is no verb/action near the word. It's just "Index and tables" for example, instead of "Refresh index and tables", so it's impossible to know what that menu item (or button) does unless you know what submenu it was ripped from in the traditional menu-based UI.

Expected Results:
Those action names should have different strings if they are presented in a UI without being inside a "Refresh" submenu, i.e. "Refresh index and tables" for example.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version 6.4.4.2 on Fedora 32
Comment 1 Jeff Fortin Tam 2020-06-29 00:40:06 UTC
Actually the term in the English version is "Update", not "Refresh"... so mentally replace "Refresh" by "Update" in my comment/description above.
Comment 2 Heiko Tietze 2020-07-14 12:04:24 UTC
Andreas, can you name the commands for NB mode differently? If not, any idea? Perhaps place the commands differently.
Comment 3 andreas_k 2020-07-14 12:13:58 UTC
the names come from the uno command. so the uno command name has to be changed, which is no problem, but you have to have also a look to menubar where the command will be used also.
Comment 4 Heiko Tietze 2020-07-14 13:34:16 UTC
Maxim, what do you think about a dedicated NotebookbarLabel? Would require changes at vcl/source/helper/commandinfoprovider.cxx and somewhere at the NB implementation.
Comment 5 Maxim Monastirsky 2020-07-14 18:58:44 UTC
Am I correct that all the commands in question are menu item, not buttons? In this case I see 4 possible solutions:

1) Move them into a sub menu, like they are in the main menu bar.

2) Menus attached to toolbar/notebookbar buttons use PopupLabel instead of ContextLabel/Label. Given that these commands never appear in context menus, I think we can use PopupLabel here for the NB needs.

3) Create aliases for these commands, as in Bug 115965 comment 16.

4) As a last resort, labels can be defined directly in the NB .ui files. ("last resort" because the same menu can appear in several NB files, so it will add more work for translators.)

(In reply to Heiko Tietze from comment #4)
> Maxim, what do you think about a dedicated NotebookbarLabel?
Adding a dedicated property for the toolbar/NB was one of the ideas in Bug 108458. The problem is that the current UI labels storage and its fallback mechanism are too complex already. Adding more properties is possible if needed, but ideally this should be done as part of an overall thinking on how all that stuff should work altogether. (Also note that new properties become part of the configuration schema, for which we prefer to not make incompatible changes. So once a property is introduced, it might not be that easy to remove it.)
Comment 6 Heiko Tietze 2020-07-15 08:53:37 UTC
Standard menu has:

* .uno:UpdateAll > "Update All" > toolbar button right-most on tabbed ui and in the References menu
* .uno:Repaginate > "Page Formatting" > not in the tabbed ui
* .uno:UpdateFields > "Field" > in the References menu
* .uno:UpdateAllIndexes > "Indexes and Tables" > not in the tabbed ui
* .uno:UpdateCurIndex > "Current Index" > with popup label "Update Index" at the NB
* .uno:UpdateAllLinks > "Links" > not in the tabbed ui
* .uno:UpdateCharts > "Charts" > not in the tabbed ui

So my take:

# remove "Update All" from the menu (<object class="GtkMenuItem" id="MenuReference-UpdateAll">) - it's redundant
# .uno:InsertFieldCtrl and .uno:UpdateFields are (Insert) > Field > ... and (Update) > Field, it makes no sense to rename; since (Insert) > Fields is on the NB I suggest to remove this too from the menu (<object class="GtkMenuItem" id="MenuReference-InsertFieldCtrl">)

Source file is sw/uiconfig/swriter/ui/notebookbar.ui
Comment 7 Commit Notification 2021-04-16 07:26:47 UTC
andreas kainz committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2d729251b7bf8f505acb65c620c58ba8bae9ff3d

tdf#134373 add PopupLabel to update commands for NB see c5 option 2

It will be available in 7.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 andreas_k 2021-04-17 12:26:05 UTC
Thanks, work well with PopupLabel