Skip to content

Indicate which language is selected in the databases view#2871

Merged
shati-patel merged 3 commits intomainfrom
shati-patel/db-selected
Sep 28, 2023
Merged

Indicate which language is selected in the databases view#2871
shati-patel merged 3 commits intomainfrom
shati-patel/db-selected

Conversation

@shati-patel
Copy link
Copy Markdown
Contributor

Adds (selected) after the selected language in the databases view:

db-language-selected.mp4

There's no public VS Code API for properly selecting a menu item (microsoft/vscode#109306), so adding a separate ...Selected command was the closest workaround I could find 😢 See internal issue, where we discussed a bit more.

Checklist

Still behind "canary", so no user-facing changes for now.

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

Comment thread extensions/ql-vscode/src/databases/local-databases-ui.ts Outdated
@shati-patel shati-patel marked this pull request as ready for review September 27, 2023 09:29
@shati-patel shati-patel requested review from a team as code owners September 27, 2023 09:29
Copy link
Copy Markdown
Contributor

@starcke starcke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not the prettiest implementation, but we dont know of a better way.

"title": "All languages"
},
{
"command": "codeQLDatabases.displayAllLanguagesSelected",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a bit tedious that we have to do it in this way. But maybe we can get a better way later.


private async handleChangeLanguageFilter(languageFilter: LanguageFilter) {
this.treeDataProvider.languageFilter = languageFilter;
await this.app.commands.execute(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably conflicts a little with #2873 but I am fine with the PRs going in either order.

@shati-patel
Copy link
Copy Markdown
Contributor Author

Thanks for the review! I'll merge this PR now, but let me know if I can help with any conflicts

@shati-patel shati-patel merged commit d5c78fd into main Sep 28, 2023
@shati-patel shati-patel deleted the shati-patel/db-selected branch September 28, 2023 10:30
@starcke starcke mentioned this pull request Oct 16, 2023
3 tasks
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.

2 participants