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

Additional input text line for either filtering or searching #329

Open
stenzengel opened this issue Feb 13, 2024 · 2 comments
Open

Additional input text line for either filtering or searching #329

stenzengel opened this issue Feb 13, 2024 · 2 comments

Comments

@stenzengel
Copy link

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?

@tscanlin
Copy link
Owner

tscanlin commented Feb 14, 2024 via email

@stenzengel
Copy link
Author

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 Go -> Go to Symbol in Editor. Other editors that I know of, have similar features (in addition to a normal search) to quickly jump to headings in a text or functions in source code.

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

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

No branches or pull requests

2 participants