Description: (This is a follow-up bug of https://bugs.documentfoundation.org/show_bug.cgi?id=36308.) * * * > The second part of the request wasn't filled: "An option to open all > branches at once is highly desirable too". > This is highly necessary for someone that needs to navigate along long > documents. * https://bugs.documentfoundation.org/show_bug.cgi?id=36308#c19 * https://bugs.documentfoundation.org/show_bug.cgi?id=36308#c21 Currently, when you open a document (consider a document with a lot of headings from level 1 to level 4), all heading branches in Navigator will be collapsed. To have them visible - you need to expand them manually - each one. Of course, it could be tedious. It will be very useful to have an option to quickly expand all these branches to specific level. * * * A possible way to implement such feature: We already have "Heading Levels Shown" button in Navigator. Its behavior could be slightly changed: instead of simply limit the visible depth of the headings, it could automatically expand them to this level. This (or similar) idea was already described by Christoph: >> An option to open all branches at once is highly desirable too. > The "Show heading levels" dropdown "filter" should be converted into a command list. So if the user sets "5", then all the headings until level 5 should be expanded. All further levels will still be expandable by the user. If the user sets "1", then all headings are collapsed but the main headings. Still, the user may expand them manually - there is no hidden pre-filtering. (https://bugs.documentfoundation.org/show_bug.cgi?id=36308#c1) Steps to Reproduce: 1. Create a document with a lot of headings from level 1 to level 4. 2. Expand these heading in Navigator. 3. Close document and then open it again. 4. The headings in Navigator will be collapsed and you will be required to expand them one by one. Actual Results: - Expected Results: - Reproducible: Always User Profile Reset: No Additional Info: -
This is a workaround I use for myself (Windows only, AutoHotkey): ``` #SingleInstance, Force SendMode, Input F1:: Loop 100 Send, {Right}{Down} Send, {Home} Return ```
(In reply to John from comment #0) > We already have "Heading Levels Shown" button in Navigator. Its behavior > could be slightly changed: instead of simply limit the visible depth of the > headings, it could automatically expand them to this level. I strongly support this proposal.
Yes, the filter of "Heading Levels Shown" is pointless but it's also not common to have a toolbar button that shows up tree items to a certain level. So while the proposal is a viable solution, I suggest to remove the toolbar button and to introduce a context menu with "Show all". We should also implement the standard shortcut * for it that opens all levels of the selected drive in MS explorer, at least. We could expand the context menu by another option "Show all at this level", which keeps H3..H10 collapsed when applied to H2, for example.
Heiko, we also should consider bug 58129 (show headings expanded in Navigator when a text document is opened). Perhaps it is possible to integrate it into bug 128058.
Yes, bug 58192 is kind of a duplicate. We should perhaps expand the levels by default depending on the number of headings - and store the last view.
Hi all, Here is a patch that expands all subheadings of heading when it is expanded. https://gerrit.libreoffice.org/#/c/80702/
Created attachment 155014 [details] Expand subheadings when heading is expanded I have attached a demonstration video of the patch behavior. Is this what is wanted?
Created attachment 155015 [details] headings test file
(In reply to Jim Raykowski from comment #7) > Created attachment 155014 [details] > Expand subheadings when heading is expanded > > I have attached a demonstration video of the patch behavior. Is this what is > wanted? Thank you, for the patch. I think, it could be an emprovement. But (as far as I understodd) the idea in comment 0 was to select the display of the heading levels with "Outline level" from the heading context menu. Steps: 1. Open headings in navigator 2. Open context menu in any heading 3. Select "Outline level" and choosea level 4. All headings until this level are expanded (that would be the desired result)
@Dieter - Thanks for the feedback. I will see about doing that.
(In reply to Jim Raykowski from comment #10) > @Dieter - Thanks for the feedback. I will see about doing that. Please also consider my comment 3 (expand functions via context menu).
Jim is implementing the * plus context menu solution.
Seems I have reinvented the wheel. While looking through the code that handles keyboard interaction for the Navigator content tree I found that 'ctrl +' expands all and 'ctrl -' collapses all. So on to the content menu part of this request :-)
> it's also not common to have a toolbar button that shows up tree > items to a certain level. So while the proposal is a viable solution, > I suggest to remove the toolbar button and to introduce a context > menu with "Show all". When I wrote about the button I mean that it should work similar to quick filters in Calc and Excel. You _filter_ the levels which should be shown. (It should be said that the most appropriate icon in this case will be the funnel. But it is already in use.) Initially, when I proposed this idea, I mean that it should work for all headings in Navigator at once. The advantage of context menu is that it is better suited for individual heading. I.e. consider the following document: ``` [-] Headings [-] Foo Aaa Bbb Ccc [-] Bar Ddd Eee Fff ``` * If you want to expand _all_ headings (there will be no difference with proposed button solution) - you should call this context menu from "Headings" item. * If you want to expand only "Foo" heading - you should call context menu from "Foo". So, the context menu idea looks more flexible.
(In reply to Jim Raykowski from comment #13) A hidden gem? Yes! :-) Though it seems they work a little inconsistent. * 'ctrl +' expands current heading. * 'ctrl -' collapses all headings. Expected: should collapse only current heading. I think it could be additional pair of shortcuts: 'ctrl shift +' and 'ctrl shift -'. * 'ctrl +' and 'ctrl -' should expand/collapse current heading. * 'ctrl shift +' and 'ctrl shift -' should expand/collapse all headings.
Created attachment 155105 [details] expand all menu item when on heading content type entry
Created attachment 155106 [details] expand all menu item when on heading content entry
Here is a patch that adds Expand All to the content tree context menu. It only appears for headings with children: https://gerrit.libreoffice.org/#/c/81003/
I reworked the patch to make Ctrl * expand and collapse treelist entries. It address Johns concern of Ctrl - collapsing all parents to the root. Ctrl * will only collapse to the focused entry and like Ctrl + will expand all children. https://gerrit.libreoffice.org/#/c/80702/https://gerrit.libreoffice.org/#/c/80702/
(In reply to Jim Raykowski from comment #19) > https://gerrit.libreoffice.org/#/c/80702/https://gerrit.libreoffice.org/#/c/ > 80702/ Super cool, works like a charm. Now we should expose this easter egg to the users with the context menu.
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/888ac516aacbc30a8e9331f6aba7684228568871 tdf#128058 Make ctrl * expand/collapse tree list entries It will be available in 6.4.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.
It is stated that the path was pushed to the master, but I cannot understand which build should be downloaded to test it: there are a lot of available ones. Also, I'm not sure that this build will be 32-bit. So, instead of writing _after_ testing, I will simply write it right now. From the current discussion it is follows that: * 'ctrl *' will expand/collapse all headings from/to the current heading. * There are no changes related to the 'ctrl +' and 'ctrl -'. Is it correct understanding? In case the anser is "yes", isn't it better to use * 'ctrl +' and 'ctrl -' to expand/collapse all headings from/to the current heading. * 'ctrl shift +' and 'ctrl shift -' to expand/collapse _all_ headings (all headings in the overall document). ?
Slightly off-topic, but could be useful in the context of the current discussion: as I discovered today, Ctrl-Enter will enable/disable "Content Navigation View" (CNV). Pre-requirements: * The focus should be on some element inside the Navigator. E.g. if you want to enable CNV for headings, the focus should be either on "Headings" item or on some heading. * To disable CNV, the focus should be on some element under the root element, but not on the root element itself. E.g. if you want to disable CNV for headings, the the focus should be on some heading, but not on the "Headings". Tested with LO 6.2.7.1 on Windows 7.
Update: the second pre-requirement isn't true, my fault. So, Ctrl-Enter works quite good.
(In reply to John from comment #22) > It is stated that the path was pushed to the master, but I cannot understand > which build should be downloaded to test it: there are a lot of available > ones. Also, I'm not sure that this build will be 32-bit. Hi John, Daily builds for Win-x86 can be found here: https://dev-builds.libreoffice.org/daily/master/Win-x86@39/ At the time of this post the newest daily build available is 2019-10-17. That is a day before the patch was merged. The Win-x86_64 version found here is 2019-10-20: https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb77-TDF/
(In reply to John from comment #23) > Slightly off-topic, but could be useful in the context of the current > discussion: > > as I discovered today, Ctrl-Enter will enable/disable "Content Navigation > View" (CNV). I saw that while looking in the code. Would be nice to add to the help document if it isn't already there along with the new ctrl * and other shortcuts and key uses available for tree lists, ctrl +, ctrl -, Home, End, Right and Left arrow expand and collapse, etc. These might also make good tips for the wonderful recently added tip of the day dialog, kudos to Heiko for that :-) https://www.libreoffice.org/community/docs-team/
(In reply to John from comment #22) > From the current discussion it is follows that: > > * 'ctrl *' will expand/collapse all headings from/to the current heading. > * There are no changes related to the 'ctrl +' and 'ctrl -'. > > Is it correct understanding? yes > > In case the anser is "yes", isn't it better to use > > * 'ctrl +' and 'ctrl -' to expand/collapse all headings from/to the current > heading. > * 'ctrl shift +' and 'ctrl shift -' to expand/collapse _all_ headings (all > headings in the overall document). > To make a + with my laptop keyboard I need to hold the shift key down. So ctrl shift + is the same as ctrl + for me and ctrl shift - is ctrl _.
Adding Olivier and Ilmari to keep four more eyes on the documentation part. (In reply to Jim Raykowski from comment #27) > To make a + with my laptop keyboard I need to hold the shift key down. In my first reviews of Jim's patch I tried the numpad * - it's not working because of the different keycode. Hard-coded shortcuts are not a good solution anyway.
(In reply to Jim Raykowski from comment #27) > To make a + with my laptop keyboard I need to hold the shift key down. So > ctrl shift + is the same as ctrl + for me and ctrl shift - is ctrl _. This is true for my keyboard as well. Of course, when I say 'ctrl+' and 'ctrl-' I mean that the shift is not required. So, technically, it will be 'ctrl=' and 'ctrl-'.
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3ed56f407235feb97ee2565a613e5f1d2bb2d925 tdf#128058 Add Expand Collapse All to Navigator context menu It will be available in 6.4.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.
Verified with Version: 6.4.0.0.alpha1 (x64) Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787 CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; Locale: de-DE (de_DE); UI-Language: en-US Calc: threaded Jim, will you add an option to context menu, like Heiko proposes in comment 20?
(In reply to Dieter Praas from comment #31) > Jim, will you add an option to context menu, like Heiko proposes in comment > 20? It was added, see comment 30
(In reply to Buovjaga from comment #32) > (In reply to Dieter Praas from comment #31) > > Jim, will you add an option to context menu, like Heiko proposes in comment > > 20? > > It was added, see comment 30 You're right, sorry. I will test it with 6.4Beta1.
> (In reply to Buovjaga from comment #32) > > (In reply to Dieter Praas from comment #31) > > > Jim, will you add an option to context menu, like Heiko proposes in comment > > > 20? > > > > It was added, see comment 30 Verified with Version: 6.4.0.0.beta1 (x64) Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920 CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; Locale: de-DE (de_DE); UI-Language: en-US Calc: threaded
Version: 6.3.5.2 (x86) Build ID: dd0751754f11728f69b42ee2af66670068624673 CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; Locale: en-US (en_US); UI-Language: en-US Calc: threaded `Ctrl` + `Numpad -`/`Numpad +` to collapse/expand all headings `Ctrl` + `Left`/`Right` to collapse/expand selected heading "Normal -" works as well, but "normal +" doesn't. Is it by design? On my keyboard: ``` ┌────────┐ ┌────────┐ │ _ │ │ + │ │ │ │ │ │ - │ │ = │ └────────┘ └────────┘ ``` I tried to press the second button with and without Shift - it doesn't expand headings in my Navigator.
(In reply to John from comment #35) > Version: 6.3.5.2 (x86) > Build ID: dd0751754f11728f69b42ee2af66670068624673 > CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; > Locale: en-US (en_US); UI-Language: en-US > Calc: threaded You are testing with the wrong version. This change never made it to the older 6.3 branch. Please use 6.4.x.