From a25d90335ad3738b6831288190132c2f7498465c Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 10 Jul 2026 00:35:24 +0200 Subject: Retire vendored cacycle_diff.js for a diff-lcs-based diff view Revisions#diff now computes an inline or side-by-side word diff server-side (Page#diff_against, lib/html_word_diff.rb) instead of shipping raw/escaped content to the browser for a 2008-era vendored JS differ to mangle. View mode is picked via a `view` param, settable either on the diff page itself or directly from the revisions#index sticky bar next to "Diff revisions". Also fixes a pre-existing bug in RevisionsController#diff's single- revision branch, which set params[:start]/params[:end] instead of params[:start_revision]/params[:end_revision]. --- public/stylesheets/admin.css | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'public/stylesheets') diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 38c9e5a6..1bb6cf4c 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css @@ -511,6 +511,31 @@ table.revisions_table tr:hover { background-color: #f1f1f1; } +#diffview del { + background: #ffd7d5; + color: #82071e; + text-decoration: line-through; + padding: 0 2px; + border-radius: 2px; +} + +#diffview ins { + background: #ccffd8; + color: #055d20; + text-decoration: none; + padding: 0 2px; + border-radius: 2px; +} + +#diffview .diff_side_by_side { + display: flex; + gap: 1rem; +} + +#diffview .diff_column { + flex: 1; +} + table.user_table td.user_login { padding-right: 30px; } -- cgit v1.3