Tag "quick search" and returning position improvement

Based on the new feature about remembering the scroll position, I propose an implementation regarding tags “quick search”.
Just to clarify what I mean with “quick search”: clicking a tag to quickly find bullets within the document with the same tag.

When we click the tag it shows the results. But after escaping the search (ESC), it goes back to the top of the page.

It would be a nice improvement to see it the following behaviors:

  • If the cursor was positioned by the user on a particular bullet before escaping the search, after escaping, the position of the document would be at that bullet where the cursor was positioned;
  • If it was just a quick look, and the user didn’t position the cursor on any bullet returned by the search before escaping it, after doing it, the position of the document would be at the bullet where the tag was clicked to run the search.

Shared with CloudApp

4 Likes

@Shida, what do you think?

Makes sense. I think we can get this implemented.

1 Like

This should now be deployed to web. Other platforms will follow soon.

2 Likes

Thanks! Gonna test it.

Is it working already?

It should be if you access through the webpage. Desktop and mobile coming soon.

Something is wrong, then. No matter what’s the case, after the quick search, It always comes back to the document title.
Shared with CloudApp

Did you refresh the page after the announcement?

Yes, tested multiple times through the day.
In the case of clicking the bullet before escaping the search, the cursor remains there, but not the page position.

Hmm, let me see if there’s something wrong on our end.

Update: Just fixed it. Should be live on web.

:clap:t2::clap:t2::clap:t2:

It’s working, most of the time.
Found a situation where it doesn’t work well. Couldn’t understand why, though.
This is the case:
Shared with CloudApp

I think it’s because while the scroll position is the same, the items are shifted in position because of the search filter. When you clear the search term, items are moved around in the document because previously hidden items are now taking space. Therefore, we have no idea where the item would end up at after the search finishes.

1 Like

So, there’s no way to make it work?

@Shida

I think there’s a way I can try to save the position of the item with respect to the current scroll. Gotta give it a try though.

2 Likes