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

Grouping snippets #47

Open
maraf opened this issue Jan 16, 2023 · 0 comments · May be fixed by #73
Open

Grouping snippets #47

maraf opened this issue Jan 16, 2023 · 0 comments · May be fixed by #73

Comments

@maraf
Copy link
Member

maraf commented Jan 16, 2023

GitHub snippet provider generates 4 (or 5) snippets for every repository. It could generate even more snippets (pulls, settings, discussions, actions, code search, etc). But that would flood the snippet list in current implementation.

1. Scoping like app filter

We could create kind of scoping. Idea is that if user presses TAB on selected snippet, it will scope the search to include only sub snippets for the selected one. Some snippet would act as a folders (not applyable) or combination (applyable + containing sub snippets).

The scoping UI coould look like app filter (#4) where pressing backspace on empty search box will drop the scoping filter.

Cons

  • Currently the user can write "Snipp Mana iss" to find a snippet for list of issues on this repo. After the proposed changes, user would need to the 2 steps: Write "Snipp Mana", press TAB, write "iss".
    • To mitigate the extra step, we could automatically add sub snippets if filtered list of snippets contains 1 (or X) items.

2. Tree view

Other approach would be to use tree view for displaying snippets. Search will filter only root snippets. When the user opens a tree item, searching will start to look in there.

Cons

  • As we show only 5 items, the window's height will either grow or we will show only few items.
  • Missing the scoping might be harder for orientation.
@maraf maraf pinned this issue Apr 5, 2023
@maraf maraf linked a pull request Apr 28, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant