Skip to content

search should narrow beyond chapter #696

@aronatkins

Description

@aronatkins
  1. Visit a bookdown-built book deployed to an HTTP server, such as: https://docs.rstudio.com/connect/admin/
  2. Use the 'f' keyboard shortcut to open the search input dialog.
  3. Type in a search phrase; try "markdown".
  4. Observe that the left-hand TOC has narrowed to the chapters with matching content but shows all sub-sections - even those that do not match the term.

Search should narrow beyond chapter. Not narrowing makes it extremely difficult for book consumers to discover the occurrences of the term. They know that it is somewhere in the chapter but are not given additional guidance. This is complicated by the fact that users are unable to discover that up and down arrows can be used to navigate through results.

It's probably fine to not expand the sub-section tree and continue refining.

Here is a screenshot showing a number of "Files & Directories" sections included while filtering with search. Of these sections, "Variable Data" is the first that contains the "markdown" term.
image

This issue is lessened (not eliminated) by #254.

  • I have fully read the issue guide at https://yihui.name/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('bookdown'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/bookdown').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions