Skip to content

Only first 30 files per PR show in the "Pull Requests" view on vscode.dev#3683

Merged
alexr00 merged 1 commit intomainfrom
alexr00/issue3682
Jul 6, 2022
Merged

Only first 30 files per PR show in the "Pull Requests" view on vscode.dev#3683
alexr00 merged 1 commit intomainfrom
alexr00/issue3682

Conversation

@alexr00
Copy link
Member

@alexr00 alexr00 commented Jul 4, 2022

Fixes #3682

return ret;
}

export async function restPaginate<R extends OctokitTypes.RequestInterface, T>(request: R, variables: Parameters<R>[0]): Promise<T[]> {
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to stream in the list of PRs instead of waiting until all PRs are fetched?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the list of files (we actually do stream the list of PRs) and we can indeed stream it, but the user will need to click a "load more files" tree item for each next fetch. Unlike PRs though, I am guessing that if a user expands a PR then they will want to see all the files almost 100% of the time. The trade off is slower listing of files (even for a 900 file change it's not too bad) vs. having to click an annoying button repeatedly.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is also just a quick fix for a bug. I also want to investigate the perf of expanding a PR tree node and I can see how much improvement we get from streaming as part of that: #3684

Copy link
Member

Choose a reason for hiding this comment

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

but the user will need to click a "load more files" tree item for each next fetch

I mean streaming without clicking, but more a loading animation at the end of the list which gets longer with every fetched page.
Then, if there are 1000s of files, it wouldn't block the list to show.

Copy link
Member Author

Choose a reason for hiding this comment

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

The extension API for the tree view doesn't have support for that built in, but it might be doable nonetheless. When I do the perf investigation I'll see what's possible.

@alexr00 alexr00 merged commit 4d9809d into main Jul 6, 2022
@alexr00 alexr00 deleted the alexr00/issue3682 branch July 6, 2022 13:06
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.

Only first 30 files per PR show in the "Pull Requests" view on vscode.dev

3 participants