-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Additional input text line for either filtering or searching #329
Comments
Hi, thanks for the suggestion Winfried. This is an interesting idea and
should be possible to implement with the existing APIs on top of Tocbot.
I think the trickiest things to figure out would be the scroll interactions
and hiding things when the user may not want them hidden, as you mentioned.
For instance, if you did hide things when filtered and then scrolled would
it show everything or just the current heading and its ancestors? Also what
would the scroll threshold be?
Are there reasons why the built in browser search is insufficient? I feel
like when I’m searching for something, I want to search the whole page
since the content is often not in headings. But maybe there is a use case
I’m missing. I have not heard this request before and currently don’t have
time to implement it, but if you’d like to make a plugin or something I’d
be happy to review and link to it.
Thanks,
-Tim
…On Tue, Feb 13, 2024 at 1:50 AM Winfried Stenzel ***@***.***> wrote:
Thanks for this nice project, which I like a lot and which I use for
Asciidoctor documents.
Have you ever thought about adding an additional input text line that
could be used to quickly find headings in a very long table of contents?
Two alternatives come to mind. I don't know which one makes more sense.
Maybe you have other ideas:
- Filtering:
This hides all headings (except ancestors) that do not match the
specified filter string. If it is confusing for the user that the current
heading may not be visible when scrolling in the document, the filter
string could either be cleared when scrolling, or the heading at the
current position (and its ancestors) should not be filtered away even if it
does not match the filter string.
- Searching:
This is similar to the standard browser search, but only searches the
TOC. There are no options (uppercase, whole word), but there are "Next" and
"Previous" buttons that allow you to jump to the matches in the TOC and
thus in the normal document.
What do you think?
—
Reply to this email directly, view it on GitHub
<#329>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGMYSE6HXBUIMFYSMPVLALYTMLN5AVCNFSM6AAAAABDGAXDSWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZTCNRVGI4TSOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi Tim, Thanks for the reply. The use case mainly revolves around using this filtering/search on a smartphone (for long a long text and toc), where you don't see much information on the screen and don't want to tap a lot of letters. For example, I imagine the filtering alternative as in VS Code when using the menu item Also, on a smartphone, the "scroll interactions and hiding things" you and I mentioned, would be less of a (or no) problem, because only the (filtered) toc is visible. Thanks for the review offer. Maybe I will give it a try. Winfried |
Thanks for this nice project, which I like a lot and which I use for Asciidoctor documents.
Have you ever thought about adding an additional input text line that could be used to quickly find headings in a very long table of contents?
Two alternatives come to mind. I don't know which one makes more sense. Maybe you have other ideas:
This hides all headings (except ancestors) that do not match the specified filter string. If it is confusing for the user that the current heading may not be visible when scrolling in the document, the filter string could either be cleared when scrolling, or the heading at the current position (and its ancestors) should not be filtered away even if it does not match the filter string.
This is similar to the standard browser search, but only searches the TOC. There are no options (uppercase, whole word), but there are "Next" and "Previous" buttons that allow you to jump to the matches in the TOC and thus in the normal document.
What do you think?
The text was updated successfully, but these errors were encountered: