From 771739fee3f20dee9a6b5ef18f06a7b63396d29b Mon Sep 17 00:00:00 2001
From: Alice <alice.poggioli@hotmail.fr>
Date: Fri, 20 Sep 2019 12:23:34 +0200
Subject: [PATCH] Feature: On mentor dashbourd, the accordions have a smooth
 animation.

---
 src/scripts/coopstarter.js | 8 ++++----
 src/styles/index.scss      | 7 +++++++
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js
index b5e0a621..5f82631e 100644
--- a/src/scripts/coopstarter.js
+++ b/src/scripts/coopstarter.js
@@ -186,11 +186,11 @@ jQuery(document).ready(function($) {
 
         /* Toggle between hiding and showing the active panel */
         var panelRequest = this.nextElementSibling;
-        if (panelRequest.style.display === "block") {
-          panelRequest.style.display = "none";
+        if (panelRequest.style.maxHeight) {
+          panelRequest.style.maxHeight = null;
         } else {
-          panelRequest.style.display = "block";
-        }
+          panelRequest.style.maxHeight = panelRequest.scrollHeight + "px";
+        } 
       });
     }
   }, 4000);
diff --git a/src/styles/index.scss b/src/styles/index.scss
index 68d777e0..bef5c664 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -1232,6 +1232,13 @@ cs-validate-action div{
         text-align: right;
     }
 
+#requests sib-set-default[name="content"] {
+    padding: 0 18px;
+    max-height: 0;
+    overflow: hidden;
+    transition: max-height 0.2s ease-out;
+    }
+
 /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXX PROFILE XXXXXXXXXXXXXXXXXXXXX
-- 
GitLab