diff --git a/app/assets/javascripts/sitewide/comments_sidebar.js b/app/assets/javascripts/sitewide/comments_sidebar.js index 48ab74ab1..3f6b5e3f4 100644 --- a/app/assets/javascripts/sitewide/comments_sidebar.js +++ b/app/assets/javascripts/sitewide/comments_sidebar.js @@ -52,6 +52,7 @@ var CommentsSidebar = (function() { $(document).on('click', `${SIDEBAR} .scroll-page-with-anchor`, function(e) { e.preventDefault(); $($(this).attr('href'))[0].scrollIntoView(); + window.scrollBy(0, -130); }); } diff --git a/app/assets/stylesheets/shared/comments_sidebar.scss b/app/assets/stylesheets/shared/comments_sidebar.scss index 00ac07bce..b7660c9b4 100644 --- a/app/assets/stylesheets/shared/comments_sidebar.scss +++ b/app/assets/stylesheets/shared/comments_sidebar.scss @@ -35,6 +35,7 @@ .comments-subject-title { @include font-h3; + flex-basis: calc(100% - 36px); flex-grow: 1; height: 2em; line-height: 2em; @@ -211,7 +212,9 @@ justify-content: flex-end; .user-avatar { + border-radius: 50%; order: 3; + overflow: hidden; } } } diff --git a/app/javascript/vue/protocol/step.vue b/app/javascript/vue/protocol/step.vue index 766a3990b..e02b383fe 100644 --- a/app/javascript/vue/protocol/step.vue +++ b/app/javascript/vue/protocol/step.vue @@ -82,7 +82,7 @@ class="open-comments-sidebar btn icon-btn btn-light" data-turbolinks="false" data-object-type="Step" - @click="showCommentsSidebar = true" + @click="openCommentsSidebar" :data-object-id="step.id">