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 'Collapse All Diffs' action button to multi-diff editor #199064
Conversation
|
/assign @hediet in the hope this will be considered for merging, perhaps even in time for upcoming endgame of the November 2023 milestone. |
| @@ -27,6 +27,12 @@ export class MultiDiffEditorViewModel extends Disposable { | |||
| } | |||
| } | |||
|
|
|||
| public collapseAll(): void { | |||
| for (const d of this.items.get()) { | |||
| d.collapsed.set(true, undefined); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should run in a transaction (rather than passing in undefined), as otherwise every collapsed.set will cause a re-layout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
src/vs/editor/browser/widget/multiDiffEditorWidget/multiDiffEditorViewModel.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Henning Dieterichs <notify.henning.dieterichs@live.de>
|
Fails with: Probably because you took my suggestion where I had to use space to indent (urgh github). |
|
Just noticed:
This might be problematic when you have a multi diff editor to the side. When the |
It's already the case that when an editor's group is not the active group none of its toolbar buttons display. So I don't think anything needs to be changed. Please merge this PR. |
|
Today we have our testing day and don't allow code changes, but we can merge it tomorrow. |
This PR closes #198248