FIX: ensures spinner is showing on tags/show when loading more (#7876)

FIX: ensures spinner is showing on tags/show when loading more (#7876)

Context: Issue while scrolling down after selecting a tag on the home page - bug - Discourse Meta

diff --git a/app/assets/javascripts/discourse/templates/tags/show.hbs b/app/assets/javascripts/discourse/templates/tags/show.hbs
index a44140b..d63e7b7 100644
--- a/app/assets/javascripts/discourse/templates/tags/show.hbs
+++ b/app/assets/javascripts/discourse/templates/tags/show.hbs
@@ -52,32 +52,32 @@
   <div class="row">
     <div class="full-width">
       <div id='list-area'>
-      {{conditional-loading-spinner condition=loading}}
+        {{#unless loading}}
+          {{#if list.topics}}
+            {{#discovery-topics-list model=list refresh=(action "refresh")}}
+            {{bulk-select-button selected=selected action=(action "refresh")}}
 
-      {{#unless loading}}
-        {{#if list.topics}}
-          {{#discovery-topics-list model=list refresh=(action "refresh")}}
-          {{bulk-select-button selected=selected action=(action "refresh")}}
+            {{topic-list topics=list.topics
+                        canBulkSelect=canBulkSelect
+                        toggleBulkSelect=(action "toggleBulkSelect")
+                        bulkSelectEnabled=bulkSelectEnabled
+                        selected=selected
+                        showPosters=true
+                        order=order
+                        ascending=ascending
+                        changeSort=(action "changeSort")}}
 
-          {{topic-list topics=list.topics
-                      canBulkSelect=canBulkSelect
-                      toggleBulkSelect=(action "toggleBulkSelect")
-                      bulkSelectEnabled=bulkSelectEnabled
-                      selected=selected
-                      showPosters=true
-                      order=order
-                      ascending=ascending
-                      changeSort=(action "changeSort")}}
+            {{/discovery-topics-list}}
+          {{else}}
+            <footer class='topic-list-bottom'>
+              <h3>
+                {{footerMessage}}{{#link-to "discovery.categories"}} {{i18n 'topic.browse_all_categories'}}{{/link-to}} {{i18n 'or'}} {{#link-to 'discovery.latest'}}{{i18n 'topic.view_latest_topics'}}{{/link-to}}.
+              </h3>
+            </footer>
+          {{/if}}
+        {{/unless}}
 
-          {{/discovery-topics-list}}
-        {{else}}
-          <footer class='topic-list-bottom'>
-            <h3>
-              {{footerMessage}}{{#link-to "discovery.categories"}} {{i18n 'topic.browse_all_categories'}}{{/link-to}} {{i18n 'or'}} {{#link-to 'discovery.latest'}}{{i18n 'topic.view_latest_topics'}}{{/link-to}}.
-            </h3>
-          </footer>
-        {{/if}}
-      {{/unless}}
+        {{conditional-loading-spinner condition=list.loadingMore}}
       </div>
     </div>
   </div>

GitHub sha: bd35a8f3

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: