Bug 468317 - Duplicated 'show sidebar' action
Summary: Duplicated 'show sidebar' action
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 23.03.90
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: regression
: 468882 469108 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-04-09 06:23 UTC by Kishore Gopalakrishnan
Modified: 2023-04-28 20:55 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 23.04.1


Attachments
Screenshot of the duplicated entries in the keyboard shortcuts dialog (80.28 KB, image/png)
2023-04-09 06:23 UTC, Kishore Gopalakrishnan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2023-04-09 06:23:50 UTC
Created attachment 157971 [details]
Screenshot of the duplicated entries in the keyboard shortcuts dialog

SUMMARY
In 'Settings > Configure Keyboard Shortcuts', I see two items called 'show sidebar', but only one of them works (the other one does not affect the sidebar even when a keyboard shortcut is assigned to it).

Similarly, there are two 'show sidebar' actions in the list of available toolbar buttons, only one of which works.

STEPS TO REPRODUCE
Part A (duplicated keyboard shortcut)
1. Settings > Configure Keyboard shortcuts
2. Search for 'sidebar'

Part B (duplicated toolbar entry)
1. Right-click on Okular toolbar > Configure toolbars
2. In 'main toolbar <okular_shell>', search for 'show sidebar'
3. In 'main toolbar <okular_part>', search for 'show sidebar'
4. Place the 'show sidebar item in <okular_part> onto the toolbar and save changes
5. Try to find the new 'show sidebar' button on the toolbar

OBSERVED RESULT
Part A: Two items called 'show sidebar' (see attached screenshot), one of which does nothing when a keyboard shortcut is assigned to it
Part B: Only the show sidebar item in okular_shell works, while the other one shows no button even if placed on the toolbar.

EXPECTED RESULT
Only one 'show sidebar' item

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.10-arch1-1 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
This is reproducible even in a fresh user account, so it does not seem to be an issue of stale config files

Bug is reproducible on Arch Linux with Okular versions 23.08.80 and 23.08.90

Git bisect points to
2fbab13e1f439f0dd2c6758d51c80e86ee49392a is the first bad commit
commit 2fbab13e1f439f0dd2c6758d51c80e86ee49392a
Author: Eugene Popov <popov895@ukr.net>
Date:   Thu Dec 22 22:50:55 2022 +0000

    Port sidebar to QDockWidget
    
    With this MR, the sidebar can now be (if not locked):
    * docked to the left or right side
    * undocked and floated as an independent window
    * closed with the close button in the header
    
    BUG: 455013

 interfaces/viewerinterface.h |   7 ++
 part/part.cpp                |   5 ++
 part/part.h                  |   1 +
 part/sidebar.cpp             |   5 ++
 part/sidebar.h               |   2 +
 shell/shell.cpp              | 162 ++++++++++++++++++++++++++++++++++++++++++-
 shell/shell.h                |   6 +-
 shell/shell.rc               |   7 +-
 8 files changed, 192 insertions(+), 3 deletions(-)
Comment 1 Bug Janitor Service 2023-04-09 16:33:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/718
Comment 2 Albert Astals Cid 2023-04-10 08:33:08 UTC
Don't change the assignee please
Comment 3 krzmbrzl 2023-04-21 06:20:39 UTC
I can also add that the variant that does not work seems to be the one that has been used before the duplicate was introduced, which has the effect that the default keybind (F7) is bound to the non-functioning variant of this action and therefore this default shortcut doesn't work (anymore) after an upgrade to this version of Okular.
Comment 4 Albert Astals Cid 2023-04-23 15:11:12 UTC
Git commit a25e37e6f723106577ff9a2c1a6cf02dccf6b594 by Albert Astals Cid, on behalf of Eugene Popov.
Committed on 23/04/2023 at 14:39.
Pushed by aacid into branch 'master'.

Reuse an existing action to toggle sidebar visibility

M  +10   -12   shell/shell.cpp
M  +1    -4    shell/shell.rc

https://invent.kde.org/graphics/okular/commit/a25e37e6f723106577ff9a2c1a6cf02dccf6b594
Comment 5 Albert Astals Cid 2023-04-23 16:44:32 UTC
Git commit 12f2228254d3831ed1131eb87e6e99302a230011 by Albert Astals Cid, on behalf of Eugene Popov.
Committed on 23/04/2023 at 16:43.
Pushed by aacid into branch 'release/23.04'.

Reuse an existing action to toggle sidebar visibility
(cherry picked from commit a25e37e6f723106577ff9a2c1a6cf02dccf6b594)

M  +10   -12   shell/shell.cpp
M  +1    -4    shell/shell.rc

https://invent.kde.org/graphics/okular/commit/12f2228254d3831ed1131eb87e6e99302a230011
Comment 6 Nate Graham 2023-04-24 19:02:55 UTC
*** Bug 468882 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2023-04-28 20:55:36 UTC
*** Bug 469108 has been marked as a duplicate of this bug. ***