Bug 126352 - “Create Style” Dialogue Does not Work Correctly if Opened via Menu or Toolbar: (often/always) shows other styles than the 'own styles', sometimes inactive when it shouldn't ..
Summary: “Create Style” Dialogue Does not Work Correctly if Opened via Menu or Toolbar...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.2.5.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest
Depends on:
Blocks: Styles
  Show dependency treegraph
 
Reported: 2019-07-11 19:52 UTC by Harald Koester
Modified: 2019-07-17 16:57 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Koester 2019-07-11 19:52:58 UTC
In order to reproduce the bug:

[1] Create new text document.
[2] If sidebar is displayed close sidebar, close document and create new document again.
[3] Start to create a new style with menu: Styles > New Style… The Create Style dialogue is displayed. In a list box all “list” styles are displayed. Why are these styles displayed here and now? I would expect an option to choose the style type (paragraph style or character style or …).
[4] Click Help in dialogue. According to the displayed help page the “user-defined” styles should be displayed in the list box. This is definitively not the case, “all” list styles are displayed.
[5] Click a list style in the list box. The style is taken over to the text box “Style Name”. Then OK. A message is displayed that the style already exists. The message is OK but what is the sense of this takeover when you can't create a new style with a name of an existing style? Close message.
[6] Insert a new name. Then OK. The current paragraph style is changed to the new style. I only expect that a new style is created and that the current style is not changed.
[7] Start to create another new style with the menu: Styles > New Style… Now the “used” paragraph styles (Default Style and new style) are displayed. Expected: Only display of user-defined styles. Then Cancel.
[8] Display styles with F11.
[9] Start to create another new style with the menu: Styles > New Style… Now all paragraph styles are displayed. Expected: Only display of user-defined styles.

Furthermore:

(1) I did not find a possibility to create other types of styles than paragraph styles with the menu function.
(2) If you use the icon New Style in the toolbar Formatting at steps 3, 7 and 9 the behaviour is nearly equal, only at step 3 the listed styles are different. Expected: Behaviour should be equal.
(3) The New File function from the horizontal toolbar of the deck Styles in the sidebar also uses the Create Style dialogue. In this case the listed styles are correct, i.e. only the user-defined styles are listed.
(4) Also in Calc the Create Style dialogue is used with similar problems.
(5) Bug occurred first with the introduction of the menu item Styles in Writer (version 5.1.0).

Proposal: 

I do not really see an advantage to list existing or used styles if you like to create a new style. So the list box User-defined Styles can be omitted. Instead a possibility to choose a style type is needed. After such a choice the respective style dialogue with the register Organizer should be opened.
Comment 1 V Stuart Foote 2019-07-13 03:47:49 UTC
Confirmed with 6.2.5.2 on Windows -- bad labeling. IMHO NAB

But, I think this was resolved for 6.3 by https://gerrit.libreoffice.org/plugins/gitiles/core/+/6acf4af3c90cca4edbad4fceb9c07bf90805a224%5E%21 [1]

"New Style..." was removed; and IIUC essentially changes to menu action labeling to clarify the New would always be based on currently active style of selection-- i.e. Default in the STR here (that is a new document, no text to canvas, so what is the "selection") list includs all the parent style types. 

Otherwise never truly a New style rather, always with inheritance.  And, behavior is correct when an actual selection from canvas has an applied style, not direct formatting, applied--result will be recorded as a Custom style, and shown as an Applied style.

@Cor, Roman -- thoughts? Everything as expected?

=-ref-=
[1] https://gerrit.libreoffice.org/#/c/66974/
Comment 2 Cor Nouws 2019-07-13 09:15:37 UTC
Thanks Stuart,, Harald,

(In reply to V Stuart Foote from comment #1)

> But, I think this was resolved for 6.3 by
> https://gerrit.libreoffice.org/plugins/gitiles/core/+/
> 6acf4af3c90cca4edbad4fceb9c07bf90805a224%5E%21 [1]
Indeed: "New style from selection" at least sets expectations right.

However..

(In reply to Harald Koester from comment #0)
> [3] Start to create a new style with menu: Styles > New Style… The Create
> Style dialogue is displayed. In a list box all “list” styles are displayed.
If I start the dialog in an empty document, page styles are displayed :)
And if I add some text, paragraph styles.
> Why are these styles displayed here and now? I would expect an option to
> choose the style type (paragraph style or character style or …).
Indeed. All these are wrong.

> [4] Click Help in dialogue. According to the displayed help page the
> “user-defined” styles should be displayed in the list box. This is
> definitively not the case, “all” list styles are displayed.
And that is what you'll see if you start the Create New Style dialog from the widget in the Styles dialog (Side Bar)

So this definitely is a bug. Could you pls change this bug report accordinly, Harald?
Furthermore: you've mentioned quite some things here. Maybe even separate but related issues, that deserve a separate bug report?

Cor
Comment 3 V Stuart Foote 2019-07-13 13:01:44 UTC
(In reply to Cor Nouws from comment #2)

But if you make selection of a word or character with some 'Character' style applied you get exactly that style and its parents.  So again the logic of the "Create Style" dialog is based on what selection is made.

Remaining issue when opening a new "empty" document and getting the 'List' styles is wrong. It acts like no selection on canvas defaults to the 'List' styles, and that is not right it should probably be 'Paragraph' styles.

But by giving it a touch, i.e. first opening 'Character' dialog or 'Page' dialog, the Create Style dialog responds to use that as parent style type. So there is ability to control the style type when no paragraph, word or character selection is made.

Unfortunately opening the 'Paragraph' dialog, or the 'Bullets and Numbering' dialog on an new "empty" document still results in the 'List' style type default--so something is not correct. 

=> NEW
Comment 4 Cor Nouws 2019-07-13 21:10:40 UTC
(In reply to V Stuart Foote from comment #3)
> (In reply to Cor Nouws from comment #2)
> 
> But if you make selection of a word or character with some 'Character' style
> applied you get exactly that style and its parents.  So again the logic of
> the "Create Style" dialog is based on what selection is made.
:) Did I try to deny that or suggest otherwise ?

> Remaining issue when opening a new "empty" document and getting the 'List'
> styles is wrong. It acts like no selection on canvas defaults to the 'List'
> styles, and that is not right it should probably be 'Paragraph' styles.
It behaves odd.
There is *no* logic or regular behavior for me.
After first opening with a list, closing, removing list, typing text... the meny entry "New Style From Selection" is greyed out.. SHft+F11 work and show the Page Style in my situation.
Comment 5 Heiko Tietze 2019-07-14 07:08:37 UTC
New Styles is also available in the sidebar (right-most menu icon on top). And it lists here the hierarchy beginning with the current (newly created) item. So what happens is that Default is shown and since the other styles haven't been created until the sidebar is opened nothing else (I guess that happens). 

Even when the list is okay, do we really need this dialog for just entering the style name? If you right click the actual style, New does what I expect - it shows the paragraph style dialog with name 'Untitled' being focused.
Comment 6 Cor Nouws 2019-07-14 11:36:02 UTC
(In reply to Heiko Tietze from comment #5)
> Even when the list is okay, do we really need this dialog for just entering
> the style name? If you right click the actual style, New does what I expect
> - it shows the paragraph style dialog with name 'Untitled' being focused.
That is not the same as doing some fancy direct formatting and then from that text create a new style.

And there are even more way's to accomplish this task. But that doesn't solve the broken dialog launched via the menu (and toolbar - which I didn't check to be honest).
Comment 7 Heiko Tietze 2019-07-15 07:21:21 UTC
(In reply to Cor Nouws from comment #6)
> That is not the same as doing some fancy direct formatting and then from
> that text create a new style.

I'm trying to get rid of the 'create style' dialog and we could show the paragraph formatting dialog per New (all New) populated with the Default properties or with your fancy direct formatting. The name field is editable so there would be no regression.
Comment 8 Harald Koester 2019-07-17 16:27:14 UTC
(In reply to Heiko Tietze from comment #7)
...

> I'm trying to get rid of the 'create style' dialog and we could show the
> paragraph formatting dialog per New (all New) populated with the Default
> properties or with your fancy direct formatting. The name field is editable
> so there would be no regression.

In my initial report I proposed that first a user should choose the type of style and afterwards the formatting dialog will be opened. If only paragraph styles should be created with menu/toolbar, as you proposed, the menu items and icon tips should be renamed: "New Paragraph Style" instead "New Style". Otherwise, I think, a user may be irritated, if s/he likes to create another type of style.
Comment 9 V Stuart Foote 2019-07-17 16:57:08 UTC
(In reply to Harald Koester from comment #8)

> In my initial report I proposed that first a user should choose the type of
> style and afterwards the formatting dialog will be opened. If only paragraph
> styles should be created with menu/toolbar, as you proposed, the menu items
> and icon tips should be renamed: "New Paragraph Style" instead "New Style".
> Otherwise, I think, a user may be irritated, if s/he likes to create another
> type of style.

So the dialog should have a set of radio buttons?  When a selection is made from canvas it would pre-select that radio button.  If no selection, then picking a radio button would set that style type (as currently customized, or with defaults for the type?).

Seems reasonable way to adjust what is otherwise a useful dialog.