-
Notifications
You must be signed in to change notification settings - Fork 10
@ W-18480465 - Apex full file diff #332
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
@ W-18480465 - Apex full file diff #332
Conversation
If the diff content is even larger then the one is the attached image, then will the scroll bar come? |
const patch: string = createPatch('', originalFileContent, modifiedFileContent); | ||
const patchLines = patch.split('\n'); | ||
|
||
let origIdx = 0; |
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.
How it will show when the single file has multiple changes within file?
public getFullFileDiff(filename: string, originalFileContent: string, modifiedFileContent: string): DiffPair[] { | ||
const originalLines = originalFileContent.split('\n'); | ||
const modifiedLines = modifiedFileContent.split('\n'); | ||
const patch: string = createPatch('', originalFileContent, modifiedFileContent); |
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.
instead of writing our own custom logic to derive difference from patch, we can explore and leverage other methods provided by (diff)
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.
If the diff content is even larger then the one is the attached image, then will the scroll bar come?
Yes, the scrollbar will come when we scroll the file. However it will not always be visible, it will only appear while scrolling. |
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.
lgtm
@snehaljha-sf Can you approve and merge the changes |
What does this PR do?
What issues does this PR fix or reference?