From 633d2fde4594d5b3f73375f4f713f622147bd724 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 7 Sep 2017 16:56:16 +0200 Subject: [PATCH] removes select-box minWidth property Using css offers more flexibility --- app/assets/javascripts/discourse/components/select-box.js.es6 | 3 --- .../discourse/components/topic-notifications.js.es6 | 2 -- app/assets/stylesheets/common/components/select-box.scss | 1 + 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/components/select-box.js.es6 b/app/assets/javascripts/discourse/components/select-box.js.es6 index 9a498151547..93a82235121 100644 --- a/app/assets/javascripts/discourse/components/select-box.js.es6 +++ b/app/assets/javascripts/discourse/components/select-box.js.es6 @@ -41,7 +41,6 @@ export default Ember.Component.extend({ selectBoxHeaderComponent: "select-box/select-box-header", selectBoxCollectionComponent: "select-box/select-box-collection", - minWidth: 220, collectionHeight: 200, verticalOffset: 0, horizontalOffset: 0, @@ -167,8 +166,6 @@ export default Ember.Component.extend({ this._removeFixedPosition(); } - this.$().css("min-width", this.get("minWidth")); - const computedWidth = this.$().outerWidth(false); const computedHeight = this.$().outerHeight(false); diff --git a/app/assets/javascripts/discourse/components/topic-notifications.js.es6 b/app/assets/javascripts/discourse/components/topic-notifications.js.es6 index 3d19b3e7c76..70e2a481332 100644 --- a/app/assets/javascripts/discourse/components/topic-notifications.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-notifications.js.es6 @@ -16,8 +16,6 @@ export default DropdownSelectBoxComponent.extend({ showFullTitle: true, fullWidthOnMobile: true, - minWidth: "auto", - @on("init") _setInitialNotificationLevel() { this.set("value", this.get("topic.details.notification_level")); diff --git a/app/assets/stylesheets/common/components/select-box.scss b/app/assets/stylesheets/common/components/select-box.scss index ddf4286f6ca..745d7b2feea 100644 --- a/app/assets/stylesheets/common/components/select-box.scss +++ b/app/assets/stylesheets/common/components/select-box.scss @@ -9,6 +9,7 @@ flex-direction: column; position: relative; height: 34px; + min-width: 220px; &.small { height: 28px;