Commit 1c21dfd3 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '204821-step-1-clean-up-collapsible-panel-things' into 'master'

Step 1 - Clean up some collapsible_panel things

See merge request gitlab-org/gitlab!32464
parents a15ec186 bb747cbb
...@@ -23,6 +23,8 @@ export default { ...@@ -23,6 +23,8 @@ export default {
this.updateActivityBarView(view); this.updateActivityBarView(view);
// TODO: We must use JQuery here to interact with the Bootstrap tooltip API
// https://gitlab.com/gitlab-org/gitlab/-/issues/217577
$(e.currentTarget).tooltip('hide'); $(e.currentTarget).tooltip('hide');
}, },
}, },
......
...@@ -9,7 +9,7 @@ import CommitForm from './commit_sidebar/form.vue'; ...@@ -9,7 +9,7 @@ import CommitForm from './commit_sidebar/form.vue';
import IdeReview from './ide_review.vue'; import IdeReview from './ide_review.vue';
import SuccessMessage from './commit_sidebar/success_message.vue'; import SuccessMessage from './commit_sidebar/success_message.vue';
import IdeProjectHeader from './ide_project_header.vue'; import IdeProjectHeader from './ide_project_header.vue';
import { leftSidebarViews } from '../constants'; import { leftSidebarViews, LEFT_SIDEBAR_INIT_WIDTH } from '../constants';
export default { export default {
components: { components: {
...@@ -33,11 +33,16 @@ export default { ...@@ -33,11 +33,16 @@ export default {
); );
}, },
}, },
LEFT_SIDEBAR_INIT_WIDTH,
}; };
</script> </script>
<template> <template>
<resizable-panel :initial-width="340" side="left" class="flex-column"> <resizable-panel
:initial-width="$options.LEFT_SIDEBAR_INIT_WIDTH"
side="left"
class="multi-file-commit-panel flex-column"
>
<template v-if="loading"> <template v-if="loading">
<div class="multi-file-commit-panel-inner"> <div class="multi-file-commit-panel-inner">
<div v-for="n in 3" :key="n" class="multi-file-loading-container"> <div v-for="n in 3" :key="n" class="multi-file-loading-container">
......
<script> <script>
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import PanelResizer from '~/vue_shared/components/panel_resizer.vue'; import PanelResizer from '~/vue_shared/components/panel_resizer.vue';
import { DEFAULT_SIDEBAR_MIN_WIDTH } from '../constants';
export default { export default {
components: { components: {
...@@ -14,7 +15,7 @@ export default { ...@@ -14,7 +15,7 @@ export default {
minSize: { minSize: {
type: Number, type: Number,
required: false, required: false,
default: 340, default: DEFAULT_SIDEBAR_MIN_WIDTH,
}, },
side: { side: {
type: String, type: String,
...@@ -45,7 +46,7 @@ export default { ...@@ -45,7 +46,7 @@ export default {
</script> </script>
<template> <template>
<div :style="panelStyle" class="multi-file-commit-panel"> <div :style="panelStyle">
<slot></slot> <slot></slot>
<panel-resizer <panel-resizer
:size.sync="width" :size.sync="width"
......
...@@ -4,6 +4,9 @@ export const MAX_WINDOW_HEIGHT_COMPACT = 750; ...@@ -4,6 +4,9 @@ export const MAX_WINDOW_HEIGHT_COMPACT = 750;
export const MAX_TITLE_LENGTH = 50; export const MAX_TITLE_LENGTH = 50;
export const MAX_BODY_LENGTH = 72; export const MAX_BODY_LENGTH = 72;
export const LEFT_SIDEBAR_INIT_WIDTH = 340;
export const DEFAULT_SIDEBAR_MIN_WIDTH = 340;
// File view modes // File view modes
export const FILE_VIEW_MODE_EDITOR = 'editor'; export const FILE_VIEW_MODE_EDITOR = 'editor';
export const FILE_VIEW_MODE_PREVIEW = 'preview'; export const FILE_VIEW_MODE_PREVIEW = 'preview';
......
...@@ -65,6 +65,7 @@ $ide-commit-header-height: 48px; ...@@ -65,6 +65,7 @@ $ide-commit-header-height: 48px;
flex-direction: column; flex-direction: column;
flex: 1; flex: 1;
border-left: 1px solid var(--ide-border-color, $white-dark); border-left: 1px solid var(--ide-border-color, $white-dark);
border-right: 1px solid var(--ide-border-color, $white-dark);
overflow: hidden; overflow: hidden;
} }
...@@ -584,6 +585,8 @@ $ide-commit-header-height: 48px; ...@@ -584,6 +585,8 @@ $ide-commit-header-height: 48px;
background: var(--ide-highlight-background, $white); background: var(--ide-highlight-background, $white);
} }
}
&.is-right { &.is-right {
padding-right: $gl-padding; padding-right: $gl-padding;
padding-left: $gl-padding + 1px; padding-left: $gl-padding + 1px;
...@@ -593,7 +596,6 @@ $ide-commit-header-height: 48px; ...@@ -593,7 +596,6 @@ $ide-commit-header-height: 48px;
left: -1px; left: -1px;
} }
} }
}
} }
.ide-activity-bar { .ide-activity-bar {
...@@ -877,15 +879,11 @@ $ide-commit-header-height: 48px; ...@@ -877,15 +879,11 @@ $ide-commit-header-height: 48px;
} }
.ide-right-sidebar { .ide-right-sidebar {
.ide-activity-bar {
border-left: 1px solid var(--ide-border-color, $white-dark);
}
.multi-file-commit-panel-inner { .multi-file-commit-panel-inner {
width: 350px; width: 350px;
padding: $grid-size 0; padding: $grid-size 0;
background-color: var(--ide-highlight-background, $white); background-color: var(--ide-highlight-background, $white);
border-left: 1px solid var(--ide-border-color, $white-dark); border-right: 1px solid var(--ide-border-color, $white-dark);
} }
.ide-right-sidebar-jobs-detail { .ide-right-sidebar-jobs-detail {
......
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