Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor bug: "more plugins" stays when all plugins are disabled. #5461

Closed
pazos opened this issue Oct 8, 2019 · 4 comments · Fixed by #6282
Closed

minor bug: "more plugins" stays when all plugins are disabled. #5461

pazos opened this issue Oct 8, 2019 · 4 comments · Fixed by #6282
Labels
Milestone

Comments

@pazos
Copy link
Member

pazos commented Oct 8, 2019

  • KOReader version: all
  • Device: all

Issue

More plugins stays as a menu even when there's no content to show.

Steps to reproduce

Disable the following plugins:

"auto_frontlight",
"battery_statistics",
"synchronize_time",
"keep_alive",
"doc_setting_tweak",
"terminal",

device-2019-10-08-183232

@pazos pazos added the bug label Oct 8, 2019
@Frenzie Frenzie added this to the 2019.11 milestone Oct 8, 2019
Frenzie added a commit to Frenzie/koreader that referenced this issue Oct 21, 2019
@Frenzie Frenzie modified the milestones: 2019.11, 2019.12 Nov 9, 2019
@Frenzie Frenzie modified the milestones: 2019.12, 2020.01 Dec 30, 2019
@Frenzie Frenzie modified the milestones: 2020.01, 2020.02 Jan 18, 2020
@Frenzie Frenzie modified the milestones: 2020.02, 2020.03 Feb 8, 2020
@Frenzie Frenzie modified the milestones: 2020.03, 2020.04 Mar 4, 2020
@daemongloom
Copy link

Is there any way to disable that submenu but keep plugins on? Make them show on main menu?
I have two plugins in main part and 4 plugins in "more plugins" and it would be better to show all of them without additional submenu.

@Frenzie
Copy link
Member

Frenzie commented Mar 27, 2020

Of course, the menus are customizable. You can put your overrides in settings/reader_menu_order.lua and settings/filemanager_menu_order.lua. The defaults can be found in ui/elements.

NB You should only put your overrides in there unless you want a maintenance burden.

Concretely, something like this:

local order = {
    tools = {
        "read_timer",
        "calibre_wireless_connection",
        "evernote",
        "statistics",
        "progress_sync",
        "wallabag",
        "zsync",
        "news_downloader",
        "send2ebook",
        "text_editor",
        --~ "----------------------------",
        --~ "more_plugins",
        "plugin_management",
    --~ },
    --~ more_plugins = {
        "auto_frontlight",
        "battery_statistics",
        "synchronize_time",
        "keep_alive",
        "doc_setting_tweak",
        "terminal",
    },
    ["KOMenu:disabled"] = {
        "more_plugins"
    },
}

return order

If you don't explicitly disable submenus or items, they'll pop up as new in the left-most menu. That's intended so that people who customize their menus are alerted of new features.

@daemongloom
Copy link

Of course, the menus are customizable. You can put your overrides in settings/reader_menu_order.lua and settings/filemanager_menu_order.lua. The defaults can be found in ui/elements.

It works, thanks. Would be great if there is a toggle (in plugin management, for example) that allows to do that without creating lua files though.

@Frenzie
Copy link
Member

Frenzie commented Mar 27, 2020

The menu structure is the way it is by design. The fact that these are all plugins is an irrelevant technical detail from a UX viewpoint.

PRs welcome for a full LibreOffice-style menu customization UI. ;-)

@Frenzie Frenzie modified the milestones: 2020.04, 2020.05 Apr 15, 2020
@Frenzie Frenzie modified the milestones: 2020.05, 2020.06 May 17, 2020
@Frenzie Frenzie modified the milestones: 2020.06, 2020.07 Jun 15, 2020
Frenzie pushed a commit that referenced this issue Jun 19, 2020
Err, kind of nitpick PR. Is just add some "permanent" menus other than plugins to the new "more_tools" submenu. So it will never be empty.

Follow-up: #6279
Supersedes: #5512 #6092
Fixes: #5461
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment