From 2ab022494ab68ee41eafa7824130522d5f05717a Mon Sep 17 00:00:00 2001 From: Kris Date: Wed, 24 Jul 2019 10:08:59 -0400 Subject: [PATCH] UX: Add expanded/collapsed class to post-controls (#7932) --- .../javascripts/discourse/widgets/post-menu.js.es6 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/post-menu.js.es6 b/app/assets/javascripts/discourse/widgets/post-menu.js.es6 index 102225e2d06..8739675e2f8 100644 --- a/app/assets/javascripts/discourse/widgets/post-menu.js.es6 +++ b/app/assets/javascripts/discourse/widgets/post-menu.js.es6 @@ -484,7 +484,14 @@ export default createWidget("post-menu", { postControls.push(this.attach("post-admin-menu", attrs)); } - const contents = [h("nav.post-controls.clearfix", postControls)]; + const contents = [ + h( + "nav.post-controls.clearfix" + + (this.state.collapsed ? ".collapsed" : ".expanded"), + postControls + ) + ]; + if (state.likedUsers.length) { const remaining = state.total - state.likedUsers.length; contents.push(