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

Add search to main UI and/or to record dialog #274

Closed
eldelacajita opened this issue Oct 19, 2022 · 12 comments · Fixed by #278
Closed

Add search to main UI and/or to record dialog #274

eldelacajita opened this issue Oct 19, 2022 · 12 comments · Fixed by #278
Labels

Comments

@eldelacajita
Copy link

eldelacajita commented Oct 19, 2022

Summary

This is a feature request to make search more accessible and practical when creating new records, helping us to:

  • Avoid having to manually enter a description for recurrent or frequent tasks..
  • Avoid creating multiple entries with different descriptions for the very same task.
  • Avoid creating multiple entries with different tags for the very same task.

Current situation and use case

  • When creating a new record, very frequently I want to reuse an existing description, or take it as a basis and edit it slightly.
  • Presets do help, but only for tags, not for the actual description. And I wouldn't want to have hundreds of presets.
  • So search is the best option: you search for a term, click on the entry that is most similar to what you want so you can edit it, and then create a new record based on that one by hitting "Resume" and then editing the description if needed.
  • BUT search is hidden away inside the hamburguer menu, and using it for this purpose is not very practical.

Possible improvements

  1. Make the search button permanently visible in the UI.

or

  1. Add search to the record creation/edition dialog itself:
    2.a. Add a search button near the presets button. It would pop up the existing search window, and once you pick an entry in the search results, go back to the record creation/edition window with the selected description filled in.
    2.b. Just start typing in the description field and see a drop-down list similar to the one in the search dialog, showing related options in real time. Clicking on one of the results would put it into the description field to be further edited if needed.

or

Any other ideas?

@almarklein
Copy link
Owner

I must admit that I very often scroll to yesterday, find the record similar to what I'm about to do, and "resume" it. So I think you do have a point.

The challenge would be integrating it into the record dialog (because I think that's the place where such a feature would really shine). We already have two search modes (for tags, and presets). I'm not sure yet whether that's a downside (it would be confusing to add yet another mode), or an upside (3 modes is just one more than 2). So I think this will need some experimentation.

@almarklein
Copy link
Owner

Ok, I gave this a stab. The record dialog has an extra dropdown, and also shows recents when you start typing the first word (and it is not a tag). Let's see how this goes ...

@eldelacajita
Copy link
Author

I must admit that I very often scroll to yesterday, find the record similar to what I'm about to do, and "resume" it.

This is exactly what I was doing all the time 😆

The record dialog has an extra dropdown, and also shows recents when you start typing the first word (and it is not a tag).

This sounds great! So there will be three dropdowns, right? [Recent descriptions] [Recent tags] [Tag presets]

How many entries are considered "recent"? Is there a way it can work with less recent entries? That's when the "scroll to previous day" behavior found its limit and I started using the search dialog.

@almarklein
Copy link
Owner

almarklein commented Oct 25, 2022

How many entries are considered "recent"?

def _get_suggested_recents(self):
"""Get recent tags and order by their usage/recent-ness."""
# Get history of somewhat recent records
t2 = dt.now()
t1 = t2 - 12 * 7 * 24 * 3600 # 12 weeks, about a quarter year
records = window.store.records.get_records(t1, t2)

Could make this configurable ...

@almarklein
Copy link
Owner

It's released and deployed 🚀

@eldelacajita
Copy link
Author

12 weeks seems reasonable. For now I don't think I'd need to configure it to a different value.

Also, thanks for the ultra fast release! I'm testing it and I'm loving it so far 👏 😎

@almarklein
Copy link
Owner

almarklein commented Oct 25, 2022

thanks for the ultra fast release

I initially planned on parking the idea to give it time to think about. But I got nerd-sniped and went straight in 😆

@eldelacajita
Copy link
Author

Just came back here to say that this feature has proven to be SOOO useful 🤩 Thanks!

@Tagirijus
Copy link
Contributor

Tagirijus commented Apr 11, 2024

I like the idea of this feature and the implementation. Yet what if there is a really old task I want to resume after years? In such a case I cannot find it in the recent list, since it's more than 12 months old. Would it be to performance heavy without such a limitation of the range and just get all used tags ever, yet with the sorting of the last usage or so? You wrote it could be configurable in the future, after all, hehe. Still wondering if a range of maybe 10 years would kill the app then! :D

Also: any idea if there could be a way to access the recent descriptions with the keyboard? Like # showing tags (here I also miss that it shows ALL possible tags ...) or like ## showing the presets. ### for recent would be to runny, right? Also pressing # twice brings you back to the "normal tag entry", which is a nice design choice, in my opinion.

@almarklein
Copy link
Owner

Only showing moderately recent tags is a deliberate choice because it would mostly be annoying to see tags of years before. Tags are light, so you probably should not care what tag you used 10 years ago 😉 but if you do, you can always use search to look it up. Then after using it once, its back in the list for another year.

@Tagirijus
Copy link
Contributor

you can always use search to look it up. Then after using it once, its back in the list for another year.

Stupid me, you are right. Yet one question: in your code snippet it says 12 weeks and you write one year here. What's correct?

As always: thanks for this info and your reply! 😁

@almarklein
Copy link
Owner

Then it's probably 12 weeks. I did not know the exact number.

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

Successfully merging a pull request may close this issue.

3 participants