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

Add support for disabling nesting in the sinppets menu #17418

Closed
wants to merge 1 commit into from

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Jun 10, 2024

Adds a nesting param to showSuggestions. The default remains "enabled". We now also accept "disabled", which will plop all the snippets into a single top-level list. This will make it easier for users to open suggestions based on what they've already typed at the commandline. e.g. type gitco at the commandline, and have that pre-filtered to the git commit -m ""\u001b[D snippet.

As spec'd in Suggestions-UI.md


It's dangerous to go alone, take this:

    "actions": 
    [
        {
            "command": 
            {
                "action": "showSuggestions",
                "nesting": "disabled",
                "source": "all",
                "useCommandline": true
            },
            "id": "User.showSuggestions.noNesting"
        },
    ],
    "keybindings": 
    [
        {
            "id": "User.showSuggestions.noNesting",
            "keys": "ctrl+shift+space"
        },

Adds a `nesting` param to `showSuggestions`. The default remains `"enabled"`. We now also accept `"disabled"`, which will plop all the snippets into a single top-level list. This will make it easier for users to open suggestions based on what they've already typed at the commandline. e.g. type `gitco` at the commandline, and have that pre-filtered to the `git commit -m ""\u001b[D` snippet.

As spec'd in [Suggestions-UI.md](https://github.com/microsoft/terminal/blob/main/doc/specs/%231595%20-%20Suggestions%20UI/Suggestions-UI.md)
@DHowett
Copy link
Member

DHowett commented Jun 10, 2024

Could we just make nesting "transparent" when you're searching? I don't think anyone would truly have enough categories that a well-targeted search should need to go through multiple levels.

@zadjii-msft
Copy link
Member Author

Could we just make nesting "transparent" when you're searching? I don't think anyone would truly have enough categories that a well-targeted search should need to go through multiple levels.

ryan-point

@zadjii-msft
Copy link
Member Author

Closing this one out for now. Just disabling nesting when there's search text does seem sane. BUT to do that, I need to:

  • merge snippets pane (Add a snippets pane #17330)
  • Yank FilteredTask into it's own file
  • Do the "I can filter on the input as well as the name"
  • then do this

because it doesn't make sense if you can't also include filtering the literal typed commandline.

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

Successfully merging this pull request may close these issues.

None yet

2 participants