rtfpessoa / diff2html

Pretty diff to html javascript library (diff2html)
https://diff2html.xyz
MIT License
2.8k stars 273 forks source link

side-by-side way too wide for wide diffs #473

Closed jpedrick closed 1 year ago

jpedrick commented 1 year ago

Step 0: Describe your environment

A very wide CSV (~100 columns) diff will expand the d2h-files-diff class beyond 100% of the parent element. The d2h-file-wrapper class is the correct width.

Steps to reproduce:

  1. Use side-by-side outputFormat
  2. Load a diff of a CSV with many columns

diff example:

TODO: Will update with generated example in the future

Observed Results:

Expected Results:

rtfpessoa commented 1 year ago

Can you provide a working example of the problem?

You can use the demo here if it helps https://diff2html.xyz/demo.html?matching=none&matchWordsThreshold=0.25&maxLineLengthHighlight=10000&diffStyle=word&renderNothingWhenEmpty=0&matchingMaxComparisons=2500&maxLineSizeInBlockForComparison=200&outputFormat=line-by-line&drawFileList=1&synchronisedScroll=1&highlight=1&fileListToggle=1&fileListStartVisible=0&highlightLanguages=[object%20Map]&smartSelection=1&fileContentToggle=1&stickyFileHeaders=1&diff=https://github.com/rtfpessoa/diff2html/pull/106

jpedrick commented 1 year ago

Hi @rtfpessoa

I think this should demonstrate the issue: Example

rtfpessoa commented 1 year ago

Thanks for the example, fix on the way.