Commit 5c4d6606 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'line_wrap_default' into 'master'

Enable line wrapping per default.

This MR enables line wrapping by default and removes the checkbox to toggle it.

Let's be honest, noone likes horizontal scrollbars.

/cc @dzaporozhets @DouweM As discussed yesterday. Please take a look. Did I miss something?
The change feels to easy 😄

See merge request !396
parents dbd347bf 120f032b
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 7.10.0 (unreleased) v 7.10.0 (unreleased)
- enable line wrapping per default and remove the checkbox to toggle it (Hannes Rosenögger)
- Add a service to support external wikis (Hannes Rosenögger) - Add a service to support external wikis (Hannes Rosenögger)
v 7.9.0 (unreleased) v 7.9.0 (unreleased)
......
$ ->
# Toggle line wrapping in diff.
#
# %div.diff-file
# %input.js-toggle-diff-line-wrap
# %td.line_content
#
$("body").on "click", ".js-toggle-diff-line-wrap", (e) ->
diffFile = $(@).closest(".diff-file")
if $(@).is(":checked")
diffFile.addClass("diff-wrap-lines")
else
diffFile.removeClass("diff-wrap-lines")
...@@ -22,11 +22,6 @@ ...@@ -22,11 +22,6 @@
.diff-btn-group .diff-btn-group
- if blob.text? - if blob.text?
- unless params[:view] == 'parallel'
%label
= check_box_tag nil, 1, false, class: 'js-toggle-diff-line-wrap'
Wrap text
 
= link_to '#', class: 'js-toggle-diff-comments btn btn-sm' do = link_to '#', class: 'js-toggle-diff-comments btn btn-sm' do
%i.fa.fa-chevron-down %i.fa.fa-chevron-down
Show/Hide comments Show/Hide comments
...@@ -39,7 +34,7 @@ ...@@ -39,7 +34,7 @@
= view_file_btn(@commit.id, diff_file, project) = view_file_btn(@commit.id, diff_file, project)
.diff-content .diff-content.diff-wrap-lines
-# Skipp all non non-supported blobs -# Skipp all non non-supported blobs
- return unless blob.respond_to?('text?') - return unless blob.respond_to?('text?')
- if blob.text? - if blob.text?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment