UX: hide invitees on standalone events

UX: hide invitees on standalone events

diff --git a/app/serializers/discourse_post_event/event_serializer.rb b/app/serializers/discourse_post_event/event_serializer.rb
index e9e69f2..624e245 100644
--- a/app/serializers/discourse_post_event/event_serializer.rb
+++ b/app/serializers/discourse_post_event/event_serializer.rb
@@ -16,6 +16,7 @@ module DiscoursePostEvent
     attributes :can_act_on_event
     attributes :can_update_attendance
     attributes :is_expired
+    attributes :should_display_invitees
 
     def can_act_on_event
       scope.can_act_on_event?(object)
@@ -91,5 +92,9 @@ module DiscoursePostEvent
       invitees = object.most_likely_going(scope.current_user)
       ActiveModel::ArraySerializer.new(invitees, each_serializer: InviteeSerializer)
     end
+
+    def should_display_invitees
+      object.status != Event.statuses[:standalone]
+    end
   end
 end
diff --git a/assets/javascripts/discourse/widgets/discourse-post-event.js.es6 b/assets/javascripts/discourse/widgets/discourse-post-event.js.es6
index ef915a0..f6fbe05 100644
--- a/assets/javascripts/discourse/widgets/discourse-post-event.js.es6
+++ b/assets/javascripts/discourse/widgets/discourse-post-event.js.es6
@@ -185,11 +185,13 @@ export default createWidget("discourse-post-event", {
         )
       }}
 
-      <hr />
+      {{#if state.eventModel.should_display_invitees}}
+        <hr />
 
-      {{attach widget="discourse-post-event-invitees"
-        attrs=(hash eventModel=state.eventModel)
-      }}
+        {{attach widget="discourse-post-event-invitees"
+          attrs=(hash eventModel=state.eventModel)
+        }}
+      {{/if}}
 
       <footer class="event-footer">
         {{#unless state.eventModel.is_expired}}
diff --git a/assets/javascripts/initializers/discourse-post-event-decorator.js.es6 b/assets/javascripts/initializers/discourse-post-event-decorator.js.es6
index c3624cb..203f9c1 100644
--- a/assets/javascripts/initializers/discourse-post-event-decorator.js.es6
+++ b/assets/javascripts/initializers/discourse-post-event-decorator.js.es6
@@ -21,7 +21,11 @@ function _attachWidget(api, cooked, eventModel) {
   const wrap = cooked.querySelector("[data-wrap=event]");
 
   if (eventModel && wrap) {
-    let widgetHeight = 300;
+    let widgetHeight = 175;
+
+    if (eventModel.should_display_invitees) {
+      widgetHeight += 125;
+    }
 
     if (eventModel.can_update_attendance) {
       widgetHeight += 65;

GitHub sha: 2fd93fb3