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

Select in the explorer treeview the topic, cluster which is created #72

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

angelozerr
Copy link
Collaborator

Select in the explorer treeview the topic, cluster which is created

Fixes #61

Signed-off-by: azerr [email protected]

@angelozerr
Copy link
Collaborator Author

angelozerr commented Jan 8, 2021

I need to clean my code again but it starts working, see the following demo:

SelectTopicAfterCreateDemo

As you can see in the demo, there are a lot of topics, and the select helps to select quickly the created topic.

In other words, this PR gives the capability to select the created topic, or cluster in the treeview.

To do that I created the treeview with vscode.createTreeview to benefit with reveal method. (see https://code.visualstudio.com/api/extension-guides/tree-view#registering-the-treedataprovider). The reveal method requires to implement the getParent in the tree data provider, it's the reason why I did a big refactoring to have a KafkaModel.

It follows the same idea than NPM view from vscode https://github.com/microsoft/vscode/blob/445f259e34c789125d5cbe0141babdb60704f611/extensions/npm/src/npmView.ts#L218

src/wizards/clusters.ts Outdated Show resolved Hide resolved
src/wizards/topics.ts Outdated Show resolved Hide resolved
src/explorer/models/cluster.ts Outdated Show resolved Hide resolved
src/explorer/kafkaExplorer.ts Outdated Show resolved Hide resolved
@fbricon
Copy link
Collaborator

fbricon commented Jan 11, 2021

Treeview focus should be triggered explicitly, else it can take focus unexpectedly
Jan-11-2021 14-43-07

src/wizards/clusters.ts Outdated Show resolved Hide resolved
src/wizards/topics.ts Outdated Show resolved Hide resolved
@angelozerr angelozerr force-pushed the explorer-treeview branch 3 times, most recently from bb42150 to 6443f47 Compare January 11, 2021 14:43
@angelozerr
Copy link
Collaborator Author

Treeview focus should be triggered explicitly, else it can take focus unexpectedly

should be fixed now

@angelozerr
Copy link
Collaborator Author

Newly created topic or cluster is automatically selected in the Kafka Explorer.

fixed

src/wizards/clusters.ts Outdated Show resolved Hide resolved
src/wizards/clusters.ts Outdated Show resolved Hide resolved
src/wizards/topics.ts Outdated Show resolved Hide resolved
src/wizards/topics.ts Outdated Show resolved Hide resolved
@fbricon fbricon merged commit 41748a5 into jlandersen:master Jan 11, 2021
@fbricon
Copy link
Collaborator

fbricon commented Jan 11, 2021

Thanks @angelozerr!

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.

Select in the explorer treeview the topic, cluster which is created
2 participants