Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid expression provided" #13

Closed
dero opened this issue Jul 9, 2024 · 6 comments
Closed

"Invalid expression provided" #13

dero opened this issue Jul 9, 2024 · 6 comments

Comments

@dero
Copy link

dero commented Jul 9, 2024

I would like to use the plugin with "Include in global result" enabled, but the plugin very often outputs the "Invalid expression provided (Please check your mathematical expression)" list item, which I don't want to see.

image

Ideally there should be a setting to either suppress this message. I don't want the plugin nagging me that unrelated input is not something it can convert.

@Advaith3600
Copy link
Owner

I have always used the include in the global result and never bothered by the message, but I can see how it can be unpleasant. I will add an option to suppress warnings in the next version release.

@dero
Copy link
Author

dero commented Jul 10, 2024

@Advaith3600 Thank you! That will be very much appreciated.

@Advaith3600
Copy link
Owner

image

Does it make sense to suppress this warning as well? To me, that would be annoying to know that I mistyped the currency and not get an error. What do you think?

@dero
Copy link
Author

dero commented Jul 10, 2024

@Advaith3600 Well, I think the plugin should not emit any error messages if it can't handle the input in the global search, because you can't really tell that the user is expecting a currency conversion. And if you don't know user's intent, it's potentially annoying to insert error message into their results. It's as if the "Folder" plugin inserted "No such directory" into your results, for example.

However, the plugin should absolutely emit these messages when the activation command is prepended. In that case it's clear the user expects currency conversion.

Plus, I doubt many people routinely convert between many currencies. I think people usually just convert between a few, and they won't really make many mistakes typing "USD" or "BTC".

So ultimately I think the default should be:

  • No error messages in global results.
  • Existing error messages when activation command is used.

And for people who like to fine tune things I'd probably add a setting when "Include in global result" is enabled:

  • "Show error messages in global result"

@Advaith3600
Copy link
Owner

Hi, I got busy with other work, but I finally implemented this. I want to get your opinion before I publish this. Please let me know your thoughts.

CurrencyConverter-1.1.5-x64.zip
CurrencyConverter-1.1.5-ARM64.zip

@dero
Copy link
Author

dero commented Jul 19, 2024

@Advaith3600 LGTM – behaves as I'd expect it to. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants