Commit bb747cbb authored by Paul Slaughter's avatar Paul Slaughter

Move IDE left sidebar init width to constant

**Why?**
- Helps encapsulate this magic number
parent 949d8766
......@@ -9,7 +9,7 @@ import CommitForm from './commit_sidebar/form.vue';
import IdeReview from './ide_review.vue';
import SuccessMessage from './commit_sidebar/success_message.vue';
import IdeProjectHeader from './ide_project_header.vue';
import { leftSidebarViews } from '../constants';
import { leftSidebarViews, LEFT_SIDEBAR_INIT_WIDTH } from '../constants';
export default {
components: {
......@@ -33,11 +33,16 @@ export default {
);
},
},
LEFT_SIDEBAR_INIT_WIDTH,
};
</script>
<template>
<resizable-panel :initial-width="340" side="left" class="multi-file-commit-panel flex-column">
<resizable-panel
:initial-width="$options.LEFT_SIDEBAR_INIT_WIDTH"
side="left"
class="multi-file-commit-panel flex-column"
>
<template v-if="loading">
<div class="multi-file-commit-panel-inner">
<div v-for="n in 3" :key="n" class="multi-file-loading-container">
......
<script>
import { mapActions } from 'vuex';
import PanelResizer from '~/vue_shared/components/panel_resizer.vue';
import { DEFAULT_SIDEBAR_MIN_WIDTH } from '../constants';
export default {
components: {
......@@ -14,7 +15,7 @@ export default {
minSize: {
type: Number,
required: false,
default: 340,
default: DEFAULT_SIDEBAR_MIN_WIDTH,
},
side: {
type: String,
......
......@@ -4,6 +4,9 @@ export const MAX_WINDOW_HEIGHT_COMPACT = 750;
export const MAX_TITLE_LENGTH = 50;
export const MAX_BODY_LENGTH = 72;
export const LEFT_SIDEBAR_INIT_WIDTH = 340;
export const DEFAULT_SIDEBAR_MIN_WIDTH = 340;
// File view modes
export const FILE_VIEW_MODE_EDITOR = 'editor';
export const FILE_VIEW_MODE_PREVIEW = 'preview';
......
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