Commit da9c55c6 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents a5e3ddd6 df549eb2
...@@ -211,11 +211,12 @@ export const scrollToLineIfNeededParallel = (_, line) => { ...@@ -211,11 +211,12 @@ export const scrollToLineIfNeededParallel = (_, line) => {
} }
}; };
export const loadCollapsedDiff = ({ commit, getters }, file) => export const loadCollapsedDiff = ({ commit, getters, state }, file) =>
axios axios
.get(file.load_collapsed_diff_url, { .get(file.load_collapsed_diff_url, {
params: { params: {
commit_id: getters.commitId, commit_id: getters.commitId,
w: state.showWhitespace ? '0' : '1',
}, },
}) })
.then(res => { .then(res => {
......
...@@ -381,6 +381,7 @@ $breadcrumb-min-height: 48px; ...@@ -381,6 +381,7 @@ $breadcrumb-min-height: 48px;
$home-panel-title-row-height: 64px; $home-panel-title-row-height: 64px;
$home-panel-avatar-mobile-size: 24px; $home-panel-avatar-mobile-size: 24px;
$gl-line-height: 16px; $gl-line-height: 16px;
$gl-line-height-20: 20px;
$gl-line-height-24: 24px; $gl-line-height-24: 24px;
$gl-line-height-14: 14px; $gl-line-height-14: 14px;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
border-bottom: 1px solid $white-normal; border-bottom: 1px solid $white-normal;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
position: relative; position: relative;
line-height: $gl-line-height; line-height: $gl-line-height-20;
.system-note-image { .system-note-image {
position: absolute; position: absolute;
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
} }
.event-user-info { .event-user-info {
margin-bottom: $gl-padding-8; margin-bottom: $gl-padding-4;
.author_name { .author_name {
a { a {
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
} }
.event-body { .event-body {
margin-top: $gl-padding-8; margin-top: $gl-padding-4;
margin-right: 174px; margin-right: 174px;
color: $gl-text-color; color: $gl-text-color;
......
---
title: Fix whitespace changes visibility when the related file was initially collapsed
merge_request: 28950
author: Ondřej Budai
type: fixed
---
title: Enhance line-height of Activity feed UI
merge_request: 28856
author: Jacopo Beschi @jacopo-beschi
type: changed
...@@ -396,6 +396,7 @@ describe('DiffsStoreActions', () => { ...@@ -396,6 +396,7 @@ describe('DiffsStoreActions', () => {
}); });
describe('loadCollapsedDiff', () => { describe('loadCollapsedDiff', () => {
const state = { showWhitespace: true };
it('should fetch data and call mutation with response and the give parameter', done => { it('should fetch data and call mutation with response and the give parameter', done => {
const file = { hash: 123, load_collapsed_diff_url: '/load/collapsed/diff/url' }; const file = { hash: 123, load_collapsed_diff_url: '/load/collapsed/diff/url' };
const data = { hash: 123, parallelDiffLines: [{ lineCode: 1 }] }; const data = { hash: 123, parallelDiffLines: [{ lineCode: 1 }] };
...@@ -403,7 +404,7 @@ describe('DiffsStoreActions', () => { ...@@ -403,7 +404,7 @@ describe('DiffsStoreActions', () => {
const commit = jasmine.createSpy('commit'); const commit = jasmine.createSpy('commit');
mock.onGet(file.loadCollapsedDiffUrl).reply(200, data); mock.onGet(file.loadCollapsedDiffUrl).reply(200, data);
loadCollapsedDiff({ commit, getters: { commitId: null } }, file) loadCollapsedDiff({ commit, getters: { commitId: null }, state }, file)
.then(() => { .then(() => {
expect(commit).toHaveBeenCalledWith(types.ADD_COLLAPSED_DIFFS, { file, data }); expect(commit).toHaveBeenCalledWith(types.ADD_COLLAPSED_DIFFS, { file, data });
...@@ -421,10 +422,10 @@ describe('DiffsStoreActions', () => { ...@@ -421,10 +422,10 @@ describe('DiffsStoreActions', () => {
spyOn(axios, 'get').and.returnValue(Promise.resolve({ data: {} })); spyOn(axios, 'get').and.returnValue(Promise.resolve({ data: {} }));
loadCollapsedDiff({ commit() {}, getters }, file); loadCollapsedDiff({ commit() {}, getters, state }, file);
expect(axios.get).toHaveBeenCalledWith(file.load_collapsed_diff_url, { expect(axios.get).toHaveBeenCalledWith(file.load_collapsed_diff_url, {
params: { commit_id: null }, params: { commit_id: null, w: '0' },
}); });
}); });
...@@ -436,10 +437,10 @@ describe('DiffsStoreActions', () => { ...@@ -436,10 +437,10 @@ describe('DiffsStoreActions', () => {
spyOn(axios, 'get').and.returnValue(Promise.resolve({ data: {} })); spyOn(axios, 'get').and.returnValue(Promise.resolve({ data: {} }));
loadCollapsedDiff({ commit() {}, getters }, file); loadCollapsedDiff({ commit() {}, getters, state }, file);
expect(axios.get).toHaveBeenCalledWith(file.load_collapsed_diff_url, { expect(axios.get).toHaveBeenCalledWith(file.load_collapsed_diff_url, {
params: { commit_id: '123' }, params: { commit_id: '123', w: '0' },
}); });
}); });
}); });
......
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