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

feat: add search functionality #157

Open
bashbunni opened this issue May 2, 2022 · 5 comments · Fixed by #697
Open

feat: add search functionality #157

bashbunni opened this issue May 2, 2022 · 5 comments · Fixed by #697
Assignees
Labels
enhancement New feature or request

Comments

@bashbunni
Copy link
Member

bashbunni commented May 2, 2022

Description

It would add lots of value to be able to search a document for keywords. Similar to how we filter lists or use / in vim

Related Issues

charmbracelet/glow#183

@bashbunni bashbunni added the enhancement New feature or request label May 2, 2022
@bashbunni
Copy link
Member Author

bashbunni commented May 24, 2022

Based on our conversation internally, we likely want a pager bubble build on viewport that you could search. It would include an overlap between viewport bubble + status bar bubble. Glamour will remain a rendering lib, not something interactive.

Features

What we’ve been envisioning for the pager bubble is basically rebuilding the glow pager but without glamour rendering so it’s more flexible. so basically:

  • viewport
  • status bar
  • toggle-able help

Bonus

  • break off the status bar into it’s own bubble so it can be reused, but that could always happen later too
  • glamour integration built in too (or maybe viewport has it baked in 🤔 ). So I could see two methods on the model like SetContent(string) and SetMarkdown(string)

@bashbunni bashbunni self-assigned this May 24, 2022
@bashbunni bashbunni transferred this issue from charmbracelet/glamour May 24, 2022
@rdalbuquerque
Copy link

Hi @bashbunni !
I was also in need for a feature like this so I decided to write my own, probably still needs lots of work to be as polished as other native bubbletea packages but it has been working great for me.

any feedback or contributions would be greatly appreciated!

https://github.com/rdalbuquerque/viewsearch

@bashbunni
Copy link
Member Author

@caarlos0 is this implemented in #697 ? I remember we spoke about this feature

@caarlos0
Copy link
Member

@bashbunni yep, pretty much!

@bashbunni bashbunni linked a pull request Jan 23, 2025 that will close this issue
@caarlos0
Copy link
Member

FWIW, its not the whole search, just the highlighting of ranges in the contents results.

I explained it better in #697, and there's a usage example in the gum PR linked there as well.

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

Successfully merging a pull request may close this issue.

3 participants