2018-06-21 08:22:40 -04:00
|
|
|
export const INLINE_DIFF_VIEW_TYPE = 'inline';
|
|
|
|
export const PARALLEL_DIFF_VIEW_TYPE = 'parallel';
|
|
|
|
export const MATCH_LINE_TYPE = 'match';
|
2022-04-20 17:08:12 -04:00
|
|
|
export const EXPANDED_LINE_TYPE = 'expanded';
|
2018-06-21 08:22:40 -04:00
|
|
|
export const OLD_NO_NEW_LINE_TYPE = 'old-nonewline';
|
|
|
|
export const NEW_NO_NEW_LINE_TYPE = 'new-nonewline';
|
2018-11-07 16:57:26 -05:00
|
|
|
export const CONTEXT_LINE_TYPE = 'context';
|
2018-06-21 08:22:40 -04:00
|
|
|
export const EMPTY_CELL_TYPE = 'empty-cell';
|
|
|
|
export const COMMENT_FORM_TYPE = 'commentForm';
|
|
|
|
export const DIFF_NOTE_TYPE = 'DiffNote';
|
2018-09-10 14:41:57 -04:00
|
|
|
export const LEGACY_DIFF_NOTE_TYPE = 'LegacyDiffNote';
|
2018-06-22 16:16:46 -04:00
|
|
|
export const NOTE_TYPE = 'Note';
|
2018-06-21 08:22:40 -04:00
|
|
|
export const NEW_LINE_TYPE = 'new';
|
|
|
|
export const OLD_LINE_TYPE = 'old';
|
|
|
|
export const TEXT_DIFF_POSITION_TYPE = 'text';
|
2018-10-18 03:50:38 -04:00
|
|
|
export const IMAGE_DIFF_POSITION_TYPE = 'image';
|
2018-06-21 08:22:40 -04:00
|
|
|
|
|
|
|
export const LINE_POSITION_LEFT = 'left';
|
|
|
|
export const LINE_POSITION_RIGHT = 'right';
|
2018-06-27 17:20:41 -04:00
|
|
|
export const LINE_SIDE_LEFT = 'left-side';
|
|
|
|
export const LINE_SIDE_RIGHT = 'right-side';
|
2018-06-21 08:22:40 -04:00
|
|
|
|
|
|
|
export const DIFF_VIEW_COOKIE_NAME = 'diff_view';
|
2020-07-08 11:09:24 -04:00
|
|
|
export const DIFF_WHITESPACE_COOKIE_NAME = 'diff_whitespace';
|
2018-06-21 08:22:40 -04:00
|
|
|
export const LINE_HOVER_CLASS_NAME = 'is-over';
|
|
|
|
export const LINE_UNFOLD_CLASS_NAME = 'unfold js-unfold';
|
2018-11-07 16:57:26 -05:00
|
|
|
export const CONTEXT_LINE_CLASS_NAME = 'diff-expanded';
|
2018-06-21 08:22:40 -04:00
|
|
|
|
|
|
|
export const UNFOLD_COUNT = 20;
|
|
|
|
export const COUNT_OF_AVATARS_IN_GUTTER = 3;
|
|
|
|
export const LENGTH_OF_AVATAR_TOOLTIP = 17;
|
2018-08-13 05:55:30 -04:00
|
|
|
|
2020-07-28 14:09:36 -04:00
|
|
|
export const DIFF_FILE_SYMLINK_MODE = '120000';
|
|
|
|
export const DIFF_FILE_DELETED_MODE = '0';
|
|
|
|
|
2018-10-03 05:05:43 -04:00
|
|
|
export const MR_TREE_SHOW_KEY = 'mr_tree_show';
|
2019-01-15 08:37:21 -05:00
|
|
|
|
|
|
|
export const TREE_TYPE = 'tree';
|
2019-01-24 09:48:03 -05:00
|
|
|
export const TREE_LIST_STORAGE_KEY = 'mr_diff_tree_list';
|
2019-02-15 05:25:33 -05:00
|
|
|
export const TREE_LIST_WIDTH_STORAGE_KEY = 'mr_tree_list_width';
|
|
|
|
|
|
|
|
export const INITIAL_TREE_WIDTH = 320;
|
|
|
|
export const MIN_TREE_WIDTH = 240;
|
|
|
|
export const TREE_HIDE_STATS_WIDTH = 260;
|
2019-02-28 09:14:15 -05:00
|
|
|
|
|
|
|
export const OLD_LINE_KEY = 'old_line';
|
|
|
|
export const NEW_LINE_KEY = 'new_line';
|
|
|
|
export const TYPE_KEY = 'type';
|
|
|
|
export const LEFT_LINE_KEY = 'left';
|
2019-03-28 17:37:06 -04:00
|
|
|
|
2019-05-03 03:33:15 -04:00
|
|
|
export const MAX_RENDERING_DIFF_LINES = 500;
|
|
|
|
export const MAX_RENDERING_BULK_ROWS = 30;
|
|
|
|
export const MIN_RENDERING_MS = 2;
|
|
|
|
export const START_RENDERING_INDEX = 200;
|
|
|
|
export const INLINE_DIFF_LINES_KEY = 'highlighted_diff_lines';
|
|
|
|
export const PARALLEL_DIFF_LINES_KEY = 'parallel_diff_lines';
|
2020-04-09 17:09:19 -04:00
|
|
|
|
|
|
|
export const DIFF_COMPARE_BASE_VERSION_INDEX = -1;
|
2020-04-21 11:21:10 -04:00
|
|
|
export const DIFF_COMPARE_HEAD_VERSION_INDEX = -2;
|
2020-05-20 05:08:11 -04:00
|
|
|
|
2020-09-17 08:09:37 -04:00
|
|
|
// Diff View Alerts
|
|
|
|
export const ALERT_OVERFLOW_HIDDEN = 'overflow';
|
|
|
|
export const ALERT_MERGE_CONFLICT = 'merge-conflict';
|
|
|
|
export const ALERT_COLLAPSED_FILES = 'collapsed';
|
|
|
|
|
2020-10-26 08:08:44 -04:00
|
|
|
// Diff File collapse types
|
|
|
|
export const DIFF_FILE_AUTOMATIC_COLLAPSE = 'automatic';
|
|
|
|
export const DIFF_FILE_MANUAL_COLLAPSE = 'manual';
|
|
|
|
|
2020-05-20 05:08:11 -04:00
|
|
|
// State machine states
|
|
|
|
export const STATE_IDLING = 'idle';
|
|
|
|
export const STATE_LOADING = 'loading';
|
|
|
|
export const STATE_ERRORED = 'errored';
|
|
|
|
|
|
|
|
// State machine transitions
|
|
|
|
export const TRANSITION_LOAD_START = 'LOAD_START';
|
|
|
|
export const TRANSITION_LOAD_ERROR = 'LOAD_ERROR';
|
|
|
|
export const TRANSITION_LOAD_SUCCEED = 'LOAD_SUCCEED';
|
|
|
|
export const TRANSITION_ACKNOWLEDGE_ERROR = 'ACKNOWLEDGE_ERROR';
|
|
|
|
|
|
|
|
export const RENAMED_DIFF_TRANSITIONS = {
|
|
|
|
[`${STATE_IDLING}:${TRANSITION_LOAD_START}`]: STATE_LOADING,
|
|
|
|
[`${STATE_LOADING}:${TRANSITION_LOAD_ERROR}`]: STATE_ERRORED,
|
|
|
|
[`${STATE_LOADING}:${TRANSITION_LOAD_SUCCEED}`]: STATE_IDLING,
|
|
|
|
[`${STATE_ERRORED}:${TRANSITION_LOAD_START}`]: STATE_LOADING,
|
|
|
|
[`${STATE_ERRORED}:${TRANSITION_ACKNOWLEDGE_ERROR}`]: STATE_IDLING,
|
|
|
|
};
|
2020-10-30 20:09:08 -04:00
|
|
|
|
|
|
|
// MR Diffs known events
|
|
|
|
export const EVT_EXPAND_ALL_FILES = 'mr:diffs:expandAllFiles';
|
2020-11-10 19:08:58 -05:00
|
|
|
export const EVT_PERF_MARK_FILE_TREE_START = 'mr:diffs:perf:fileTreeStart';
|
|
|
|
export const EVT_PERF_MARK_FILE_TREE_END = 'mr:diffs:perf:fileTreeEnd';
|
|
|
|
export const EVT_PERF_MARK_DIFF_FILES_START = 'mr:diffs:perf:filesStart';
|
|
|
|
export const EVT_PERF_MARK_FIRST_DIFF_FILE_SHOWN = 'mr:diffs:perf:firstFileShown';
|
|
|
|
export const EVT_PERF_MARK_DIFF_FILES_END = 'mr:diffs:perf:filesEnd';
|
2020-12-17 04:10:19 -05:00
|
|
|
|
|
|
|
export const CONFLICT_OUR = 'conflict_our';
|
|
|
|
export const CONFLICT_THEIR = 'conflict_their';
|
|
|
|
export const CONFLICT_MARKER = 'conflict_marker';
|
|
|
|
export const CONFLICT_MARKER_OUR = 'conflict_marker_our';
|
|
|
|
export const CONFLICT_MARKER_THEIR = 'conflict_marker_their';
|
2021-04-28 11:09:35 -04:00
|
|
|
|
|
|
|
// Tracking events
|
2021-08-09 08:10:09 -04:00
|
|
|
export const DEFER_DURATION = 750;
|
2022-05-16 08:07:51 -04:00
|
|
|
export const TRACKING_CAP_KEY = 'code_review_events_dispatched';
|
|
|
|
export const TRACKING_CAP_LENGTH = 86400000; // 24 hours
|
2021-08-09 08:10:09 -04:00
|
|
|
|
2021-04-28 11:09:35 -04:00
|
|
|
export const TRACKING_CLICK_DIFF_VIEW_SETTING = 'i_code_review_click_diff_view_setting';
|
|
|
|
export const TRACKING_DIFF_VIEW_INLINE = 'i_code_review_diff_view_inline';
|
|
|
|
export const TRACKING_DIFF_VIEW_PARALLEL = 'i_code_review_diff_view_parallel';
|
|
|
|
|
|
|
|
export const TRACKING_CLICK_FILE_BROWSER_SETTING = 'i_code_review_click_file_browser_setting';
|
|
|
|
export const TRACKING_FILE_BROWSER_TREE = 'i_code_review_file_browser_tree_view';
|
|
|
|
export const TRACKING_FILE_BROWSER_LIST = 'i_code_review_file_browser_list_view';
|
|
|
|
|
|
|
|
export const TRACKING_CLICK_WHITESPACE_SETTING = 'i_code_review_click_whitespace_setting';
|
|
|
|
export const TRACKING_WHITESPACE_SHOW = 'i_code_review_diff_show_whitespace';
|
|
|
|
export const TRACKING_WHITESPACE_HIDE = 'i_code_review_diff_hide_whitespace';
|
|
|
|
|
|
|
|
export const TRACKING_CLICK_SINGLE_FILE_SETTING = 'i_code_review_click_single_file_mode_setting';
|
|
|
|
export const TRACKING_SINGLE_FILE_MODE = 'i_code_review_diff_single_file';
|
|
|
|
export const TRACKING_MULTIPLE_FILES_MODE = 'i_code_review_diff_multiple_files';
|