Bug 121369 - Add a Header and Footer parent styles together for better grouping in the hierarchical view
Summary: Add a Header and Footer parent styles together for better grouping in the hi...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: All All
: medium enhancement
Assignee: Heiko Tietze
URL:
Whiteboard: target:6.3.0
Keywords: difficultyBeginner, easyHack, topicDesign
Depends on:
Blocks: Sidebar-Styles
  Show dependency treegraph
 
Reported: 2018-11-12 12:38 UTC by andreas_k
Modified: 2019-09-21 11:57 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Writer Styles Sidebar (7.16 KB, image/png)
2018-11-12 12:38 UTC, andreas_k
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andreas_k 2018-11-12 12:38:55 UTC
Created attachment 146564 [details]
Writer Styles Sidebar

When show Styles in writer sidebar it show by default the Hierarchical Order of the Styles.

e.g. There is an Header, Index, Text Body group where all the substyles are listed.

- Footer
- Footer Left, 
- Footer Right,
- Header, 
- Header Left, 
- Header Right,

are Inherit from Default Style so there is no Subgroup Footer and Header. I propose to define an Group

+ Footer and Header ##new
  - Footer
  - Footer Left,
  - Footer Right,
  - Header, 
  - Header Left, 
  - Header Right

In addition there are some Styles which are needed for special functions like

- Addressee
- Sender

I also propos to have there an Group Header
Comment 1 Heiko Tietze 2018-11-13 08:55:02 UTC
Header and footer styles belong to the "Special Styles" category together with some unrelated options. So calling the newly to be introduced category Special makes no sense. But we could label it "Document Structure" and add also Endnote and Footnote.

Addressee, Complimentary Close, Sender, Signature (this needs discussion!) could be moved into "Letter".

Horizontal Line, Frame Content are also very special, related to "Drawing".


So ultimately we organize the tree by the different use cases. But I wonder also if all styles are needed. In particular the mentioned header and footer styles are identical.
Comment 2 Mike Kaganski 2018-11-13 09:11:27 UTC
(In reply to Heiko Tietze from comment #1)
> In particular the mentioned header and footer styles are identical.

The predefined styles, even identical, might help users:

1. to have something to start, without the need to create something before modifying;
2. to have standard names for standard things, thus helping in unification of different documents by importing styles from some "standard" source.

While I don't say that the mentioned styles are actually necessary (I don't have my own opinion on this matter), the comment is just to remind the considerations when discussing a decision.
Comment 3 andreas_k 2018-11-13 12:34:43 UTC
So l will make an proposal for an better styles overview.
Comment 4 Cor Nouws 2018-11-14 19:09:33 UTC
(In reply to andreas_k from comment #0)

> are Inherit from Default Style so there is no Subgroup Footer and Header. I
> propose to define an Group
> 
> + Footer and Header ##new

could be done.

(In reply to Heiko Tietze from comment #1)
> Header and footer styles belong to the "Special Styles" category together
> with some unrelated options. So calling the newly to be introduced category
> Special makes no sense. But we could label it "Document Structure" and add
> also Endnote and Footnote.

Endnote and Footnote are not document structure.

> Addressee, Complimentary Close, Sender, Signature (this needs discussion!)
> could be moved into "Letter".
> 
> Horizontal Line, Frame Content are also very special, related to "Drawing".

Frame content drawing ?

> So ultimately we organize the tree by the different use cases. But I wonder
> also if all styles are needed. In particular the mentioned header and footer
> styles are identical.

They are used at different places in Page styles, so definitely functional.
Comment 5 Regina Henschel 2018-11-14 19:46:37 UTC
"Hierarchical" does not group styles, but shows their inheritance. Grouping is done in the drop-down list.

Make "Header Left" and "Header Right" inherit from "Header" makes sense to me, same for "Footer Left" and "Footer Right" inherit from "Footer". That way you can set e.g. font name and size in one place and only the special settings for align things differently on right and left pages in the specialist styles.

On the first level of the hierarchy I see these as only useful change in inheritance.
Comment 6 Heiko Tietze 2018-11-15 08:14:36 UTC
Some code pointers:

sw/source/core/doc/DocumentStylePoolManager.cxx
sw/source/core/doc/SwStyleNameMapper.cxx
sw/source/core/doc/poolfmt.cxx

New style "Header and Footer" has to be added (also to l10n files) and the hard-coded inheritance adjusted respectively.

(I keep UX in case of other opinions)
Comment 7 Kenneth Hanson 2018-11-15 18:10:06 UTC
I've been inheriting the header and footer styles as Regina suggests for a while now. I did the same for the List 1/2/3/4/5 families as well, essentially just to get them out of the way, but I refrained from going any further.

I'm very much in favor of adding a mechanism for grouping styles in the hierarchical view based on their intended use, and to use this mechanism to better organize the standard styles. Ideally, it should be possible to collapse these groups as well. This would be an improvement over switching between the current filtered views.

But I think this needs to be separate from the inheritance system, because the styles in a particular group do not necessarily have an formatting properties in common. Also, there could be a need to inherit styles from two different groups. We should consider whether we allow such styles to be displayed separately, obscuring their relationship, or whether child styles should be kept with the parent, reducing the usefulness of the groups.
Comment 8 Thomas Lendo 2018-11-15 21:07:20 UTC
I fear this bug get out of scope. Hierarchical view has nothing to do with grouping.

Why do you want create a new style to have nicer hierarchical view but all other views will be polluted with this new, for users impracticable style?

I'm against this change.

Instead I'm questioning the usefulness of Header/Footer left+right. If it's not necessary we could get rid of these styles and the issue would be solved.

Changing summary to 'Add a Header and Footer parent styles together for better grouping in the hierarchical view'.
Comment 9 Heiko Tietze 2018-11-28 09:58:18 UTC
Patch at https://gerrit.libreoffice.org/#/c/64152/

Header and Footer
* Header
** Header left
** Header right
* Footer
** Footer left
** Footer right

(I also set alignment to right for "Header right" and "Footer right")
Comment 10 Commit Notification 2018-11-28 17:50:38 UTC
heiko tietze committed a patch related to this issue.
It has been pushed to "master":

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

tdf#121369 - Header and Footer parent styles

It will be available in 6.3.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.