Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-14 03:11:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-14 03:11:05 +0300
commit980faa8f3421499e36ad0d9834a6353c0aeb3d3e (patch)
treee89d93e611acb30a553a5c7a9e453c00d7b28504 /app/assets/javascripts/pipeline_editor
parent52b32eecb72bceac7e1b7f57a641d25b9a7f58bc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipeline_editor')
-rw-r--r--app/assets/javascripts/pipeline_editor/components/drawer/pipeline_editor_drawer.vue14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/assets/javascripts/pipeline_editor/components/drawer/pipeline_editor_drawer.vue b/app/assets/javascripts/pipeline_editor/components/drawer/pipeline_editor_drawer.vue
index 09078573a20..ff1e0b6388f 100644
--- a/app/assets/javascripts/pipeline_editor/components/drawer/pipeline_editor_drawer.vue
+++ b/app/assets/javascripts/pipeline_editor/components/drawer/pipeline_editor_drawer.vue
@@ -28,7 +28,7 @@ export default {
},
data() {
return {
- isExpanded: true,
+ isExpanded: false,
topPosition: 0,
};
},
@@ -49,8 +49,18 @@ export default {
},
mounted() {
this.setTopPosition();
+ this.setInitialExpandState();
},
methods: {
+ setInitialExpandState() {
+ // We check in the local storage and if no value is defined, we want the default
+ // to be true. We want to explicitly set it to true here so that the drawer
+ // animates to open on load.
+ const localValue = localStorage.getItem(this.$options.localDrawerKey);
+ if (localValue === null) {
+ this.isExpanded = true;
+ }
+ },
setTopPosition() {
const navbarEl = document.querySelector('.js-navbar');
@@ -68,7 +78,7 @@ export default {
<local-storage-sync v-model="isExpanded" :storage-key="$options.localDrawerKey" as-json>
<aside
aria-live="polite"
- class="gl-fixed gl-right-0 gl-bg-gray-10 gl-shadow-drawer gl-transition-medium gl-border-l-solid gl-border-1 gl-border-gray-100 gl-h-full gl-z-index-3 gl-overflow-y-auto"
+ class="gl-fixed gl-right-0 gl-bg-gray-10 gl-shadow-drawer gl-transition-property-width gl-transition-duration-medium gl-border-l-solid gl-border-1 gl-border-gray-100 gl-h-full gl-z-index-3 gl-overflow-y-auto"
:style="rootStyle"
>
<gl-button