diff --git a/app/assets/stylesheets/views/diff.css.sass b/app/assets/stylesheets/views/diff.css.sass index ca13f297d..9d32cfe4a 100644 --- a/app/assets/stylesheets/views/diff.css.sass +++ b/app/assets/stylesheets/views/diff.css.sass @@ -78,8 +78,5 @@ table.table.diff.inline margin-top: 5px div.file div.top - height: 28px + min-height: 28px background: #ededed - - .pull-left, .pull-right - margin: 6px 10px 0px 10px diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index f39194fad..f1353f461 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -1,4 +1,7 @@ module DiffHelper + MAX_FILES_WITHOUT_COLLAPSE = 25 + MAX_LINES_WITHOUT_COLLAPSE = 50 + def render_diff_stats(stats) path = @pull.try(:id) ? polymorphic_path([@project, @pull]) : '' @@ -20,7 +23,7 @@ module DiffHelper end def wrap_header_list(stats, list) - is_stats_open = stats.count <= 25 ? 'in' : '' + is_stats_open = stats.count <= MAX_FILES_WITHOUT_COLLAPSE ? 'in' : '' res = ["
"] res << "
" res << "