From 7e8766cee8984a26b0f7f0a2bb32e53a3987ad54 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 22 Aug 2017 14:19:55 -0400 Subject: [PATCH] UX: Move buttons into the nav section of the topic map --- .../discourse/widgets/topic-map.js.es6 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/discourse/widgets/topic-map.js.es6 b/app/assets/javascripts/discourse/widgets/topic-map.js.es6 index 6e77bd18e4c..ccba2891a28 100644 --- a/app/assets/javascripts/discourse/widgets/topic-map.js.es6 +++ b/app/assets/javascripts/discourse/widgets/topic-map.js.es6 @@ -109,7 +109,14 @@ createWidget('topic-map-summary', { contents.push(h('li.avatars', participants)); } - return h('ul.clearfix', contents); + const nav = h('nav.buttons', this.attach('button', { + title: 'topic.toggle_information', + icon: state.collapsed ? 'chevron-down' : 'chevron-up', + action: 'toggleMap', + className: 'btn', + })); + + return [nav, h('ul.clearfix', contents)]; } }); @@ -209,14 +216,7 @@ export default createWidget('topic-map', { }, html(attrs, state) { - const nav = h('nav.buttons', this.attach('button', { - title: 'topic.toggle_information', - icon: state.collapsed ? 'chevron-down' : 'chevron-up', - action: 'toggleMap', - className: 'btn', - })); - - const contents = [nav, this.attach('topic-map-summary', attrs, { state })]; + const contents = [this.attach('topic-map-summary', attrs, { state })]; if (!state.collapsed) { contents.push(this.attach('topic-map-expanded', attrs));