Bug 160183 - Sidebar collapsed state should not be global
Summary: Sidebar collapsed state should not be global
Status: RESOLVED DUPLICATE of bug 95347
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-13 18:28 UTC by Rafael Giusti
Modified: 2024-03-14 23:49 UTC (History)
2 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 Rafael Giusti 2024-03-13 18:28:27 UTC
Description:
The visibility of the sidebar affects all applications in the suite. Closing/opening the sidebar in one application causes it to remaing closed or open when a different application is launched.

Steps to Reproduce:
1. Launch LibreOffice Impress
2. Make sure the sidebar is showing
3. Close Impress
4. Launch LibreOffice Calc
5. The sidebar will be showing. Close it
6. Launch Impress
7. The sidebar will be showing, even though you closed it the last time you ran Impress

Actual Results:
Showing the sidebar in Impress forces it to show in Calc; and vice-versa.

Expected Results:
One should be able to keep the sidebar visible in one application (say, Impress), but not in others (say, Calc).


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.4.7.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Debian package version: 4:7.4.7-1+deb12u1
Calc: threaded
Comment 1 Rafael Giusti 2024-03-13 18:29:57 UTC
I made a mistake in step 7. It should have been

7. The sidebar will NOT be showing, even though you SET IT TO VISIBLE it the last time you ran Impress
Comment 2 V Stuart Foote 2024-03-14 16:09:16 UTC
Can not confirm. The SB state is recorded to LibreOffice user profile per LO module, and its state (open/closed and specific SB deck) is retained for each module on relaunch.

It is not a global setting. 

Each LO module was treated individually from 4.2, as for bug 69354 [1]. While work on bug 67770 added the per module/per deck details to profile at 6.0

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

=-ref-=

[1] https://cgit.freedesktop.org/libreoffice/core/commit/?id=b1314f22eb8de4359b5360194c04996351e9a6c2
[2] https://gerrit.libreoffice.org/17992
[3] https://gerrit.libreoffice.org/41876
Comment 3 Rafael Giusti 2024-03-14 17:47:57 UTC
I just upgraded to 24.2.0.3 using Debian backports and the issue is still affecting me.


   Version: 24.2.0.3 (X86_64) / LibreOffice Community
   Build ID: 420(Build:3)
   CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
   Locale: en-US (en_US.UTF-8); UI: en-US
   Debian package version: 4:24.2.0-1~bpo12+1
   Calc: threaded


Both Impress and Calc are modifying only a few files when I change the visibility of the sidebar. I used Meld to see which files were modified. This is the list:


  ~/.config/libreoffice/4/user/config/fontnameboxmruentries
  ~/.config/libreoffice/4/user/pack/config/fontnameboxmruentries.pack
  ~/.config/libreoffice/4/user/pack/registrymodifications.pack
  ~/.config/libreoffice/4/user/registrymodifications.xcu


The specific configuration that is affecting me happens in registrymodifications.xcu. And the following is the only line that is modified when the I open the module, show/hide the sidebar, and then close it:


<item oor:path="/org.openoffice.Office.Views/Windows"><node oor:name="SplitWindow2" oor:op="replace"><prop oor:name="Visible" oor:op="fuse"><value xsi:nil="true"/></prop><node oor:name="UserData"><prop oor:name="UserItem" oor:op="fuse" oor:type="xs:string"><value>V1,0,1,10336</value></prop></node><prop oor:name="WindowState" oor:op="fuse"><value xsi:nil="true"/></prop></node></item>


I can trigger the sidebar to show or hide without using the LO interface by manually changing the <value> tag above. If it's V1,0,1,10336, then it is hidden in all modules (Calc, Impress, Writer are the ones I tested). If it's V1,2,1,10336, then the sidebar shows in all modules.
Comment 4 V Stuart Foote 2024-03-14 18:24:10 UTC
(In reply to Rafael Giusti from comment #3)
Again, can not confirm. The <Ctrl>+F5 UI toggle to show/hide the SB does not set the SplitWindow2 stanza value V1,2,1,10336 to be V1,0,1,10336. Each SB Deck keeps its deck to use value as set.

I can confirm that if I set the SplitWindow2 value to V1,0,1,10336 the SB is closed on opening, but with <Ctrl>+F5 toggle in the UI it is recorded and saved as V1,2,1,10336.

You should see a "LastActiveDeck" stanza populated in registrymodifications.xcu:

<item oor:path="/org.openoffice.Office.UI.Sidebar/Content"><prop oor:name="LastActiveDeck" oor:op="fuse"><value><it>any,PropertyDeck</it><it>com.sun.star.formula.FormulaProperties,ElementsDeck</it><it>com.sun.star.sheet.SpreadsheetDocument,PropertyDeck</it><it>com.sun.star.text.TextDocument,GalleryDeck</it></value></prop></item>

Believe the "any,PropertyDeck" is the default in profile, and specific decks take changes with usage.
Comment 5 Rafael Giusti 2024-03-14 19:25:33 UTC
Ah! I see. When I press Ctrl+F5 or check/uncked the View/Sidebar meu item it does indeed toggle visibility for each LO module.

However, what I am doing is click the small vertical "Hide" button with an arrow pointing to the right that stays on the very edge of the sidebar. That setting affects all modules.

Sorry, I had not noticed the difference between these two before.

This fixes my issue. But I still think one should be able to show/hide the sidebar in each module separately, since everything else in the UI is specific to a module. It's much more convenient/intuitive to do that clickling the sidebar "Hide" button than Ctrl+F5/menu.
Comment 6 Stéphane Guillou (stragu) 2024-03-14 23:49:16 UTC
(In reply to Rafael Giusti from comment #5)
> Ah! I see. When I press Ctrl+F5 or check/uncked the View/Sidebar meu item it
> does indeed toggle visibility for each LO module.
> 
> However, what I am doing is click the small vertical "Hide" button with an
> arrow pointing to the right that stays on the very edge of the sidebar. That
> setting affects all modules.
> 
> Sorry, I had not noticed the difference between these two before.
The View menu's "Sidebar" item acts consistently with other items in the menu, as e.g. Status Bar, zoom level and User Interface (if set to one component only) persist for each component separately. (Although there's Data Sources outlier, which does not persist at all.)

But if the whole sidebar's visibility is kept per component, I agree that its collapsed or expanded state should also be persistent per component and not globally.
Which is already requested in bug 95347, so marking as duplicate.

Thank you both!

*** This bug has been marked as a duplicate of bug 95347 ***