Skip to content

Add a setting to control page size#686

Merged
aeisenberg merged 1 commit intogithub:mainfrom
aeisenberg:aeisenberg/page-size-config
Nov 21, 2020
Merged

Add a setting to control page size#686
aeisenberg merged 1 commit intogithub:mainfrom
aeisenberg:aeisenberg/page-size-config

Conversation

@aeisenberg
Copy link
Copy Markdown
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.

- 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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

"default": 20,
"description": "Max number of simultaneous queries to run using the 'CodeQL: Run Queries' command."
},
"codeQL.runningQueries.pageSize": {
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.

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
Copy Markdown
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).

{
offset: schema.pagination?.offsets[pageNumber],
pageSize: RAW_RESULTS_PAGE_SIZE
pageSize: PAGE_SIZE.getValue()
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.

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

Copy link
Copy Markdown
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 force-pushed the aeisenberg/page-size-config branch from 196a651 to f1e714e Compare November 21, 2020 00:13
@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