From 69dc0d20706ed41e5ecdbb77515066d8a7d7703b Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 19 Jun 2020 22:12:03 +0200
Subject: viewer: code update (no functional change)

Types { [x: T]: R } updated to Record<T, R>
Methods in template updated to getters (computed in VueJS), which are reactive and cached
Code formatting
---
 viewer/src/views/PanelLeft.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index e3821a8..1d49648 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -34,7 +34,7 @@
         :show-category="$galleryStore.tagsCategories.length > 1"
         :search-filters.sync="searchFilters"
         :tags-index="category.index"
-        :current-tags="currentTags()"
+        :current-tags="currentTags"
       />
     </div>
   </div>
@@ -72,7 +72,7 @@ export default class PanelLeft extends Vue {
     return query;
   }
 
-  currentTags() {
+  get currentTags() {
     return this.$galleryStore.currentItem?.tags ?? [];
   }
 
-- 
cgit v1.2.3


From 170d7a61f720ece9dc4b347b19f5a8213f1d8984 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Sat, 20 Jun 2020 16:50:49 +0200
Subject: viewer: prettier formatting based on eslint-prettier plugin

---
 viewer/src/views/PanelLeft.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 1d49648..9dc76a0 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -25,10 +25,10 @@
       @onkeyenter-empty="search"
     />
     <ld-command-search @clear="clear" @search="search" />
-    <h1 class="title">{{$t('panelLeft.propositions')}}</h1>
+    <h1 class="title">{{ $t("panelLeft.propositions") }}</h1>
     <div class="scrollbar no-scroll-x">
       <ld-proposition
-        v-for="(category) in $galleryStore.tagsCategories"
+        v-for="category in $galleryStore.tagsCategories"
         :key="category.tag"
         :category="$galleryStore.tagsIndex[category.tag]"
         :show-category="$galleryStore.tagsCategories.length > 1"
-- 
cgit v1.2.3


From 7e0e108d1d5d9a86a33322432c3d7e8218961121 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Mon, 11 May 2020 22:42:20 +0200
Subject: viewer: item information (raw implementation)

---
 viewer/src/views/PanelLeft.vue | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 9dc76a0..6341beb 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -26,7 +26,7 @@
     />
     <ld-command-search @clear="clear" @search="search" />
     <h1 class="title">{{ $t("panelLeft.propositions") }}</h1>
-    <div class="scrollbar no-scroll-x">
+    <div class="scrollbar no-scroll-x flex-grow-1">
       <ld-proposition
         v-for="category in $galleryStore.tagsCategories"
         :key="category.tag"
@@ -37,6 +37,13 @@
         :current-tags="currentTags"
       />
     </div>
+    <b-collapse animation="slide" :open.sync="infoOpen">
+      <h1 slot="trigger" class="title flex">
+        Informations
+        <fa-icon :icon="infoOpen ? 'caret-up' : 'caret-down'" />
+      </h1>
+      <ld-information :item="$galleryStore.currentItem" />
+    </b-collapse>
   </div>
 </template>
 
@@ -49,6 +56,7 @@ import IndexFactory from "@/services/indexfactory";
 @Component
 export default class PanelLeft extends Vue {
   searchFilters: Tag.Search[] = [];
+  infoOpen: boolean = true;
 
   mounted() {
     this.restoreSearchFilters(this.$route);
@@ -93,6 +101,11 @@ export default class PanelLeft extends Vue {
     padding: 0.2em 0.5em;
     margin: 0 0 1px 0;
     font-variant: small-caps;
+    justify-content: space-between;
+    user-select: none;
+    > svg {
+      color: $link;
+  }
   }
 }
 </style>
-- 
cgit v1.2.3


From 4c839e0f30fad9e5df29f1f0682380581c582713 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Thu, 20 Aug 2020 00:14:27 +0200
Subject: viewer: information panel with markdown

github: resolves #214
github: resolves #37
---
 viewer/src/views/PanelLeft.vue | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 6341beb..f8d6faf 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -38,9 +38,9 @@
       />
     </div>
     <b-collapse animation="slide" :open.sync="infoOpen">
-      <h1 slot="trigger" class="title flex">
-        Informations
-        <fa-icon :icon="infoOpen ? 'caret-up' : 'caret-down'" />
+      <h1 slot="trigger" class="flex title">
+        {{ $t("panelLeft.information.title") }}
+        <fa-icon :icon="infoOpen ? 'caret-down' : 'caret-up'" />
       </h1>
       <ld-information :item="$galleryStore.currentItem" />
     </b-collapse>
@@ -105,7 +105,8 @@ export default class PanelLeft extends Vue {
     user-select: none;
     > svg {
       color: $link;
-  }
+      margin-top: 2px; // Fixes a vertical centering issue with the carret
+    }
   }
 }
 </style>
-- 
cgit v1.2.3


From 6737bfd38a0568d61c691a507303a65550ae23fc Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Thu, 10 Sep 2020 18:44:05 +0200
Subject: viewer: information panel scrollbar and collapse with animation

github: resolves #78
---
 viewer/src/views/PanelLeft.vue | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index f8d6faf..12c95d1 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -18,7 +18,7 @@
 -->
 
 <template>
-  <div class="flex-column sidebar">
+  <div class="flex-column" :class="$style.sidebar">
     <ld-tag-input
       :search-filters.sync="searchFilters"
       :tags-index="$galleryStore.tagsIndex"
@@ -26,7 +26,7 @@
     />
     <ld-command-search @clear="clear" @search="search" />
     <h1 class="title">{{ $t("panelLeft.propositions") }}</h1>
-    <div class="scrollbar no-scroll-x flex-grow-1">
+    <div class="scrollbar no-scroll-x flex-grow-1" :class="$style.flexShrink1000">
       <ld-proposition
         v-for="category in $galleryStore.tagsCategories"
         :key="category.tag"
@@ -37,13 +37,13 @@
         :current-tags="currentTags"
       />
     </div>
-    <b-collapse animation="slide" :open.sync="infoOpen">
-      <h1 slot="trigger" class="flex title">
-        {{ $t("panelLeft.information.title") }}
-        <fa-icon :icon="infoOpen ? 'caret-down' : 'caret-up'" />
-      </h1>
-      <ld-information :item="$galleryStore.currentItem" />
-    </b-collapse>
+    <h1 class="flex title" @click="infoOpen = !infoOpen">
+      {{ $t("panelLeft.information.title") }}
+      <fa-icon :icon="infoOpen ? 'caret-down' : 'caret-up'" />
+    </h1>
+    <transition name="flex-expand">
+      <ld-information v-show="infoOpen" :item="$galleryStore.currentItem" class="scrollbar no-scroll-x" />
+    </transition>
   </div>
 </template>
 
@@ -92,11 +92,11 @@ export default class PanelLeft extends Vue {
 }
 </script>
 
-<style lang="scss">
+<style lang="scss" module>
 @import "~@/assets/scss/theme.scss";
 
 .sidebar {
-  .title {
+  :global(.title) {
     background-color: $proposed-category-bgcolor;
     padding: 0.2em 0.5em;
     margin: 0 0 1px 0;
@@ -109,4 +109,8 @@ export default class PanelLeft extends Vue {
     }
   }
 }
+
+.flexShrink1000 {
+  flex-shrink: 1000;
+}
 </style>
-- 
cgit v1.2.3


From f89ed0bd94ea570d9e6533301783d13b13033db0 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 11 Sep 2020 20:10:56 +0200
Subject: viewer: PR #238 code review changes

---
 viewer/src/views/PanelLeft.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'viewer/src/views/PanelLeft.vue')

diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 12c95d1..0ab3aa8 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -26,7 +26,7 @@
     />
     <ld-command-search @clear="clear" @search="search" />
     <h1 class="title">{{ $t("panelLeft.propositions") }}</h1>
-    <div class="scrollbar no-scroll-x flex-grow-1" :class="$style.flexShrink1000">
+    <div class="scrollbar no-scroll-x flex-grow-1" :class="$style.flexShrinkFully">
       <ld-proposition
         v-for="category in $galleryStore.tagsCategories"
         :key="category.tag"
@@ -110,7 +110,7 @@ export default class PanelLeft extends Vue {
   }
 }
 
-.flexShrink1000 {
+.flexShrinkFully {
   flex-shrink: 1000;
 }
 </style>
-- 
cgit v1.2.3

