Skip to content

Feature/sideBySide-diff#8

Merged
djad04 merged 6 commits intomainfrom
feature/side-by-side-diff-logic
Nov 21, 2025
Merged

Feature/sideBySide-diff#8
djad04 merged 6 commits intomainfrom
feature/side-by-side-diff-logic

Conversation

@djad04
Copy link
Owner

@djad04 djad04 commented Nov 21, 2025

Key Features & Changes

  • Added DisplayMode { SideBySide, Inline } to QDiffWidget.
  • UI dynamically switches between:
    • Dual-panel side-by-side view
    • Single-panel unified view

Asynchronous Side-by-Side Calculation

  • Added:
    • calculateSideBySideDiff
    • calculateSideBySideDiffAsync
  • New signal: sideBySideDiffCalculated(QSideBySideDiffResult)
  • Keeps the UI responsive during diff generation.

New Data Structure

  • Introduced QSideBySideDiffResult, containing:
    • Left panel: Equal + Delete operations
    • Right panel: Equal + Insert operations
  • Automatically adds placeholder lines to keep both panels aligned.

QAlgorithmManager

  • Implemented private function divideDiffForSideBySide:
    • Converts unified QDiffResult into left/right panel results.
    • Maintains alignment via smart placeholder insertion.

QDiffWidget

  • Listens for the sideBySideDiffCalculated signal.
  • Added displaySideBySideDiff to render the two panels.
  • Updated updateDiff to choose the correct diff algorithm based on DisplayMode.

djad04 added 6 commits July 29, 2025 23:15
…rithmManager

Implement side-by-side diff calculation with both synchronous and asynchronous variants. The new functionality converts unified diff results into a side-by-side format, maintaining alignment between left and right sides.
- Implement display mode management (SideBySide/Inline)
- Add QAlgorithmManager integration for diff calculations
- Add slots for handling diff calculation results
- Update diff display logic based on selected mode
- Add helper methods for signal management and diff display
…k on Diff and Highlighting Features

This PR merges the latest `main` changes into the working development branch. This ensures compatibility and stability before continuing work on advanced diffing features and UI improvements.

---

- All recent commits from `main` (bug fixes, infra, etc.)

- QDiffTextBrowser line number and diff highlighting system
- Word-by-word diffing implementation
- Cleanup of DTL and DMP algorithms

---
@djad04 djad04 merged commit 1f5af67 into main Nov 21, 2025
7 checks passed
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.

1 participant