Skip to content

[GSoC week 1] Add collapsible details to show the newly added content to the English version of the file#1424

Open
aashishpanthi wants to merge 4 commits into
processing:v1from
aashishpanthi:main
Open

[GSoC week 1] Add collapsible details to show the newly added content to the English version of the file#1424
aashishpanthi wants to merge 4 commits into
processing:v1from
aashishpanthi:main

Conversation

@aashishpanthi

Copy link
Copy Markdown
Member

In-Issue Diffs: Update the tracker (index.js) to parse the englishDiff patch snippet and render it within a collapsible <details> section inside the GitHub Issue body. This allows volunteer translators to see exactly what changed without navigating away.

It looks like this.

Details I'm the content that was added or removed

This is my task from week 1: #1404

}
body += `</details>\n\n`;
} else {
body += `_(Could't generate preview of the differences for this change. Use the compare link above to see the full diff.)_\n\n`;

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.

Minor typo, should be Couldn't

body += `<details>\n<summary>Show patch snippet</summary>\n\n`;
body += `\`\`\`diff\n${englishDiff.patchSnippet}\n\`\`\`\n\n`;
if (englishDiff.isTruncated) {
body += `_(Patch snippet truncated. Use the compare link above for the full diff.)_\n\n`;

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.

by compare link are we referring to View full compare used above?

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.

by compare link are we referring to View full compare used above?

yes we are

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.

Then what if englishDiff.compareUrl is false but englishDiff.patchSnippet is true? your driving if condition will satisfy but there will be no compare link right?

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.

Then what if englishDiff.compareUrl is false but englishDiff.patchSnippet is true? your driving if condition will satisfy but there will be no compare link right?

I was going to say yes, but I looked at the code, and I don't see a scenario where the compareUrl is false. Inside getRecentDiffForFile() there is no instance where the function will return the null compareUrl.

Please let me know if I missed anything.

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.

@Divyansh013 remove the unncessary coditional statement as we discussed

@aashishpanthi aashishpanthi marked this pull request as ready for review June 25, 2026 13:49
Copilot AI review requested due to automatic review settings June 25, 2026 13:49
@aashishpanthi aashishpanthi marked this pull request as draft June 25, 2026 13:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@aashishpanthi aashishpanthi marked this pull request as ready for review June 29, 2026 18:10

@Divyansh013 Divyansh013 left a comment

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.

Hi, @aashishpanthi LGTM, we will incorporate this code snippet in our final draft

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.

3 participants