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

Decouple search logic from tree view (specifically jobs) #3052

Open
traeok opened this issue Aug 20, 2024 · 1 comment
Open

Decouple search logic from tree view (specifically jobs) #3052

traeok opened this issue Aug 20, 2024 · 1 comment
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits

Comments

@traeok
Copy link
Member

traeok commented Aug 20, 2024

Is your feature request related to a problem? Please describe.

Currently the quick picks and all related UX for searching is tightly coupled within the tree views. This means we cannot spawn the same dialogs without duplicating existing code, especially in a context where we don't want to use a node when performing the search.

Describe the solution you'd like

It would be nice to separate this logic out so that it can be used for other use cases. A generic function that prompts the user for these values would avoid the need to duplicate the same quick pick logic elsewhere. Here's an example for the jobs tree:

interface JobSearch {
    owner: string;
    prefix: string;
    status: string;
};
function jobSearchPrompt(): Promise<JobSearch> {
    // prompting logic here...
    return {
        owner: owner ?? "*",
        prefix: prefix ?? "*",
        status: status ?? "*",
    };
}

Describe alternatives you've considered

We could duplicate the same search/prompt code everywhere we need to use it, but this is really bad practice and results in having to maintain two different areas containing the same logic.

Additional context

This was brought up as an enhancement request for #3050. Having a function such as the example above will allow us to quickly execute searches without relying on the tree view or binding a search result to a specific profile node. This is somewhat available in the Dataset and USS trees (as we can lookup using the FileSystemProviders), but the prompts are still tightly coupled to the trees.

@traeok traeok added the enhancement New feature or request label Aug 20, 2024
Copy link

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 10 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

@adam-wolfe adam-wolfe added the priority-medium Not functioning - next quarter if capacity permits label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits
Projects
Status: Medium Priority
Development

No branches or pull requests

2 participants