After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 330452 - Automatic spell check suggestions should be first level menu option.
Automatic spell check suggestions should be first level menu option.
Status: RESOLVED FIXED
Product: GtkHtml
Classification: Other
Component: html-editor-control
3.12.x
Other All
: Normal minor
: ---
Assigned To: gtkhtml-maintainers
Evolution QA team
evolution[composer]
Depends on:
Blocks: 310550
 
 
Reported: 2006-02-08 18:25 UTC by Jim Canfield
Modified: 2008-11-27 14:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Proposed patch (3.75 KB, patch)
2008-11-24 21:05 UTC, Matthew Barnes
none Details | Review
Screenshot: Multiple Languages (218.17 KB, image/png)
2008-11-24 21:07 UTC, Matthew Barnes
  Details
Screenshot: One Language (213.19 KB, image/png)
2008-11-24 21:07 UTC, Matthew Barnes
  Details
Revised patch (4.60 KB, patch)
2008-11-24 21:18 UTC, Matthew Barnes
accepted-commit_now Details | Review
Adds "More Suggestions menu (6.69 KB, patch)
2008-11-26 21:28 UTC, Matthew Barnes
committed Details | Review
Screenshot: One Language (245.28 KB, image/png)
2008-11-26 21:34 UTC, Matthew Barnes
  Details

Description Jim Canfield 2006-02-08 18:25:15 UTC
Have to drill down into a second level menu for suggest word spelling is
cumbersome and inefficient.  it should work like thunderbird where right
clicking shows immediate list of suggested word spellings.  That's one less
click...the way I spell, it could be the difference between healthy wrists and
carpel tunnel! :)

Other information:
Comment 1 André Klapper 2006-02-09 14:13:05 UTC
adding dependency
Comment 2 Sitsofe Wheeler 2006-03-09 18:58:27 UTC
Might be a dup of bug #228594
Comment 3 André Klapper 2006-06-08 15:30:51 UTC
situation has become much better because of this fix by partha and srini:
http://cvs.gnome.org/viewcvs/gtkhtml/components/html-editor/popup.c?r1=1.90&r2=1.91

(fix will be included in unstable evolution 2.7.3 (gtkhtml 3.11.3) and the upcoming evolution 2.8 (gtkhtml 3.12).)

so now one can choose possible spellings directly from the context menu (and not only by using the "replace" dialog), but unfortunately still at the second level (the first level is the language name which seems to be necessary, otherwise it can become confusing if many languages are enabled and the number of possible spellings increases dramatically).

reassigning to gtkhtml\html-editor-control.
Comment 4 Matthew Barnes 2008-03-11 01:04:05 UTC
Bumping version to a stable release.
Comment 5 Matthew Barnes 2008-03-29 14:42:13 UTC
Is this bug still valid?
Comment 6 Matthew Barnes 2008-04-07 04:49:13 UTC
I agree with Andre that moving spelling suggestions to a per-language submenu is necessary when multiple languages are selected.  But if just one language is selected, a submenu seems unnecessary.  Maybe we could make the pop-up menu a little smarter.

Also, if spelling suggestions were to appear in the first level of the pop-up menu, the items should say something like 'Replace With "<suggestion>"'.
Comment 7 David Richards 2008-11-24 18:34:13 UTC
Firefox does this very well.  The top few guesses are at the top of the right-click menu and in bold.  Having to use the cascade menu is a bit clunky when you have only one language selected.
Comment 8 Matthew Barnes 2008-11-24 21:05:18 UTC
Created attachment 123338 [details] [review]
Proposed patch

I like the idea of putting spell check items at the top of the menu, so I did that and added a special case for when one spell check language is selected.
The special case mimics Firefox's behavior.
Comment 9 Matthew Barnes 2008-11-24 21:07:00 UTC
Created attachment 123339 [details]
Screenshot: Multiple Languages

Pardon the size of these...
Comment 10 Matthew Barnes 2008-11-24 21:07:27 UTC
Created attachment 123340 [details]
Screenshot: One Language
Comment 11 Matthew Barnes 2008-11-24 21:18:25 UTC
Created attachment 123342 [details] [review]
Revised patch

Fixed a careless mistake in the original patch.
Comment 12 Srinivasa Ragavan 2008-11-25 13:09:40 UTC
Seems fine Matt. Take to trunk. I haven't tested fully, but the screenshots are awesome.
Comment 13 Veerapuram Varadhan 2008-11-25 13:27:58 UTC
(In reply to comment #10)
> Created an attachment (id=123340) [edit]
> Screenshot: One Language
> 

Awesome work.  Can we restrict the spell suggestions/size of the popup menu and include a "More suggestions" submenu for a single language and "More languages" for multiple languages?
Comment 14 Srinivasa Ragavan 2008-11-25 13:42:54 UTC
This would be nice as well, but it should be based on a '%' max match. Instead of a blanket count :-)
Comment 15 Matthew Barnes 2008-11-26 02:27:32 UTC
For single language, I was originally considering having just such a submenu. The popup menu would include 3-5 suggestions, such that the submenu would never contain less than 3 items (because having 1 or 2 suggestions split off in a submenu seems silly).  Wound up not implementing it, mostly out of laziness, but if you guys think that's a good idea I'll hack up a new patch.

So...

    Total Suggestions    # in Popup Menu    # in Submenu
    -----------------    ---------------    ------------
            3                   3                 0
            4                   4                 0
            5                   5                 0
            6                   3                 3
            7                   3                 4
            8                   3                 5
           ...                 ...               ...

Submenu would be invisible when Total Suggestions < 6.  Or I can always tweak it to display, say, 4-6 suggestions instead of 3-5.  How many suggestions is too many for the popup menu?


I'm not so sure about doing that for multiple languages.  If we have a "More Languages" menu, then the extra languages wind up in a secondary menu, and the suggestions for those languages wind up in a tertiary menu (hard to navigate to).  That doesn't sit well with me.  Seems to harm usability more than help.
Comment 16 David Richards 2008-11-26 13:11:22 UTC
This seems pretty clean to me.  I don't think it's horrible to have only one item in the submenu personally.  In the case of 6 suggestions, 5 in the popup and 1 in the submenu would not be too bad.  One could argue that the more in the first level menu, the higher chance that there will be a match.   I'll support whatever you guys pick.
Comment 17 Matthew Barnes 2008-11-26 21:28:12 UTC
Created attachment 123492 [details] [review]
Adds "More Suggestions menu

This implements what I described in comment #15 for the single language case.  The limits are easily tunable:

   #define MAX_LEVEL1_SUGGESTIONS 3
   #define MIN_LEVEL2_SUGGESTIONS 3

Having played around with it I'm now thinking 3 suggestions in the pop-up is too few.  4 to 6 would be better.  5 to 7 might be too many.  I'll bump the limit to allow 4 to 6 when I commit, unless someone suggests an alternative.
Comment 18 Matthew Barnes 2008-11-26 21:34:39 UTC
Created attachment 123493 [details]
Screenshot: One Language

Illustrates the changes made in the latest patch.
Comment 19 Srinivasa Ragavan 2008-11-27 04:26:57 UTC
Seems fine Matt, but do this have a '%' best match return? In your example, I would put 'the', 'tea' are closer than the other things. But 'the' appears last in the submenu, which might be bad. Anyways, looks cool.
Comment 20 Matthew Barnes 2008-11-27 05:13:04 UTC
Wish I could, but Enchant just hands me a list of words and nothing with which to rank them.  I'd even argue that's Enchant's job, not ours.  But I'll double check to make sure I haven't missed something.
Comment 21 Matthew Barnes 2008-11-27 14:56:10 UTC
Committed to trunk (revision 9054).