Bug 400647 - While inline renaming, integrate spelling suggestions menu with regular context menu to avoid hiding any features
Summary: While inline renaming, integrate spelling suggestions menu with regular conte...
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-04 08:00 UTC by Mihai Sorin Dobrescu
Modified: 2020-05-24 04:35 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Sorin Dobrescu 2018-11-04 08:00:40 UTC
SUMMARY

Merge the right click context menu and the spelling context menu when inline renaming.

STEPS TO REPRODUCE
OBSERVED RESULT
EXPECTED RESULT

1. Have a text in the clipboard to be inserted into a file name
2. Take a file having word separators in the name, like spaces or dots, for instance named "aaa bbb ccc.txt".
3. Left-click/press F2 on it, to enter the inline renaming mode.
4. While in renaming mode, left-click on some part of the file name, to deselect the text in the name (that is done in the first place).
5. Left-click before a part of the file name, right after some word separator, for instance, in the example above, after the space and before the word "bbb".
6. A spelling menu appears, proposing words like "bob", "BBS", options like "Ignore", Add to Dictionary".
7. As effect, no paste from clipboard option is present. Here, pasting from clipboard could be done from the keyboard only, by using Ctrl+V.
8. If right-clicking right after a word in the file name, like "aaa", a different context menu appears, allowing to paste in the file name, for instance ("Undo"/"Redo"/"Cut"/"Copy"/"Paste"/ etc.).

Similar cases could be added for different intended commands.

Additionally, if spell checking is intended, "Paste" command it's not enough, if context menus are merged. In this case, "Paste" would insert the clipboard content at the caret, regardless the selection, "Replace" would be a command to replace the selection done automatically by Dolphin when right clicking in front of a word.

The idea here is to have all the operations in the context menu available at any time. 

I use this every day, lately, so it's at least annoying.

SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.14.2
KDE Frameworks Version: 5.51.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
Kernel Version: 4.18.0-sabayon
OS Type: 64-bit
Comment 1 Nate Graham 2019-01-24 22:46:23 UTC
The simplified version of the issue is that when the insertion point is immediately to the left or or within a red-underlined word, right-clicking will bring up a spelling menu instead of the typical context menu. It only happens if the insertion point is immediately to the left or or within a red-underlined word.
Comment 2 Tommy Lincoln 2019-10-23 12:03:38 UTC
I was wondering if it might be better to add a flag to the KTextEdit widget (in KTextWidgets) that allows the user to specify whether Sonnet's own dialog should be used, or whether its results and functionality should be integrated into the standard context menu. This seems like a change that wouldn't just be relevant to Dolphin, but any application using KTextEdit. If so, I could open a ticket for this change under KTextEdit and work on that, then come back here and set the flag in Dolphin (assuming we'd want the new flag to default to the current behavior).

Thoughts? Would I open something here, at bugs.kde.org, or at phabricator? This doesn't really seem like a bug, but more of a change request.
Comment 3 Tommy Lincoln 2019-10-27 14:35:07 UTC
Despite the "junior-jobs" tag, I didn't see any simple way of accomplishing this. I suppose I got carried away, but I sort of got sucked in to the problem. Here's the solution I worked up for KTextEdit, including a screenshot and link to a diff for Dolphin to make use of the change: https://github.com/KDE/ktextwidgets/compare/master...pajamapants3000:400647

This was fun so no worries if it can't be used; even though I haven't gotten a response yet, it seemed silly to not share the solution I had worked up.
Comment 4 Nate Graham 2019-10-27 18:29:41 UTC
That's pretty cool!

FWIW the reason why you might not have gotten a response yet is because patches are submitted using https://phabricator.kde.org, not GitHub PRs. The documentation is https://community.kde.org/Infrastructure/Phabricator.

Let me know if you need a hand submitting it there!
Comment 5 Tommy Lincoln 2019-10-27 21:37:56 UTC
(In reply to Nate Graham from comment #4)

Thanks! I went ahead and submitted to phabricator. I just wasn't sure if I should get a separate ticket going since it's not technically a change to Dolphin. My submission is at https://phabricator.kde.org/D24993, and I referenced this ticket.

If that change gets accepted, the change to Dolphin is a simple one-liner to to take advantage. Let me know if I should do that as well, otherwise I'll hold off until the current change gets through.
Comment 6 Nate Graham 2019-10-27 21:40:37 UTC
Super awesome, thanks. Let's continue the conversation in the patch review request!