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

Feature Request: have an option to include less content in the results #12

Open
nhan000 opened this issue Aug 16, 2023 · 1 comment
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nhan000
Copy link

nhan000 commented Aug 16, 2023

In the content of "Topic A" note:

# [[Topic B]]
Contents related to both topic A and B

Now if I go to "Topic B" note, in the Backlinks pane, the "Topic A" section will display the entire content below the heading # [[Topic B]], which can be very long. In this case I'd like the displayed results only show the heading and no content (or it can also be collapsed by default).

Ideally, there are 3 control levels:

  • Only include the line that the search term appears.
  • Include the full context (current behavior).
  • If possible, a middle ground solution is to include about 5 lines of text below the level of the search results, like a preview. Users can click the results to view more details.

If it's too much, I can live happily with "Only include the line that the search term appears". I believe that's the default search/backlinks behavior in Obsidian(?)

Related to #8?

@ivan-lednev ivan-lednev added enhancement New feature or request good first issue Good for newcomers labels Aug 22, 2023
@skritch
Copy link

skritch commented Oct 5, 2023

Screen Shot 2023-10-05 at 1 04 03 PM Screen Shot 2023-10-05 at 1 06 09 PM

AFAICT the builtin backlink pane already has this functionality:

  • First purple button at the top (first SS) first is "collapse" (appears to work with this plugin)
  • Second purple button (first SS) is "show more results"—but this plugin stops working if you toggle this until your reset the pane by visiting a new page (Looks like that's reported in [BUG] Disabling Show more context causes reversion #3)
  • Second SS shoes that the regular backlink pane has a little expand/collapse button. Search has this too. But it doesn't work in the views provided by this plugin.

It'd be great if this plugin implemented both expand/collapse and "show more" buttons for search too (exactly as they appear in backlinks)—though I guess that would expand the scope a bit, since it would be overriding another UI component. Maybe a better issue for Obsidian core, or a separate plugin.

  • Update: ah, it exists, it's just a different UI, hidden in that little button next to the search box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants