Download it now!
Bug 88559 - Display of inherited attributes from parent styles in Styles dialog
Summary: Display of inherited attributes from parent styles in Styles dialog
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval, topicUI
: 137439 (view as bug list)
Depends on:
Blocks: Writer-UX Styles-Dialog
  Show dependency treegraph
 
Reported: 2015-01-18 17:24 UTC by belomir
Modified: 2020-10-16 09:56 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
Mockup with small buttons at labels (20.15 KB, image/png)
2020-10-16 09:25 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description belomir 2015-01-18 17:24:01 UTC
Problem description:

When paragraph style is inherited from some parent it ingerit most of properties except those were manually changed.

Those properties are listed in Contain section on Organizer tab. But if there are lot of changed properties searching of them is not simple and convenient.
It would be perfect to see status of each style property inplace besides contain section.

Moreover there's no way to reset any property to be inherited. Changing of property to parent's value does't make it inherited. (The only way in this case is to workaround with creating new style, selecting all oldstyled paragraphs and set to them the new one. But it have its own troubles).

Steps to reproduce:

1. Change one property in inherited paragraph style (it would appear on organizer tab)
2. Change the property back to parent value

Current behavior:

The property is still listed on organizer tab and does not inherit.

Expected behavior:

The propery that is changed have button or any different way to reset proprty status to be inherited.
Comment 1 Robinson Tryon (qubit) 2015-01-25 10:38:19 UTC
Component is 'ux-advise', so
Status -> NEW
Comment 2 Robinson Tryon (qubit) 2016-08-25 04:21:38 UTC Comment hidden (obsolete)
Comment 3 Heiko Tietze 2017-04-18 13:04:41 UTC
Don't understand your problem. You modify the style, e.g. per right click in the styles & formatting sidebar, and it is not clear what happens? The preview is not that bad, IMHO.

Or do you make a direct formatting via toolbar > font size, for instance, and wonder what happen to the style.

And last but not least you could talk about paragraph style vs. character style that is not easily to discriminate from each other when applied to the whole paragraph.
Comment 4 Regina Henschel 2017-04-18 13:57:24 UTC
@Heiko: This report is about managing the content of hierarchical styles in the Style&Formatting dialog.

You can set a property back to 'inherit': In the style properties go to the tab, which contains the property. Then click on button "Standard". Go back to 'Organizer' tab and look what has been removed.
Unfortunately there is no way to set a single property of the tab page back to 'inherit'.
And sometimes the property is removed but still shown in 'Organizer' tab.

There are similar requests in bug 89826, bug 77325 and bug 88921.

The second is about making the inheritance visible in the tab pages. I can think of making the item "italic" or for field entries adding an indicator before or after the content, e.g. '(i) 12pt' instead of simple '12 pt'. No idea how to do it for other kind of controls.

The problem is very old see https://bz.apache.org/ooo/show_bug.cgi?id=3148

I support both requests.
Comment 5 Heiko Tietze 2017-04-18 15:08:10 UTC
(In reply to Regina Henschel from comment #4)
> @Heiko: This report is about managing the content of hierarchical styles in
> the Style&Formatting dialog.

Was afraid of this answer ;-).

So what we need is an indicator at the various properties which one has been overridden. For example, "Caption" has the children "Drawing" and when font style is set bold there instead of italic from the parent it should get an identification. Known solutions are a small icon next to the label, simpler is to add a * to the label or to modify it's appearance, e.g. text in blue. But the latter could get into conflict with the theme.
Comment 6 Yousuf Philips (jay) (retired) 2017-08-03 12:36:54 UTC
We should add a section above 'Contains' called 'Inherited' and then list the name of the parent style followed by its attributes that arent being overwritten by the child style. Example design below for Heading 1

Inherited
 Heading:
  Western text: Liberation Sans, From bottom 0.08 inch + Keep with next paragraph

Contains
 Western Text: 130% + bold + Numbering(Outline) + 1 + Indent left 0.0 inch, Indent right 0.0 inch + From top 0.17 inch, From bottom 0.08 inch

Note: 14pt isnt displayed in 'Heading' as it is being overwritten by the 130% in 'Heading 1'.
Comment 7 Harald Koester 2018-07-16 13:03:10 UTC
(In reply to Regina Henschel from comment #4)

> The second is about making the inheritance visible in the tab pages. I can
> think of making the item "italic" or for field entries adding an indicator
> before or after the content, e.g. '(i) 12pt' instead of simple '12 pt'. No
> idea how to do it for other kind of controls.

I also think, if a font and its size is inherited from the Basic Fonts in the options dialogue [LibreOffice Writer > Basic Fonts (Western|Asian|CTL)], that this should be indicated somehow, e.g. '(o) Liberation Serif' or '(o) 12pt'.
Comment 8 Telesto 2020-08-19 09:13:55 UTC
(In reply to Heiko Tietze from comment #5)
> (In reply to Regina Henschel from comment #4)
> > @Heiko: This report is about managing the content of hierarchical styles in
> > the Style&Formatting dialog.
> 
> Was afraid of this answer ;-).
> 
> So what we need is an indicator at the various properties which one has been
> overridden. For example, "Caption" has the children "Drawing" and when font
> style is set bold there instead of italic from the parent it should get an
> identification. Known solutions are a small icon next to the label, simpler
> is to add a * to the label or to modify it's appearance, e.g. text in blue.
> But the latter could get into conflict with the theme.

Or a (kind of) (colored) border around the dialog items which are inherited. Area would be slightly problematic area. However it would work. Not sure if this is a11y proof..

Ideally combined with a tooltip kind of thing to show where the style is coming from.
Comment 9 Heiko Tietze 2020-10-05 10:24:32 UTC
This has been implemented during GSoC20 by Shivam Kumar Singh [1], remaining tickets are handled in bug 134554.

[1] https://shivam-51.github.io/
Comment 10 Mike Kaganski 2020-10-14 13:27:26 UTC
It can NOT be any kind of WORKSFORME - just because somewhere there is now a power tool, usable only by power users.

This is a really needed missing feature - and it is independent of the Styles Inspector. The style and direct properties dialogs must have indication about what was defined here, and what was not.
Comment 11 Mike Kaganski 2020-10-14 17:17:58 UTC
*** Bug 137439 has been marked as a duplicate of this bug. ***
Comment 12 Thomas Lendo 2020-10-14 20:16:18 UTC
I support Mike's objection in comment 10. Neither single settings can set back to its inherited value nor inherited values are visible in the Styles dialog.
Comment 13 Telesto 2020-10-15 06:30:56 UTC
Small inquiry. This bug and bug 89826 are about the same topic? And works for me because of "Display" taken literally here?

Agreeing with comment 10 of course, but could also be bug 89826
Comment 14 Mike Kaganski 2020-10-15 08:40:50 UTC
Caolán: this bug (a major usability pain actually) depends on abilities of used controls; could you please advise?

This (and related bug 89826) might have many possible fixes, e.g.:

- controls showing default values having blue border (accessibility problem?)
- having bold labels (same)
- having labels include some indicator text
- dedicated additional labels *after* (to the right of (in LTR case)) controls
- having no value at all (but what about controls like borders/color picker, which are not edit controls? Create special "blank" states for them?)
- a variation of the latter, when the controls do have values, but in grey color
- a small "lock" button next to *each* control which pressed state means "use inherited"
...

They all seem to have multiple problems (accessibility; cluttering, etc) - but the main problem is implementability. The way to indicate the status of *each single property* in style dialogs (inherited or defined explicitly here in this style), and (to a lesser extent) a way to reset that single property to inherited status, is really needed thing. The problems should be fixed after the fact (e.g., accessibility could be handled by providing appropriate information to screen reader and tooltip; clutter is of less importance, and let design team to re-order controls to fit better after the fact, etc.)

I say that resetting single properties is needed "to a lesser extent", because if the controls would indicate their "inherited" status (say, have colored border), then using "Standard" button to reset to inherited would be much more usable. But of course, a combined solution (like a small button) would be welcome by many.

Could you please advise what solution is possible/preferred?
Comment 15 Caolán McNamara 2020-10-15 18:40:22 UTC
Well, I don't really have any good answers wrt any specific solution, digging around similar software doesn't show anything obvious to follow as a model.

But from a weld api view we use e.g. "set_message_type" to indicate that an Entry contains an error and not specify how it indicates that error. So I could imagine something similar that leaves it up to each backend to figure out what to do to make that happen in the context of their own capabilities.

Maybe adding some "reset" to right context menus avoids the clutter of extra buttons for that functionality, maybe labels are underlined  or widget backgrounds set to some appropriate theme color.

Maybe something like this feature shouldn't be on all the time, but only if some togglebutton in the button area is depressed. Such a special state would give a little more leeway in that a backend could then position a little "reset" button over the middle of widgets to allow them to be designated reset-back-to-parent. Having a toggle to enable some sort of "overlay" like that would sidestep visual clutter and any need to change any widget layout.
Comment 16 Christian Lehmann 2020-10-16 08:28:10 UTC
As far as I understand, there are the following problems for the UI here:
1) How are unspecified properties of a style handled?
  a) How can the user leave the value for a selected property unspecified?
  b) What does it mean to leave an inherited property unspecified?
2) How can he get an overview that distinguishes between:
  a) values that he fixed for this style
  b) values that his style inherits from the parent (that he chose when pressing 'New')
  c) values that remain unspecified and will be fixed only once a string thus styled is embedded in a given context.

Ad 1: Several voices agree that pressing the 'Standard' button is both too sweeping an action and not really intuitive if one just wants to leave one property unspecified. (This doesn't entail, of course, that the button should be removed.)
Couldn't the list of values enumerated for each of the properties comprise a value 'none'? (Or alternatively a blank field?) As the user starts defining his style, each properties tab would show, for each property, the value inherited from the chosen parent, and otherwise 'none'.
a) The user could set the value of any property to 'none'. For a character style, this would mean that the value is (not inherited from that style's parent, but instead) assigned once a string thus styled is embedded in an actual text.
In the tab containing the property in question, this selection of the user's would keep being shown; i.e., Writer would not replace it by the current default value, in order not to mislead the user about what he fixed and what he left open.
b) Selecting 'none' as the value of an inherited property does not seem to make sense. More in general, one may wonder what sense it makes for the user to change the value of a property that is inherited from the parent that he himself chose. To the extent that he changes the values of such properties, his new style is not actually a child of the chosen parent. If he really wants that, maybe LO should encourage him to step up the hierarchy in choosing an appropriate parent. (As a side effect, such a constraint would greatly simplify handling of the styles hierarchy.)

Ad 2): I think something like comment 6 would solve it for items #a and #b. Nothing needs to be shown about item #c.
Comment 17 Mike Kaganski 2020-10-16 08:35:23 UTC
(In reply to Christian Lehmann from comment #16)

Please don't make this issue confusing.
Your comment made at least two unrelated expansions to the specific issue tracked here.

1. You added a *different* (and real) problem that Character styles may have some properties unspecified, and should not in fact display random values instead. As said: although real problem, this should be tracked separately (possibly already filed?).
2. You suggested a totally new feature to allow making any property undefined, *regardless of inherited state of it*. It is totally irrelevant here. It needs an own feature request.
Comment 18 Mike Kaganski 2020-10-16 08:48:18 UTC
Personally my preference (visually and functionally) would be a *small button* attached to each property's *label*; something like the small "More options" buttons in sidebars, just named "Revert to inherited". They could have tooltips for discoverability; enabled state for indication of "not inherited = defined here" state; and some mnemonic pictogram resembling theme's "undo". This would slightly increase space used for the labels, but would allow to unify this feature - to avoid problems of different resetting methods for e.g. textual properties vs borders or the like...

And I suppose that making it always visible is better compared to a toggle, because this functionality is not something "optional" or "advanced".
Comment 19 Christian Lehmann 2020-10-16 09:04:01 UTC
(In reply to Mike Kaganski from comment #17)
> (In reply to Christian Lehmann from comment #16)
> 
> Please don't make this issue confusing.
It is by treating a display problem in isolation and proposing ad hoc solutions for it that one confuses things. I was trying to be more circumspect.

> Your comment made at least two unrelated expansions to the specific issue
> tracked here.
> 
> 1. You added a *different* (and real) problem that Character styles may have
> some properties unspecified, and should not in fact display random values
> instead. As said: although real problem, this should be tracked separately
> (possibly already filed?).
Yes of course, in Bug 137439, which you yourself marked as a duplicate of the present bug. Now is it isn't it a duplicate?

> 2. You suggested a totally new feature to allow making any property
> undefined, *regardless of inherited state of it*. It is totally irrelevant
> here. It needs an own feature request.
Did I suggest this?
Comment 20 Mike Kaganski 2020-10-16 09:18:09 UTC
(In reply to Christian Lehmann from comment #19)
> > 1. You added a *different* (and real) problem that Character styles may have
> > some properties unspecified, and should not in fact display random values
> > instead. As said: although real problem, this should be tracked separately
> > (possibly already filed?).
> Yes of course, in Bug 137439, which you yourself marked as a duplicate of
> the present bug. Now is it isn't it a duplicate?

In bug 137439, the original problem was "I cannot make some style avoid definition of some property". That was because of this bug primarily. Also it *happened* to operate on a character style not based on a parent which would define that specific property, thus mentioning the other problem. Please re-read my description in that bug: "yes there is problem A, but the *main problem* is problem B". So marking that bug as duplicate of problem B does not make it equal to problem A.

> 
> > 2. You suggested a totally new feature to allow making any property
> > undefined, *regardless of inherited state of it*. It is totally irrelevant
> > here. It needs an own feature request.
> Did I suggest this?

(In reply to Christian Lehmann from comment #16)
> a) The user could set the value of any property to 'none'.
Comment 21 Mike Kaganski 2020-10-16 09:25:29 UTC
Created attachment 166403 [details]
Mockup with small buttons at labels

This mockup shows the idea from comment 18. There are buttons at labels for individual controls (Left/Right/Top/Bottom...); or at groups of controls where they define a single property (Line Arrangement, Shadow Style). Grey mean "no resetting to inherited possible" == "these are already inherited values".

The tooltip allows to see what this button does. The tooltip could of course change to "This value is inherited" for grey buttons.

As shown, this problem (tracked in this bug) is orthogonal to the problem what to display for "not defined in parents" values, which, as mentioned in comment 17, must be a separate issue.
Comment 22 Dieter 2020-10-16 09:53:17 UTC
Thanks for your Mockup, but just for clarifcation: It shows page style dialog, where inherited styles are not possible (at least at the moment). I assume, the mockup is only for paragraph style dialog and character style dialog. Correct?
Comment 23 Mike Kaganski 2020-10-16 09:56:19 UTC
(In reply to Dieter from comment #22)

Absolutely. Another possible inaccuracy is that I didn't care to check which attributes there actually relate to a single inheritable property, and which are separate (so maybe e.g. Left/Right/... should had not have their separate buttons, but one common) ... I assumed that the idea is still shown.