Bug 126257 - Writer styles: Heading subgroup for TOC related stuff
Summary: Writer styles: Heading subgroup for TOC related stuff
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:6.4.0
Keywords:
Depends on:
Blocks: Sidebar-Styles
  Show dependency treegraph
 
Reported: 2019-07-06 21:31 UTC by andreas_k
Modified: 2019-08-26 08:21 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
TOC in Menubar and Sidebar (82.41 KB, image/png)
2019-07-07 06:34 UTC, andreas_k
Details
Test document 1 (18.99 KB, application/vnd.oasis.opendocument.text)
2019-08-14 07:28 UTC, Heiko Tietze
Details
Test document 2 (18.97 KB, application/vnd.oasis.opendocument.text)
2019-08-14 07:29 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andreas_k 2019-07-06 21:31:56 UTC
Description:
if you check the styles sidebar you get by default the Hierarchical view.

Steps to Reproduce:
1. writer empt file
2. styles sidebar
3. Hierarchical View

Actual Results:
The Hierarchical View will show

Default Style
- Heading
  - Bibliography Heading
  - Contents Heading
  - Figure Index Heading
  - Index Heading
  - Object Index Heading
  - Table Index Heading
  - User Index Heading

  - Heading 1 .. 10
  - Title
  - Subtitle

Expected Results:
As the Heading items listed in the first section are related to Table of Contents I suggest to make an subgroup for them, so the structure is easier to understood.

- Heading
  - Heading 1 .. 10
  - Title
  - Subtitle
  - Table of Contents
    - Bibliography Heading
    - Contents Heading
    - Figure Index Heading
    - Index Heading
    - Object Index Heading
    - Table Index Heading
    - User Index Heading


Reproducible: Always


User Profile Reset: No



Additional Info:
Have the TOC styles in one subgroup make the Heading Section easier to read and for the user it's clear that the styles are related to Table of Contents so the structure show also the usage of the styles.
Comment 1 Dieter 2019-07-07 04:22:15 UTC
I don't understand, why a bibliography is related of TOC. And also an index is not related to TOC. So proposal confuses me.
Comment 2 andreas_k 2019-07-07 06:34:41 UTC
Created attachment 152610 [details]
TOC in Menubar and Sidebar

If you have a look at the menubar, the bibliography stuff is in writer -> menubar -> Insert -> Table of Contents and Index

I know you can group it also with index, but there is already an Index section in the styles sidebar but we can call the group "Table of Contents and Index"
Comment 3 Roman Kuznetsov 2019-07-07 14:41:54 UTC
may be better is

- Heading
  - Heading 1 .. 10
  - Title
  - Subtitle
  - Special
    - Bibliography Heading
    - Contents Heading
    - Figure Index Heading
    - Index Heading
    - Object Index Heading
    - Table Index Heading
    - User Index Heading

and I would don't touch it
Comment 4 andreas_k 2019-07-07 19:38:12 UTC
Special is also fine and I would add only an group NO style changes.
Comment 5 Thomas Lendo 2019-07-07 21:13:17 UTC
I'm no fan of senseless styles like 'Special'. Every item should have a meaning. Otherwise this clutters the style list.
Comment 6 Cor Nouws 2019-07-08 09:32:36 UTC
(In reply to andreas_k from comment #0)

> Expected Results:
> As the Heading items listed in the first section are related to Table of
> Contents I suggest to make an subgroup for them, so the structure is easier
> to understood.
Sympathy for the idea.
However, the order seems to be alphabetical. In Dutch it's not as in your description. So:

> - Heading
>   - Heading 1 .. 10
>   - Title
>   - Subtitle
>   - Table of Contents
>     - Bibliography Heading
>     - ...

may end up as
> - Heading
>   - Heading 1 .. 10
>   - Table of Contents
>     - Bibliography Heading
>     - ...
>   - Title
>   - Subtitle
>   - ...

??
Comment 7 Dieter 2019-07-08 15:08:26 UTC
(In reply to andreas_k from comment #4)
> Special is also fine and I would add only an group NO style changes.

We should consider that in view "All Stles" a style "Special" is unclear. "Special Headings" would be more useful.
Comment 8 Heiko Tietze 2019-07-12 11:35:31 UTC
A heading is a title for either paragraphs (h1..h9) or (not so) "special" objects that may or may not find it's way into a ToC later. I don't see any benefit from purging the Heading section.
Comment 9 andreas_k 2019-07-15 23:27:57 UTC
> I don't see any benefit from purging the Heading section.

I don't see the benefit to have this "special" heading styles, which are very document specific in the main heading subsection. 

I think one of the reason LibO has an Styles main menu section in the writer menubar is that LibO "force" the user to use styles, but than the styles sidebar should support ALL users, not only users how know where some specific styles were used.

I don't see that there is an disadvantage to hide file specific styles into an subgroup.
Comment 10 Cor Nouws 2019-07-17 15:57:07 UTC
what about comment#6 ?
Comment 11 andreas_k 2019-07-17 21:18:02 UTC
I think I have a good name for the "special" group

  - Index Heading
    - Bibliography Heading
    - Contents Heading
    - Figure Index Heading
    - Index Heading
    - Object Index Heading
    - Table Index Heading
    - User Index Heading

"Index Heading" could be used cause all styles that are not Heading are in the Group "Index" so "Index Heading" will be consequent.

I know that the alphabetic order is an issue, but now there are 19 styles in the Heading group with "Index Heading" It will be

- Heading
   - Heading 1 - 10
   + Index Heading
   - Title
   - Subtitle

So only 13 items in the group.
Comment 12 andreas_k 2019-07-17 21:19:56 UTC
we discussed in the design meeting that have an "Index Heading" will be an additional Style (all paragraph styles show 122 items), so the number increase, but as all "Index Heading" substyles has the same settings it will be easier to change ALL different Index Heading styles once, which is from my point of view an improvement.
Comment 13 Heiko Tietze 2019-07-18 05:39:25 UTC
We talked about this topic in the design meeting. While more organization is always welcome the drawback of another level is the unclear relevance of this new style, whether it's called "Special", "Table of Contents", or "Index Headings" (Index Styles is used at the filters dropdown).

So as long we do not get more clear opinions to change we keep the status quo (NEEDINFO for more input).

As alternative solution Bogdan suggested to introduce a new filter type, let's say "Simple Hierarchical", and just filter out the not so frequently used styles.

This applies also to bug 126258 and bug 126277.
Comment 14 Dieter 2019-07-18 06:09:19 UTC
(In reply to Heiko Tietze from comment #13)
> We talked about this topic in the design meeting. While more organization is
> always welcome the drawback of another level is the unclear relevance of
> this new style, whether it's called "Special", "Table of Contents", or
> "Index Headings" (Index Styles is used at the filters dropdown).

I'm fine with Andreas' proposal in comment 11. To avoid two styles "Index Heading" I propose to rename style in the filters dropdown to "alphabetical index heading" or "keyword index heading". This would also makes the usecase more clear.
Comment 15 Heiko Tietze 2019-07-22 08:23:03 UTC
@Cor, @Stuart: What's your opinion here?
Comment 16 Cor Nouws 2019-07-25 19:31:55 UTC
(In reply to andreas_k from comment #11)
> I know that the alphabetic order is an issue, but now there are 19 styles in
> the Heading group with "Index Heading" It will be
> 
> - Heading
>    - Heading 1 - 10
>    + Index Heading
>    - Title
>    - Subtitle
> 
> So only 13 items in the group.
OK, that is reasonable. OK from me.
Comment 17 Heiko Tietze 2019-08-13 09:12:48 UTC
No further input, taking. I'm a bit afraid of manipulating styles as it might be a regression to move a style below another. Meaning, if a user has defined Heading Index but not Table Heading the latter will take the parental information and potentially affect existing documents.

Miklos, could you please take a look on this and the patch I'll submit in a few minutes (if unit test allow it).
Comment 18 Heiko Tietze 2019-08-13 09:50:25 UTC
https://gerrit.libreoffice.org/#/c/77394/
Comment 19 Heiko Tietze 2019-08-14 07:28:08 UTC
Created attachment 153371 [details]
Test document 1

Index Heading defined as red and Serif with 6.1 (?) - loading it with the patch moves the style entry out of the new submenu into the upper Heading category (as it is today).
Comment 20 Heiko Tietze 2019-08-14 07:29:13 UTC
Created attachment 153372 [details]
Test document 2

Second test with Index Heading in greed and mono - same result. Looks like we store the hierarchy of styles.
Comment 21 andreas_k 2019-08-14 07:30:05 UTC
And why it change the color and the font in 6.1?
Comment 22 Heiko Tietze 2019-08-14 07:31:31 UTC
(In reply to andreas_k from comment #21)
> And why it change the color and the font in 6.1?

Don't understand your question.
Comment 23 Commit Notification 2019-08-14 08:00:06 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/744f70386727c78a19bd7c1de7425392b98783c7%5E%21

Resolves tdf#126257 - Writer styles hierarchical organization

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.
Comment 24 Dieter 2019-08-26 08:21:55 UTC
Verified with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 3e64065612acec2eb29aa21e2b515953422256d7
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-08-15_22:57:26
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Heiko, thanks for fixing this.