REFACTOR: topic-entrance component (#7694)

REFACTOR: topic-entrance component (#7694)

diff --git a/app/assets/javascripts/discourse/components/topic-entrance.js.es6 b/app/assets/javascripts/discourse/components/topic-entrance.js.es6
index fa25a52..e90ccd5 100644
--- a/app/assets/javascripts/discourse/components/topic-entrance.js.es6
+++ b/app/assets/javascripts/discourse/components/topic-entrance.js.es6
@@ -58,7 +58,7 @@ export default Ember.Component.extend(CleansUp, {
 
   _setCSS() {
     const pos = this._position;
-    const $self = this.$();
+    const $self = $(this.element);
     const width = $self.width();
     const height = $self.height();
     pos.left = parseInt(pos.left) - width / 2;
@@ -74,8 +74,7 @@ export default Ember.Component.extend(CleansUp, {
   _show(data) {
     this._position = data.position;
 
-    this.set("topic", data.topic);
-    this.set("visible", true);
+    this.setProperties({ topic: data.topic, visible: true });
 
     Ember.run.scheduleOnce("afterRender", this, this._setCSS);
 
@@ -85,7 +84,7 @@ export default Ember.Component.extend(CleansUp, {
         const $target = $(e.target);
         if (
           $target.prop("id") === "topic-entrance" ||
-          this.$().has($target).length !== 0
+          $(this.element).has($target).length !== 0
         ) {
           return;
         }
@@ -94,8 +93,7 @@ export default Ember.Component.extend(CleansUp, {
   },
 
   cleanUp() {
-    this.set("topic", null);
-    this.set("visible", false);
+    this.setProperties({ topic: null, visible: false });
     $("html").off("mousedown.topic-entrance");
   },

GitHub sha: f03a547a