Bug 144490 - Context menu subentry Wrap should be disabled, if no options available
Summary: Context menu subentry Wrap should be disabled, if no options available
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected) release
Hardware: All All
: lowest enhancement
Assignee: Not Assigned
Depends on:
Blocks: Context-Menu
  Show dependency treegraph
Reported: 2021-09-14 13:18 UTC by Buovjaga
Modified: 2022-07-04 08:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Buovjaga 2021-09-14 13:18:18 UTC
1. Open Writer
2. Insert Frame
3. Right-click the inserted frame - Anchor - As Character
4. Right-click again, see Wrap menu item

It should be greyed out.

Currently it displays one entry [No selection possible] with gen, gtk3, Windows. With kf5, it doesn't open the submenu at all.
Comment 1 Roman Kuznetsov 2021-09-15 21:52:23 UTC
Confirm in current 7.3

I think it's an enhancement. The item Wrap shouldn't be in Context menu in that case at all
Comment 2 Andreas Heinisch 2022-07-02 16:29:31 UTC
Should be easy, but I don't know how to disable the main menu:

Insertion of the new submenu:

Start of the popup menu:

Any call to any function doesn't seem to do anything :(
Comment 3 Mike Kaganski 2022-07-04 07:52:43 UTC
(In reply to Buovjaga from comment #0)
> It should be greyed out.

My take: WF.
The current implementation of (sub)menus in LibreOffice is that we do *not* enumerate sub-items when creating menus, and *only* count/create submenus at the moment the user wants to expand it. This helps performance (user does not need to wait for all submenus parsed before the main menu shows), and also simplifies implementation, where both static and dynamic submenus are handled uniformly.

This proposal requires that when the main context menu is shown, multiple operations be performed to count submenus, and based on that, some menus be disabled (or hidden, as comment 1 suggests). The imagined benefit IMO is not worth it. I do not see the current status making user experience any worse. (For any option, there could be proponents - e.g., Roman suggests hiding it, but there is a PoV that it's better to never hide, to make the positions of elements fixed and a feedback present that "an action is possible, but not right now" - as Noel mentioned on the IRC).