Bug 445491 - Calculator runner handles simple currency conversion, overlapping with functionality in the Converter runner
Summary: Calculator runner handles simple currency conversion, overlapping with functi...
Status: CONFIRMED
Alias: None
Product: krunner
Classification: Plasma
Component: calculator (show other bugs)
Version: 5.23.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-11-14 15:37 UTC by johnathan
Modified: 2021-11-24 19:48 UTC (History)
2 users (show)

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


Attachments
12 dollars in krunner (17.50 KB, image/png)
2021-11-14 15:37 UTC, johnathan
Details
pressing enter on result shows up system settings (11.62 KB, image/png)
2021-11-14 15:37 UTC, johnathan
Details
recording (1.36 MB, video/mp4)
2021-11-24 05:25 UTC, johnathan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johnathan 2021-11-14 15:37:03 UTC
Created attachment 143545 [details]
12 dollars in krunner

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. put in $12 in krunner
2. krunner will give approximate currency in local currency
3. navigate to result and press enter
4. "INR 835.4415001320539" shows in prompt but now result shows as system setting window rules. pressing enter takes user to window rules setting pages

OBSERVED RESULT
once i click "enter" on the result of a currency conversion, i can either put it as a clipboard input (shift+return) or if i click return, it should take that as a prompt which it is doing but now system setting window rules show as result which should not be possible.

EXPECTED RESULT
i expect the top result to be a currency conversion because then i should be able to simply press shift+return instead of current down then shift + return. (maybe always demote other results if the result is a currency converstion?)  anyways, the problem is system setting should never open. that should never be an action.
oh , the locale is India
SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

Operating System: KDE neon 5.23
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.3
Kernel Version: 5.11.0-40-generic (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz
Memory: 7.7 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4400
Comment 1 johnathan 2021-11-14 15:37:33 UTC
Created attachment 143546 [details]
pressing enter on result shows up system settings
Comment 2 Nate Graham 2021-11-23 19:10:17 UTC
In your screenshot, that's expected, since somehow the search text you typed matched the Window Rules page. I cannot make step 4 happen, though. When I type "12 USD" and navigate to a search result and press enter, KRunner simply closes. Can you try again by typing "12 USD" into KRunner?
Comment 3 johnathan 2021-11-24 05:25:22 UTC
(In reply to Nate Graham from comment #2)
> In your screenshot, that's expected, since somehow the search text you typed
> matched the Window Rules page. I cannot make step 4 happen, though. When I
> type "12 USD" and navigate to a search result and press enter, KRunner
> simply closes. Can you try again by typing "12 USD" into KRunner?

ok. i found something. 
when i write "12 USD" the results say "unit converter" and does what you described. but just like in screenshot, if i write "$12", the response is from calculator and not unit converter. pressing enter on that shows window rules. i created a screen record of the same. this shows for all numbers with a $ sign. going by your reasoning, i think if the user types $12, unit converter should show and not calculator
Comment 4 johnathan 2021-11-24 05:25:39 UTC
Created attachment 143892 [details]
recording
Comment 5 Nate Graham 2021-11-24 19:48:13 UTC
Aha, the problem here is that the calculator runner also handles currency conversion, but it does it with a different syntax. IMO we should disable this functionality in the calculator runner IMO and only do it in the Converter runner, and then also support invocation using currency symbols in the  Converter syntax (e.g. "$12" and not just "12 USD") Let's use this bug report to track the former issue and track the latter in Bug 446045.