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 a setting to control page size #686

Merged
merged 1 commit into from
Nov 21, 2020

Conversation

aeisenberg
Copy link
Contributor

Also, set a max and min value on the input control of the page. This
prevents going to a negative page, or a page after the last one.

Fixes #525

Checklist

  • 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.
  • [n/a] @github/docs-content-dsp has been cc'd in all issues for UI or other user-facing changes made by this pull request.

@@ -9,6 +9,7 @@
- Add more structured output for tests. [#626](https://github.com/github/vscode-codeql/pull/626)
- Whenever the extension restarts, orphaned databases will be cleaned up. These are databases whose files are located inside of the extension's storage area, but are not imported into the workspace.
- After renaming a database, the database list is re-sorted. [#685](https://github.com/github/vscode-codeql/pull/685)
- Add a setting to configure number of results displayed in a single results view page. [#686](https://github.com/github/vscode-codeql/pull/686)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Add a setting to configure number of results displayed in a single results view page. [#686](https://github.com/github/vscode-codeql/pull/686)
- Add a `codeQl.runningQueries.pageSize` setting to configure the number of results displayed in a single results view page. [#686](https://github.com/github/vscode-codeql/pull/686). Increase the default page size from 100 to 200.

(edit if you rename the setting)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -157,6 +157,11 @@
"default": 20,
"description": "Max number of simultaneous queries to run using the 'CodeQL: Run Queries' command."
},
"codeQL.runningQueries.pageSize": {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think of runningQueries as options for executing query. Would queryHistory be a better category, or perhaps a new one for the results view (like we do for subcommands)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe makes more sense to create a new category, codeQL.results or codeQL.display or codeQL.resultsDisplay. (I'm leaning towards the latter).

@@ -488,13 +489,14 @@ export class InterfaceManager extends DisposableObject {
schema.name,
{
offset: schema.pagination?.offsets[pageNumber],
pageSize: RAW_RESULTS_PAGE_SIZE
pageSize: PAGE_SIZE.getValue()
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: you can fetch the page size setting once and save it to a variable for the below uses.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Also, set a max and min value on the input control of the page. This
prevents going to a negative page, or a page after the last one.
@aeisenberg aeisenberg merged commit 1886c0c into github:main Nov 21, 2020
@aeisenberg aeisenberg deleted the aeisenberg/page-size-config branch November 24, 2020 22:30
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.

User should be able to configure page size in results viewer
2 participants