Commit 4d6fbaad authored by Phil Hughes's avatar Phil Hughes

Merge branch 'jdb/fix-diffs-viewer-max-lines' into 'master'

Fix usage of MAX_LINES_TO_BE_RENDERED

See merge request gitlab-org/gitlab!40741
parents 11f7576a ddaa445e
...@@ -34,7 +34,6 @@ export const COUNT_OF_AVATARS_IN_GUTTER = 3; ...@@ -34,7 +34,6 @@ export const COUNT_OF_AVATARS_IN_GUTTER = 3;
export const LENGTH_OF_AVATAR_TOOLTIP = 17; export const LENGTH_OF_AVATAR_TOOLTIP = 17;
export const LINES_TO_BE_RENDERED_DIRECTLY = 100; export const LINES_TO_BE_RENDERED_DIRECTLY = 100;
export const MAX_LINES_TO_BE_RENDERED = 2000;
export const DIFF_FILE_SYMLINK_MODE = '120000'; export const DIFF_FILE_SYMLINK_MODE = '120000';
export const DIFF_FILE_DELETED_MODE = '0'; export const DIFF_FILE_DELETED_MODE = '0';
......
...@@ -11,7 +11,6 @@ import { ...@@ -11,7 +11,6 @@ import {
OLD_LINE_TYPE, OLD_LINE_TYPE,
MATCH_LINE_TYPE, MATCH_LINE_TYPE,
LINES_TO_BE_RENDERED_DIRECTLY, LINES_TO_BE_RENDERED_DIRECTLY,
MAX_LINES_TO_BE_RENDERED,
TREE_TYPE, TREE_TYPE,
INLINE_DIFF_VIEW_TYPE, INLINE_DIFF_VIEW_TYPE,
PARALLEL_DIFF_VIEW_TYPE, PARALLEL_DIFF_VIEW_TYPE,
...@@ -457,12 +456,10 @@ function getVisibleDiffLines(file) { ...@@ -457,12 +456,10 @@ function getVisibleDiffLines(file) {
} }
function finalizeDiffFile(file) { function finalizeDiffFile(file) {
const name = (file.viewer && file.viewer.name) || diffViewerModes.text;
const lines = getVisibleDiffLines(file); const lines = getVisibleDiffLines(file);
Object.assign(file, { Object.assign(file, {
renderIt: lines < LINES_TO_BE_RENDERED_DIRECTLY, renderIt: lines < LINES_TO_BE_RENDERED_DIRECTLY,
collapsed: name === diffViewerModes.text && lines > MAX_LINES_TO_BE_RENDERED,
isShowingFullFile: false, isShowingFullFile: false,
isLoadingFullFile: false, isLoadingFullFile: false,
discussions: [], discussions: [],
......
---
title: Fix client usage of max line rendering
merge_request: 40741
author:
type: fixed
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