Bug 153581 - Style family buttons should be a dropdown
Summary: Style family buttons should be a dropdown
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Sidebar-Styles
  Show dependency treegraph
 
Reported: 2023-02-13 07:15 UTC by Jim Raykowski
Modified: 2023-03-02 09:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
demo of style family toolbox buttons flip when dnd drag over (326.46 KB, video/x-matroska)
2023-03-02 08:12 UTC, Jim Raykowski
Details
dnd of selected text over style family buttons (516.17 KB, video/x-matroska)
2023-03-02 09:06 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Raykowski 2023-02-13 07:15:02 UTC
Here is a nitpick that the highlighted style family button in the styles panel loses highlight when clicked. Why anyone would click a highlighted style family button I do not know but it looses it's highlight state when done.

Steps to reproduce using Writer:
1) Open Writer 
2) Open the Sidebar (Menu > View > Sidebar)
3) Switch to the Styles deck (Second deck button in the tab bar)
3) Click on the highlighted style family button above the styles list and move the mouse pointer away from the button

Results: The button looses highlight.
Expected results: The button remains highlighted.

The cause of this bug is that toggle tool buttons are used. Radio tool buttons should be used. IMHO this would make a good 'easy hack' for gaining experience using Glade and will make a few CheckItem calls used for setting button toggle state unnecessary.
Comment 1 Heiko Tietze 2023-02-13 09:10:56 UTC
My idea [1] to merge paragraph and character into one text style also consists of a drodown for the style family. Not only the highlighted state is lost but those icon-only solutions are only good for very well-known interactions. 

There are some tickets regarding the Stylist and I always comment in a similar way but cannot find a better duplicate than bug 90646.

PS: We list six icons for style families in the Stylist and replacing this by radio buttons takes a lot of space. That's why a dropdown would be the better choice.

[1] https://design.blog.documentfoundation.org/2019/11/05/proposal-to-conveniently-highlight-and-inspect-styles-in-libreoffice-writer/
Comment 2 Heiko Tietze 2023-02-28 13:12:13 UTC
No further comments, let's make it a dropdown.
Comment 3 Jim Raykowski 2023-03-01 21:34:27 UTC
(In reply to Heiko Tietze from comment #2)
> No further comments, let's make it a dropdown.

The styles family toolbar has a feature that allows an entry in the styles list to be dragged to the family toolbar buttons causing the styles list to display the styles for the family that the mouse is over.

I have no idea what use this is. Using a drop down list would not allow this feature.

This can only be done when the styles list filter is set to 'Hierarchical' since the other filters change the list to multi-selection.
Comment 4 Heiko Tietze 2023-03-02 07:04:46 UTC
(In reply to Jim Raykowski from comment #3)
> The styles family toolbar has a feature that allows an entry in the styles
> list to be dragged to the family toolbar buttons...

Isn't it drag 'n drop onto the styles _list_ adding this as a new style? Similar to New From Selection at the menu button.
Comment 5 Jim Raykowski 2023-03-02 08:12:10 UTC
Created attachment 185689 [details]
demo of style family toolbox buttons flip when dnd drag over

This is different. I stumbled across it in the code.

https://opengrok.libreoffice.org/xref/core/sfx2/source/dialog/templdlg.cxx?r=c91ec113#863
Comment 6 Heiko Tietze 2023-03-02 08:16:38 UTC
(In reply to Jim Raykowski from comment #5)
> This is different. I stumbled across it in the code.

Pointless function, you cannot drop a style onto a different family. Kill it with fire :-)
Comment 7 Jim Raykowski 2023-03-02 09:06:53 UTC
Created attachment 185690 [details]
dnd of selected text over style family buttons

Here is the commit message for this feature:

commit e5f48fc674cd171bcf990fb905920ed0ef19689f
Author: Rüdiger Timm <rt@openoffice.org>, Tue Jan 20 10:57:59 2004 +0000 (19 years ago)
Committer: Rüdiger Timm <rt@openoffice.org>, Tue Jan 20 10:57:59 2004 +0000 (19 years ago)
Precedes: MELD_LIBREOFFICE_REPOS
Branches: <Expand>

INTEGRATION: CWS os25 (1.35.114); FILE MERGED
2003/12/12 14:18:53 os 1.35.114.1: #i23505# implementation of PRD EaseOfUse 69 - drag and drop of selections to Stylist

So I tried selecting some document text and dragging it to the buttons.

Should it still burn?
Comment 8 Heiko Tietze 2023-03-02 09:25:13 UTC
(In reply to Jim Raykowski from comment #7)
> #i23505# implementation of PRD EaseOfUse 69 - drag and drop of selections to Stylist

The spec says:

1 Motivation: Drag and drop of selection of OOo Writer text documents into the Stylist window should create appropriate new styles depending on the currently selected style family. Those newly created styles should then copy the attributes from the selection. In version 1.1 this doesn't work as expected by the user.

2 User Scenarios: A user selects a word in a text and formats it as bold and red colored. To be able to use this attributes as character style instead of hard attributes he drops this selection on the Stylist window to create a new character style . This new style is now applied to the selection instead of the hard attributes.
He expects to create a character style with the attributes “Bold” and “Color Red” applied. 

Nothing about drag 'n drop over the toolbutton; maybe to switch the style family in order to allow dropping the bold/red selection onto CS. IMO we can kill it. Mike, what's your take?
Comment 9 Mike Kaganski 2023-03-02 09:35:50 UTC
Please see bug 143987 comment 5 for my PoV on this. That proposal would also allow the DnD, without requiring the buttons at all (there would be collapsed style categories, and dragging there would be much more discoverable than this DnD to buttons, which I bet ~no one knows about).