Bug 109214 - Highlight the favorites in the grid of special characters
Summary: Highlight the favorites in the grid of special characters
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.4.0 target:7.6.0
Keywords:
Depends on:
Blocks: Special-Character
  Show dependency treegraph
 
Reported: 2017-07-19 13:39 UTC by Heiko Tietze
Modified: 2023-03-01 11:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Current state (41.48 KB, image/png)
2022-03-11 07:18 UTC, Andreas Heinisch
Details
Overview of different solutions (113.09 KB, image/png)
2022-03-11 17:18 UTC, Andreas Heinisch
Details
Outside Border (41.42 KB, image/png)
2022-03-11 17:53 UTC, Andreas Heinisch
Details
Double Outside Border (41.39 KB, image/png)
2022-03-11 18:51 UTC, Andreas Heinisch
Details
Background color like for menu items (42.51 KB, image/png)
2022-03-13 09:17 UTC, Andreas Heinisch
Details
Background color like for hover items (42.51 KB, image/png)
2022-03-13 09:19 UTC, Andreas Heinisch
Details
Background color like for selected menu items (37.17 KB, image/png)
2022-03-14 07:28 UTC, Andreas Heinisch
Details
Proposal with blue color (40.54 KB, image/png)
2022-03-14 09:04 UTC, Andreas Heinisch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2017-07-19 13:39:10 UTC
In order to make favorite characters more prominent in the grid of special characters I suggest to highlight those items. It shouldn't be too flashy but there might be a nice background color defined in the theme (do not hard code colors).

I would also accept a WFM.
Comment 1 Andreas Heinisch 2022-03-11 06:50:22 UTC
Hi Heiko! I changed the highlighting and the border. Is there any example how to add a new color to the codebase in the settings of LIBO? Should this be an expert setting or hust a "normal" color in the color options pane?
Comment 2 Heiko Tietze 2022-03-11 07:06:54 UTC
Cool, show me :-)

Adding colors is tedious and IMO pointless, not to say wrong, for one particular option. 

Had a hard time to remember why I wrote this ticket. Point is that the long list with all characters contains the favorites too- and we should indicate those. Could imagine a border with the highlight color or background lighter/darker by 10%, or so.
Comment 3 Andreas Heinisch 2022-03-11 07:18:25 UTC
Created attachment 178798 [details]
Current state

Like mentioned in https://nextcloud.documentfoundation.org/s/asdc9Km2AamqDg6
Comment 4 Heiko Tietze 2022-03-11 07:29:39 UTC
Nothing is lost :-). 

I like your solution (would have been nicer if the border was outside but this might be much more difficult to code). Please make sure it works well if the item is selected.

If you are looking for some replacement to COL_RED, SwViewOption::GetFieldShadingsColor() would be grey by default and GetSettings().GetStyleSettings().GetHighlightColor() blueish at most system themes. 

As commented before I don't understand another color option as good solution but here is a prototype for implementation https://gerrit.libreoffice.org/c/core/+/128553.
Comment 5 Andreas Heinisch 2022-03-11 11:38:10 UTC
Do you have an example how it would look like if the border is drawn outside?

I will try some colors in the settings and upload them so we can decide which fits the needs.
Comment 6 Heiko Tietze 2022-03-11 12:49:25 UTC
(In reply to Andreas Heinisch from comment #5)
> Do you have an example how it would look like if the border is drawn outside?

What I mean with "outside" is the thin black (in my case, with bright themes probably grey) line from the grid.
Comment 7 Andreas Heinisch 2022-03-11 17:18:50 UTC
Created attachment 178822 [details]
Overview of different solutions

IMO, using COL_LIGHTRED as an outside border may be the best solution. However, the color is hardcoded then ...
Comment 8 Andreas Heinisch 2022-03-11 17:53:03 UTC
Created attachment 178823 [details]
Outside Border

Is this the correct implementation of the outside border? Or should it be "outside" of the black rectangle?
Comment 9 Andreas Heinisch 2022-03-11 18:51:50 UTC
Created attachment 178824 [details]
Double Outside Border
Comment 10 Heiko Tietze 2022-03-12 07:52:41 UTC
(In reply to Andreas Heinisch from comment #7)
> IMO, using COL_LIGHTRED as an outside border may be the best solution.
> However, the color is hardcoded then ...

Agreed, and we can change this later if the color is sub-optimal under some scenarios like dark themes.
Comment 11 Adolfo Jayme Barrientos 2022-03-13 07:42:17 UTC
The “double outside border” proposal looks the best to me, but I don’t think we should be using red as that colors connotes errors or destructive actions… Why not use a gentle yellow color, maybe as background, such as the one from the infobar? Or just the highlight color, like in the Calc spreadsheets, with the selected-cell background color being a lighter hue of that.
Comment 12 Andreas Heinisch 2022-03-13 09:17:04 UTC
Proposed patch: https://gerrit.libreoffice.org/c/core/+/131446
Comment 13 Andreas Heinisch 2022-03-13 09:17:37 UTC
Created attachment 178856 [details]
Background color like for menu items
Comment 14 Andreas Heinisch 2022-03-13 09:19:44 UTC
Created attachment 178857 [details]
Background color like for hover items
Comment 15 Adolfo Jayme Barrientos 2022-03-14 03:49:27 UTC
OK, the yellow version isn’t that discernible; the blue one was better :)
Comment 16 Heiko Tietze 2022-03-14 07:24:18 UTC
And yellow has the meaning warning. Let's do with the hover color.

(Similar UI is the Stylist where a style is active in the document but it should be possible to select another for modification. IIRC, I suggested to use grey and highlight/blue, see bug 94427.)
Comment 17 Andreas Heinisch 2022-03-14 07:28:53 UTC
Created attachment 178871 [details]
Background color like for selected menu items

The only thing that bothers me is that if we solve the highlighting of glyphs from the choosen subset and of favorites, how we should distinguish between favorite characters and/or the subset itself. 

Check the document at https://nextcloud.documentfoundation.org/s/asdc9Km2AamqDg6 second page.
Comment 18 Heiko Tietze 2022-03-14 07:37:41 UTC
(In reply to Andreas Heinisch from comment #17)
> ... how should we distinguish between favorite characters and/or the subset itself. 

True, if the subset needs one attribute the favorite requires another one.

a) use background and border color (as in the mockup with blue and red; we could go with a bold or darker blue instead of the red)
b) indicate favorites with a decorator image like a small star in the lower right corder
c) use hatches for favorites
d) use a (faint) blue border for the subset and highlight the favorites
e) "dim" characters that are not in the current subset (lighter font color - or darker in case of dark backgrounds)
Comment 19 Andreas Heinisch 2022-03-14 09:04:37 UTC
Created attachment 178873 [details]
Proposal with blue color

Heiko, maybe you could create a new mockup, so I can check if I met all the requirements.
Comment 20 Heiko Tietze 2022-03-14 09:09:15 UTC
(In reply to Andreas Heinisch from comment #19)
> Created attachment 178873 [details]
> Proposal with blue color

This LGTM. Push it and let's see how it work on the various OS/DE.
Comment 21 Commit Notification 2022-03-16 15:53:22 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e7895fbacff945d38f679f504c179a417e3b9af1

tdf#109214 - Highlight the favorites in the grid of special characters

It will be available in 7.4.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 22 Andreas Heinisch 2022-03-16 16:31:20 UTC
Does there exist a bug report for the hightlight of the subset of the font like shown in https://nextcloud.documentfoundation.org/s/asdc9Km2AamqDg6? I could not find it.
Comment 23 Heiko Tietze 2022-03-16 18:34:42 UTC
(In reply to Andreas Heinisch from comment #22)
> Does there exist a bug report for the hightlight of the subset of the font...

Apparently not. Many thanks for the patch!
Comment 24 Commit Notification 2023-02-28 07:16:05 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9da3d052b9048e9139b6943621f4eb6777422078

tdf#109214 - Highlight the favorites in the grid of special characters

It will be available in 7.6.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 25 Commit Notification 2023-03-01 11:18:35 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b466c1ad267e821dbda0a879ab31a2ea00e54b5c

tdf#109214 - Highlight the favorites in the grid of special characters

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