webdiff icon indicating copy to clipboard operation
webdiff copied to clipboard

JSON normalization followup

Open danvk opened this issue 8 months ago • 0 comments

Minor nice-to-haves after the core functionality in #237:

  • [x] Add a keyboard shortcut (n and j are the obvious choices, but they're already taken; n=next diffhunk, j=nextfile)
  • [ ] No loading indicator when toggling normalization on/off
  • [ ] Only show the toggle if there's a diff
  • [ ] Only show the toggle if it would make a difference
  • [ ] Report diffstats after normalization
  • [x] Show the "no diff" banner if there's no diff after normalization
  • [ ] Add a way to default this to true (workaround: add ?normalize_json=1 to the URL or toggle under the gear)
  • [x] Match the visual style of .image-diff-controls (gray background, full width)
  • [x] Add a way to toggle this under the settings gear, so that you can set it before navigating to a big JSON file.
  • [x] Suppress diffs for big, one-line JSON files. (Example: https://github.com/danvk/oldnyc/commit/172b3b276de902133a290dc350adb5ea79cb20b2)
  • [ ] Offer normalization for pure adds (Example: https://github.com/danvk/oldnyc/commit/7c30363af5d7324603184e0ebe8ced93260ebdf2)

danvk avatar May 28 '25 15:05 danvk