Bug 143689 - UI: No feedback that spell checker isn't working because of lack of a dictionary (whereas automatic spell checking is turned on)
Summary: UI: No feedback that spell checker isn't working because of lack of a diction...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-02 10:14 UTC by Telesto
Modified: 2022-07-06 11:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
icon with a checkbox and "ab" (69.40 KB, image/png)
2021-08-09 12:57 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-08-02 10:14:15 UTC
Description:
UI: No feedback that spell checker isn't working because of lack of a dictionary (whereas automatic spell checking is turned on)

Steps to Reproduce:
1. open attachment 156910 [details] (and make sure you don't have Spanish dictionary)
2. Expand the Tools menu
3. Notice the automatic spell checking being enabled

Actual Results:
Automatic spell checking is marked enabled, but doesn't work without dictionary. However there is no indication that dictionary is lacking.. 

Expected Results:
So visual clue that the dictionary is lacking.. so spell checking isn't handled

Yes, LibreOffice ships with all language bundles (in Windows). No clue how the situation is for MacOS or Linux. But there are surely cases where dictionary's are missing.. 


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2a151d1d5bc055d5e0011460b6ec42ea9f34f880
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Mike Kaganski 2021-08-02 10:51:38 UTC
It only could be useful to add a non-intrusive indication, like a green checkbox with "ab" next to the input language in the status bar, like the one that is shown in the drop-down list in Character Properties' Language, when the dictionary is *present*. There is no other indication necessary.

Note that Windows installation does *not* install all dictionaries normally, even though it has them bundled in the MSI. It is only installed when either one selects them explicitly in advanced install, or does a special kind of install like parallel install (or maybe uses portable).
Comment 2 NISZ LibreOffice Team 2021-08-03 12:34:24 UTC
We already have an infobar about missing hyphenation data like:

"Please install the hyphenation package for locale “es-ES”."

I just tried to install https://extensions.libreoffice.org/en/extensions/show/spanish-dictionaries on my bibisect-7.3 instance (bibisect is w/o dictionaries) and both automatic spellchecking started to work and the hyphenation warning disappeared.

So maybe an extra check and a new sentence for the infobar would be enough.
Comment 3 Mike Kaganski 2021-08-03 13:59:53 UTC
(In reply to NISZ LibreOffice Team from comment #2)
> We already have an infobar about missing hyphenation data like:

No. A hyphenation data is *required* for proper document layout - it is the thing that affects the output. When some text is required to use hyphenation (a paragraph property), and it uses some language (character/paragraph property), it is known that in absence of the hyphenation data, the document might look unexpected/different compared to how it looked originally.

Missing dictionary only affects spell check, and does not affect layout. Many people use languages like Latin or others to avoid spell errors in text that should not be marked (yes, there's also a way to mark it as having none). These are absolutely different issues, and absent dictionary MUST NOT, never, have anything like dialogs and infobars.
Comment 4 Heiko Tietze 2021-08-09 12:46:57 UTC
(In reply to Mike Kaganski from comment #1)
> ... a green checkbox 

Yes, but without the "ab" text. Alternatively, we could strike-through the language. In both cases a tooltip should give more information on the missing package, and ideally offer access to the extension site. 

Do you have a code pointer at hand, Mike?
Comment 5 Mike Kaganski 2021-08-09 12:57:27 UTC
Created attachment 174155 [details]
icon with a checkbox and "ab"

(In reply to Heiko Tietze from comment #4)
> (In reply to Mike Kaganski from comment #1)
> > ... a green checkbox 
> 
> Yes, but without the "ab" text.

Why? Maybe I was unclear, and/or this could be a matter of used icon set. Note that we have *this* icon - shown on the screenshot - to represent exactly this: "this language *has* a dictionary installed". Why introduce another way of representing the same data?

> Alternatively, we could strike-through the language.

See my concern about introducing alternative ways to represent the same data. Additionally, striking through is a very strong sign with non-obvious message, and I believe it conveys a message of "something very bad".

> In both cases a tooltip should give more information on the
> missing package, and ideally offer access to the extension site. 

+1

> Do you have a code pointer at hand, Mike?

No. I suppose the closest thing would be some ~recent change where we introduced icons showing the selection mode - Heiko, do you remember where it was? I will search release notes for it, and post the bug/commit if find it.
Comment 6 Mike Kaganski 2021-08-09 13:31:54 UTC
(In reply to Mike Kaganski from comment #5)
> > Do you have a code pointer at hand, Mike?
> 
> ... some ~recent change where we introduced icons showing the selection mode

I referred to https://gerrit.libreoffice.org/c/core/+/112367, and I see that it operated on SvxSelectionModeControl (in svx/source/stbctrls/selctrl.cxx).

I believe that the control in this issue is managed by LangSelectionStatusbarController (framework/source/uielement/langselectionstatusbarcontroller.cxx), and the control itself is simple StatusbarItem, which IIUC needs subclassing to allow an icon. FTR: I'm not ready to mentor this as an easyhack.
Comment 7 Mike Kaganski 2022-07-06 10:52:59 UTC
Additional proposal (*might* be alternative, or maybe require a separate issue - please decide yourself):

The indication could possibly be in the spell check *dialog*, when the spell check completes, there could appear an infobar (similar to the colored bands at some places where we show input errors, but with something more neutral than red), telling that some text used languages that have no dictionary installed. The list could be available e.g. as an expandable section with a list, or something.

The spell dialog is a *proper* place for (moderately intrusive) things like infobars for this, because using it explicitly shows user's intention to check spelling; additionally, the operation requires parsing the whole text and analyzing available dictionaries, so in the end, all the information is available.

As said, *maybe* we could limit this issue to what I propose here, or have it independently.
Comment 8 Mike Kaganski 2022-07-06 11:37:02 UTC
Commit 33f6848dc5abe71471b08dc6a8946feaa2d75ffc has the necessary code pointers for the technical part of the proposal from comment 7. DetectAndMarkMissingDictionaries introduced there could be expanded to build a list of missing dictionaries instead of simply setting a flag.

I hope that for the UI part, Heiko could provide some code pointers (if this is decided to be implemented, of course).