FEATURE: Add loading spinner on categories page (#25171)

The list of categories is loaded async when lazy_load_categories is
enabled, but there is no visual indication that the list of categories
is being loaded.
This commit is contained in:
Bianca Nenciu 2024-01-08 20:28:57 +02:00 committed by GitHub
parent 007a5fd99e
commit c62d1197b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import CategoriesBoxes from "discourse/components/categories-boxes";
import CategoriesBoxesWithTopics from "discourse/components/categories-boxes-with-topics";
import CategoriesOnly from "discourse/components/categories-only";
import CategoriesWithFeaturedTopics from "discourse/components/categories-with-featured-topics";
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
import LoadMore from "discourse/components/load-more";
import PluginOutlet from "discourse/components/plugin-outlet";
import SubcategoriesWithFeaturedTopics from "discourse/components/subcategories-with-featured-topics";
@ -94,6 +95,7 @@ export default class CategoriesDisplay extends Component {
@categories={{@categories}}
@topics={{@topics}}
/>
<ConditionalLoadingSpinner @condition={{@loadingMore}} />
</LoadMore>
{{else}}
<this.categoriesComponent

View File

@ -35,6 +35,7 @@
@topics={{this.model.topics}}
@parentCategory={{this.model.parentCategory}}
@loadMore={{this.model.loadMore}}
@loadingMore={{this.model.isLoading}}
/>
</div>