Skip to content

Introduce text multi diff - #207747

Merged
Logan Ramos (lramos15) merged 1 commit into
mainfrom
lramos15/sour-capybara
Mar 14, 2024
Merged

Logan Ramos (lramos15) merged 1 commit into
mainfrom
lramos15/sour-capybara

Conversation

@lramos15

Copy link
Copy Markdown
Member

@lramos15
Logan Ramos (lramos15) enabled auto-merge (squash) March 14, 2024 18:23
@vscodenpa VS Code Bot (vscodenpa) added this to the March 2024 milestone Mar 14, 2024
@lramos15
Logan Ramos (lramos15) merged commit 98968c0 into main Mar 14, 2024
@lramos15
Logan Ramos (lramos15) deleted the lramos15/sour-capybara branch March 14, 2024 18:37
Comment on lines +205 to +214
for (const resource of (editor?.initialResources ?? [])) {
if (resource.original && resource.modified) {
diffEditors.push({
kind: TabInputKind.TextDiffInput,
original: resource.original,
modified: resource.modified
});
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note that the resources of a multi diff editor can change!
For scm, initialResources is empty, and the resources are loaded via the multi diff editor source uri.

@lramos15 Logan Ramos (lramos15) Mar 15, 2024 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm do you have suggestions on how to tackle this? Is there an event that fires when these resources change? I'm not sure we have other editor inputs that are like this as normally the input just becomes a new one if resources change. It could be worthwhile to not expose the resources at all then, as this would still allow closing to work properly you just wouldn't know what is inside the tab you're closing

@hediet Henning Dieterichs (hediet) Mar 15, 2024 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, I'd suggest to not expose the resources for now.
And yes, there are events etc, but I guess it is a bit tricky to implement.

@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi diff text editor has no tab input

4 participants