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

Refactor and fix diff highlighting #101

Merged
merged 11 commits into from
Oct 15, 2024
Merged

Refactor and fix diff highlighting #101

merged 11 commits into from
Oct 15, 2024

Conversation

mathewpareles
Copy link
Contributor

This pull request includes several commits that refactor and fix the diff highlighting feature. The changes include:

  1. Creating diffs using the diffArea data structure instead of just the diff data structure.

  2. Making diffs responsive on changes. Changes are handled by DisplayChangesProvider.ts, and involve creating new diffAreas and diffs, refreshing changes dynamically refreshDiffAreas, and accepting and rejecting diffs.

  3. Handling diff logic entirely in the findDiffs.ts file, instead of in both getDiffedLines.js and extension.ts.

  4. Renaming variables and functions. New names include acceptDiff, rejectDiff, and types have more uniform names including BaseDiffArea, DiffArea, BaseDiff, and Diff.

Copy link
Contributor Author

@mathewpareles mathewpareles left a comment

Choose a reason for hiding this comment

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

Changes pass all tests.

@andrewpareles andrewpareles added the high priority High priority issue label Oct 15, 2024
@andrewpareles andrewpareles merged commit 68c5ebb into main Oct 15, 2024
@mathewpareles
Copy link
Contributor Author

Note that this PR solves Issue #15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority High priority issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants