Commit 7714d61e authored by Phil Hughes's avatar Phil Hughes

Merge branch '254197-merge-request-diff-has-an-extra-spacing-on-mobile' into 'master'

Eliminate extra spacing on MR diffs from mobile/tablet screen

Closes #254197

See merge request gitlab-org/gitlab!42821
parents b27f1d9a 442ecfe3
...@@ -474,7 +474,7 @@ export default { ...@@ -474,7 +474,7 @@ export default {
<div <div
v-if="showTreeList" v-if="showTreeList"
:style="{ width: `${treeWidth}px` }" :style="{ width: `${treeWidth}px` }"
class="diff-tree-list js-diff-tree-list mr-3" class="diff-tree-list js-diff-tree-list px-3 pr-md-0"
> >
<panel-resizer <panel-resizer
:size.sync="treeWidth" :size.sync="treeWidth"
...@@ -487,7 +487,7 @@ export default { ...@@ -487,7 +487,7 @@ export default {
<tree-list :hide-file-stats="hideFileStats" /> <tree-list :hide-file-stats="hideFileStats" />
</div> </div>
<div <div
class="diff-files-holder" class="col-12 col-md-auto diff-files-holder"
:class="{ :class="{
[CENTERED_LIMITED_CONTAINER_CLASSES]: isLimitedContainer, [CENTERED_LIMITED_CONTAINER_CLASSES]: isLimitedContainer,
}" }"
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
</script> </script>
<template> <template>
<div v-if="!isDismissed" data-testid="root" :class="containerClasses"> <div v-if="!isDismissed" data-testid="root" :class="containerClasses" class="col-12">
<gl-alert <gl-alert
:dismissible="true" :dismissible="true"
:title="__('Some changes are not shown')" :title="__('Some changes are not shown')"
......
...@@ -770,8 +770,6 @@ $mr-widget-min-height: 69px; ...@@ -770,8 +770,6 @@ $mr-widget-min-height: 69px;
position: -webkit-sticky; position: -webkit-sticky;
position: sticky; position: sticky;
top: $header-height + $mr-tabs-height; top: $header-height + $mr-tabs-height;
margin-left: -16px;
width: calc(100% + 32px);
.mr-version-menus-container { .mr-version-menus-container {
flex-wrap: nowrap; flex-wrap: nowrap;
...@@ -868,6 +866,13 @@ $mr-widget-min-height: 69px; ...@@ -868,6 +866,13 @@ $mr-widget-min-height: 69px;
} }
} }
.container-fluid {
// Negative margins for mobile/tablet screen
.diffs.tab-pane {
margin: 0 (-$gl-padding);
}
}
// Wrap MR tabs/buttons so you don't have to scroll on desktop // Wrap MR tabs/buttons so you don't have to scroll on desktop
@include media-breakpoint-down(md) { @include media-breakpoint-down(md) {
.merge-request-tabs-container, .merge-request-tabs-container,
......
---
title: Eliminate extra spacing on MR diffs from mobile/tablet screen
merge_request: 42821
author: Takuya Noguchi
type: fixed
...@@ -50,7 +50,7 @@ describe('CollapsedFilesWarning', () => { ...@@ -50,7 +50,7 @@ describe('CollapsedFilesWarning', () => {
({ limited, containerClasses }) => { ({ limited, containerClasses }) => {
createComponent({ limited }); createComponent({ limited });
expect(wrapper.classes()).toEqual(containerClasses); expect(wrapper.classes()).toEqual(['col-12'].concat(containerClasses));
}, },
); );
......
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