이 주제 검색 결과 탐색 방법

Is there a handler to navigate previous and next through the recent “Search in this Topic” results?

Since lazy loading and virtual lists break browser native Find on all but the shortest topics I think it’s important to replicate that functionality.

I am pretty new to Discourse, I’ve done a search through the meta and the source but I didn’t turn anything up, but it seems like it would be pretty important so I might be missing it. Thanks!

1개의 좋아요

I think arrow keys should do the trick. You can see the available keyboard shortcuts by clicking the keyboard button in the sidebar on desktop.

The goal is to traverse a topic without bouncing back and forth between the topic and the search results.

In long posts it’s difficult to keep your place in the results, especially as the scroll position resets each time you press a result.

So it would work like the j and k selectUp selectDown handlers except that it would skip over replies that weren’t part of the recent Search this topic results selecting only replies that were.

4개의 좋아요

In my estimation it would be reasonable to persist an offscreen list of replies (like an array) and then simply index through them with previousResult nextResult handlers, resetting the list whenever a new topic was loaded or a new search was performed.

Of course keyboard shortcuts and/or buttons would then become trivial.

3개의 좋아요

안녕하세요 @finder, Discourse에 오신 것을 환영합니다!

이 문제는 새로운 기능 요청으로 보이기 때문에 Contribute > Feature 채널로 이어서 진행하겠습니다. 현재 겪고 계신 문제에 대해 좀 더 자세한 정보를 공유해 주시면, 예를 들어 스크린캐스트를 첨부해 주시는 것도 좋습니다. 이렇게 하시면 요청하신 내용을 더 쉽게 이해할 수 있습니다. 사용 중인 환경에 대해서도 더 자세히 알려 주실 수 있을까요?

이 방식은 맥락을 제거하게 되므로 제게는 다소 복잡해 보입니다.

Actually the Results List already persists across clicks, but there is currently no way to index through results (like a prev/next result button, handler or keyboard shortcut) except manually.

This video shows Find failing since discourse uses Lazy/Virtual lists, so we switch to Search within this topic, but there is no easy way to navigate between results without reopening the search menu, which cover the page, so it must be dismissed to scan over a result, then re-opened, scroll again, manually find the last result we selected, and click the result after that.

It is made worse since the search results cover the page so they must be dismissed to read a post and reopened every time.

If we’re going to replace the browser native Find function, which has existed in its current state since time immemorial, it should be at least equivalent in function.

The list is there, computer are great at moving through lists, and I can’t see anything complicated about it.