Bug 158992 - "Spotlight" Should Only Number/Color Styles That Actually Appear in Document
Summary: "Spotlight" Should Only Number/Color Styles That Actually Appear in Document
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: All All
: medium enhancement
Assignee: Jim Raykowski
URL:
Whiteboard: target:24.8.0
Keywords:
Depends on:
Blocks: Sidebar-UI-UX
  Show dependency treegraph
 
Reported: 2024-01-03 00:13 UTC by Tex2002ans
Modified: 2024-01-18 09:58 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX with 13 Applied Styles (411.41 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-01-03 00:15 UTC, Tex2002ans
Details
GIF Showing "Applied Styles" vs. "All Styles" + Visual Clutter (223.28 KB, image/gif)
2024-01-03 00:24 UTC, Tex2002ans
Details
Demo of proposed enhancement (2.24 MB, video/webm)
2024-01-03 23:29 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tex2002ans 2024-01-03 00:13:52 UTC
Description:
When you use "Spotlight"/"Styles Highlighter" feature, there is a lot of visual clutter.

If a Style occurs 0 times in the document, it SHOULD NOT get its own colored box + number.

Steps to Reproduce:
1. Open attached document.
2. View > Styles (F11)
3. All the way in bottom-right of Styles sidebar:

- Check "Spotlight" box ON.

4. All the way in bottom-right of Styles sidebar:

- Click on the dropdown and choose between:
--- 4A. "All Styles"
--- 4B. "Applied Styles"

Actual Results:
4B = 13 Styles
4A = 134 Styles + different colored boxes
--- But only 13 actually show in the document itself.

Expected Results:
4B = 13 Styles
4A = 134 Styles, but only 13 should show colored/numbered boxes.

For example, after clicking 4A:

- Heading 1->3 = box
- Heading 4->10 = no box


Reproducible: Always


User Profile Reset: No

Additional Info:
Similar with the other dropdown options:

- Text Styles
- List Styles
- Index Styles

If the Style doesn't exist in the document, it shouldn't get a colored box yet.

And, for example, if you intended for a:

- Heading 4

subheading to exist in your document, and you:

- Have "All Styles" selected
- See it isn't there when "Spotlight" ON

you can investigate more closely.

- - -

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 1 Tex2002ans 2024-01-03 00:15:34 UTC
Created attachment 191716 [details]
DOCX with 13 Applied Styles
Comment 2 Tex2002ans 2024-01-03 00:24:56 UTC
Created attachment 191717 [details]
GIF Showing "Applied Styles" vs. "All Styles" + Visual Clutter
Comment 3 Tex2002ans 2024-01-03 00:28:29 UTC
I am:

- CCing Jim Raykowski (since he does a lot of sidebar/Navigator/Spotlight stuff).
- Adding "Sidebar UI/UX" metabug.

(Should a new metabug be created specifically for this "Spotlight" feature?)
Comment 4 Jim Raykowski 2024-01-03 23:29:14 UTC
Created attachment 191746 [details]
Demo of proposed enhancement

Hi Tex2002ans,

Does the attached demo track with your proposal?
Comment 5 Tex2002ans 2024-01-04 05:47:17 UTC
(In reply to Jim Raykowski from comment #4)
> Hi Tex2002ans,
> 
> Does the attached demo track with your proposal?

Yes, Jim! That's EXACTLY how I imagined it! :P
Comment 6 Jim Raykowski 2024-01-04 07:22:07 UTC
(In reply to Tex2002ans from comment #5)
> (In reply to Jim Raykowski from comment #4)
> > Hi Tex2002ans,
> > 
> > Does the attached demo track with your proposal?
> 
> Yes, Jim! That's EXACTLY how I imagined it! :P

Alright then, let's see what advise UX might have.
Comment 7 Jim Raykowski 2024-01-08 02:52:00 UTC
I'll mark this as NEW to hopefully get some input from the UX experts.
Comment 8 Heiko Tietze 2024-01-09 13:19:16 UTC
Reasonable request, supports also the overview what style has been used in the document.

Thanks for the patch. Have you taken care of the color generation algorithm using a lower number? The colors seem to be unnecessary close in the demo.
Comment 9 Jim Raykowski 2024-01-10 03:50:54 UTC
(In reply to Heiko Tietze from comment #8)
> Reasonable request, supports also the overview what style has been used in
> the document.
I agree.
> Thanks for the patch. Have you taken care of the color generation algorithm
> using a lower number? The colors seem to be unnecessary close in the demo.
Colors are generated from the style name only, the number makes no difference. There are some values that can be tweaked that might provide for better color separation but, I think, since the difference in the style names here is only one character it is wysiwyg. Perhaps Tomaž might have ideas. He was the one that made the suggestion for the algorithm that is used to generate the style spotlight colors. With his suggestion and some research I found this[1] which I based the color generation on[2].

[1] https://github.com/zenozeng/color-hash
[2] https://gerrit.libreoffice.org/c/core/+/151079
Comment 10 Heiko Tietze 2024-01-10 08:24:03 UTC Comment hidden (off-topic)
Comment 11 Commit Notification 2024-01-10 15:57:43 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6c0081f3cd37541f8c0fe0fba69cc38c9b0a229b

tdf#158992 Only show style spotlight for styles that are used

It will be available in 24.8.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 12 Commit Notification 2024-01-18 09:58:37 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/572f801969514572d4722d16672ed5739f1e96a4

tdf#158992 Revisit Spotlight help pages