Add a setting to control page size#686
Merged
aeisenberg merged 1 commit intogithub:mainfrom Nov 21, 2020
Merged
Conversation
extensions/ql-vscode/CHANGELOG.md
Outdated
| - 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) |
Contributor
There was a problem hiding this comment.
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)
extensions/ql-vscode/package.json
Outdated
| "default": 20, | ||
| "description": "Max number of simultaneous queries to run using the 'CodeQL: Run Queries' command." | ||
| }, | ||
| "codeQL.runningQueries.pageSize": { |
Contributor
There was a problem hiding this comment.
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)?
Contributor
Author
There was a problem hiding this comment.
Maybe makes more sense to create a new category, codeQL.results or codeQL.display or codeQL.resultsDisplay. (I'm leaning towards the latter).
| { | ||
| offset: schema.pagination?.offsets[pageNumber], | ||
| pageSize: RAW_RESULTS_PAGE_SIZE | ||
| pageSize: PAGE_SIZE.getValue() |
Contributor
There was a problem hiding this comment.
Nit: you can fetch the page size setting once and save it to a variable for the below uses.
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.
196a651 to
f1e714e
Compare
adityasharad
approved these changes
Nov 21, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
@github/docs-content-dsphas been cc'd in all issues for UI or other user-facing changes made by this pull request.