Bug 157681 - Add an opportunity to hide sections via context menu at the Navigator
Summary: Add an opportunity to hide sections via context menu at the Navigator
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0 inReleaseNotes:24.2
Keywords:
Depends on:
Blocks: Navigator Section
  Show dependency treegraph
 
Reported: 2023-10-10 10:04 UTC by Roman Kuznetsov
Modified: 2023-12-15 08:41 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Navigator Sections context menu protect and hide section demo (1.93 MB, video/x-matroska)
2023-11-20 02:38 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2023-10-10 10:04:39 UTC
Description:
Add an opportunity to hide any file (but not to delete it) in master document like a slide in a presentation

In Impress you can hide any slide in your presentation and that slide will no showed in Slide Show mode

The idea about the same opportunity for inserted files in your master document: if you hide any file then final master document will no contain that file content.

Would be cool to have the context menu item "Hide" in Navigator for files in master document Navigator mode

It maybe useful if you create any manuals for some devices, when these devices have some small differences, etc.

Steps to Reproduce:
-

Actual Results:
We can't hide files in master document

Expected Results:
We can hide files in master document


Reproducible: Always


User Profile Reset: No

Additional Info:
-
Comment 1 Roman Kuznetsov 2023-10-10 10:05:42 UTC
Jim and UX-team what do you think about it?
Comment 2 Jim Raykowski 2023-10-11 23:40:14 UTC
(In reply to Roman Kuznetsov from comment #0)
> Description:
> Add an opportunity to hide any file (but not to delete it) in master
> document like a slide in a presentation
Hi Roman,
The 'Edit link' popup menu item opens the 'Edit Section' dialog which gives the opportunity to hide sections. I suppose a 'Hide' check menu item could be added to the Navigator popup menu to bypass the need to open the dialog to hide a section. Let's see what the UX team thinks.
Comment 3 Heiko Tietze 2023-10-16 15:07:00 UTC
To hide and to protect are the primary actions for a section. And it would be great to have contextual access to it from the Navigator.
Comment 4 Jim Raykowski 2023-11-20 02:38:38 UTC
Created attachment 190914 [details]
Navigator Sections context menu protect and hide section demo

Here is link to a patch that adds protect and hide menu items to the Navigator Sections context menu:
https://gerrit.libreoffice.org/c/core/+/159718

It also makes the same icons appear in the Navigator section entries list that are shown in the Edit Sections dialog sections list to indicate section protect and hide settings.
Comment 5 Heiko Tietze 2023-11-20 08:30:21 UTC
(In reply to Jim Raykowski from comment #4)
> Created attachment 190914 [details]
> Navigator Sections context menu protect and hide section demo

Great work. Unrelated issue: the sections hierarchy is indicated by the white space rather than a true indentation. Makes the inheritance a bit unclear, although for example the hidden attribute would need to be disabled so it can't be on/off independently from the parent.
Comment 6 Jim Raykowski 2023-11-22 07:43:15 UTC
(In reply to Heiko Tietze from comment #5)
> Great work. Unrelated issue: the sections hierarchy is indicated by the
> white space rather than a true indentation. Makes the inheritance a bit
> unclear, although for example the hidden attribute would need to be disabled
> so it can't be on/off independently from the parent.
A demo of true sections hierarchy can be see here:
https://bugs.documentfoundation.org/attachment.cgi?id=190955
Comment 7 Heiko Tietze 2023-11-22 07:46:13 UTC
(In reply to Jim Raykowski from comment #6)
> A demo of true sections hierarchy can be see here:
Much better 👍
Comment 8 Commit Notification 2023-11-29 03:25:07 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/01a02ee7f1dbe7501a89b41e62599fba6a8b33f3

tdf#157681 SwNavigator: Add Protect and Hide menu items to Sections

It will be available in 24.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 9 Roman Kuznetsov 2023-12-10 14:35:21 UTC
Jim, your great patch works only for general Writer document, but it doesn't work in master document unfortunately. 

I checked in

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 0ddd9f7e055a0c1ecb120de3e40c3fdb8373e9dc
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded
Comment 10 Jim Raykowski 2023-12-10 18:50:34 UTC
Hi Roman,

It seems to work the same as using the Edit Section dialog. Only sections that are file linked hold the protected and hidden settings for master documents. Sections inside a linked file don't/can't remember the protected and hidden settings when set from a master document. I think/guess because the master document is only able to view the content of linked files and not changed them directly.
Comment 11 Stéphane Guillou (stragu) 2023-12-15 08:41:16 UTC
Let's keep as "fixed" then, and follow-up in different tickets if needed.

Added to release notes: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F24.2&type=revision&diff=714941&oldid=712682