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

If search comes up empty, pressing enter should insert the search string as a new item and paste it #341

Closed
ymost opened this issue Dec 20, 2021 · 10 comments
Labels
enhancement New feature or request needs triaging Further information is requested

Comments

@ymost
Copy link

ymost commented Dec 20, 2021

Often I don't remember if a certain string is currently in Maccy's item list. I start typing it in the search box, and no item is found.
I then have to exit Maccy, and re-type the beginning of the string.
Instead, let me finish typing the string in the search box, and press enter to:

  1. Paste the string in whatever window has the focus, as this is what I was trying to do in the first place.
  2. Insert the string as a new item in the list, for future usage.
@p0deje
Copy link
Owner

p0deje commented Jan 10, 2022

Would supporting Cmd+C be enough? The behavior could be following:

  1. If there are any search results, copy the currently highlighted item.
  2. If there are no search results, copy the text in the search field.

@p0deje p0deje added enhancement New feature or request needs triaging Further information is requested labels Jan 10, 2022
@ymost
Copy link
Author

ymost commented Jan 10, 2022

It's better than nothing, but what's wrong with my original proposal?
Performing a copy action instead of a paste action creates more friction, the end goal of the user here is to paste the text, not copy it.

@p0deje
Copy link
Owner

p0deje commented Jan 10, 2022

the end goal of the user here is to paste the text, not copy it.

This is because you use "Paste automatically". I don't so for me it doesn't make sense why pressing "Enter" on the item doesn't paste it while pressing "Enter" on empty search results does.

I need to figure out the UX that balances the different usages in Maccy.

@ymost
Copy link
Author

ymost commented Jan 10, 2022

Oh right, good point 🙂
I recently switched from Windows to Mac and was looking for a tool as close as possible to Ditto. Maccy comes very close when enabling "Paste automatically".
Thanks for considering this, and thanks in general for Maccy. Awesome tool!

@p0deje
Copy link
Owner

p0deje commented Jan 10, 2022

Could you please share an example of when you'd search for something and then when there are no search results, you'd paste the search term? I'd like to understand the details because I usually search for part of the copied text and, if nothing is found, it won't be of any use for me to paste what I wrote during the search.

@ymost
Copy link
Author

ymost commented Jan 11, 2022

I am a little baffled by your question.
If you search for part of the copied text, presumably it is because you wanted to paste that text somewhere? So how is what you already typed not of use?

For me, the clipboard manager is an essential part of my coding routine. It typically holds code snippets which I use repeatedly. The first time I use a code snippet, I often don't realize I'm going to use it again. Usually after writing the same snippet 2 or 3 times, I copy it for later reuse. I'm sure you can see how, when I need to write a snippet which I vaguely remember having written before, I'm not sure if I already copied that snippet or not. So I start writing it in the search box, hoping I already copied it, but if that's not the case - well this is where the current feature suggestion will really make my life easier!

@p0deje
Copy link
Owner

p0deje commented Jan 11, 2022

I'd usually search for the substring like type "github" when I'm looking for GitHub link or type beginning of function name when I'm looking for code snippet I copied before. In both of these scenarios, if there are no search results, there is really nothing I'd paste. I'd instead switch to Safari and start searching for a more specific substring (e.g. repository name) or start writing the function from scratch (e.g. type func in the editor).

I guess the main difference is that I don't paste by default anything from Maccy. Pasting automatically requires a workflow where you have a window with selected input field before showing Maccy. What I tend to do instead is search Maccy, copy what I need from there, after that switch to input field and paste with Cmd+V.

I also know that many people use fuzzy search, so they don't even type the whole words but just a few letters from it. Pasting those would make no sense too.

You can see how there are different use cases. This is mainly why I ask for the specific scenario with examples - I need to understand your workflow. Can you provide it? You refer to snippets, but I use them differently, so if you could be more specific (show an example of the snippet, what you then type in the editor, what you expect to paste, etc.) or show a few screenshots - it would make it much easier for me to comprehend.

@ymost
Copy link
Author

ymost commented Jan 11, 2022

Supporting different workflows is indeed challenging.
To answer you specific questions:

  1. Yes, when I open Maccy I am always in the context of writing something, usually code. Usually it's either Jupyter or PyCharm. I use the keyboard shortcut so I don't have to lift my hands off the keyboard. It's a seamless part of my code writing flow. I think of it as an extension to the usual code completion feature.
  2. Yes, I sometimes use fuzzy search. In this case I won't be pasting my search term, but that is a minority of the cases.

I am attaching a screencast. It's rather minimal, but I think it gets the point across.

Screen.Recording.2022-01-11.at.13.26.58.mov

@p0deje
Copy link
Owner

p0deje commented Jan 11, 2022

I am attaching a screencast. It's rather minimal, but I think it gets the point across.

Proceeding with your scenario, if there were no results, you'd press enter and expect to append .filter to the input, right?

@ymost
Copy link
Author

ymost commented Jan 11, 2022

Probably I would continue writing the full snippet in the search box, and then press enter. Then I expect to:

  1. Paste the string I typed in the input field.
  2. Add the string to the item list (that's why I continued to write it in the search box instead of pressing enter as soon as I saw there were no results).

@p0deje p0deje closed this as completed in cb48b54 Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triaging Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants