Skip to content
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

Introduce text multi diff #207747

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Introduce text multi diff #207747

merged 1 commit into from
Mar 14, 2024

Conversation

lramos15
Copy link
Member

Fixes #206411

CC @hediet

@lramos15 lramos15 self-assigned this Mar 14, 2024
@lramos15 lramos15 enabled auto-merge (squash) March 14, 2024 18:23
@vscodenpa vscodenpa added this to the March 2024 milestone Mar 14, 2024
@lramos15 lramos15 merged commit 98968c0 into main Mar 14, 2024
7 checks passed
@lramos15 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
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.

Copy link
Member Author

@lramos15 lramos15 Mar 15, 2024

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

Copy link
Member

@hediet hediet Mar 15, 2024

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 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