Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UX: improve blank page syndrome on the user messages page (#14165)
The user-topic-list template is also in use in other places when we want to improve blank page syndrome, so this PR is a preparation for that changes as well.
- Loading branch information
1 parent
d11f19f
commit 9415fec
Showing
4 changed files
with
98 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 37 additions & 28 deletions
65
app/assets/javascripts/discourse/app/templates/user-topics-list.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,54 @@ | ||
{{#unless site.mobileView}} | ||
{{#if showToggleBulkSelect}} | ||
{{bulk-select-button canDoBulkActions=true selected=selected action=(route-action "refresh")}} | ||
{{/if}} | ||
{{/unless}} | ||
{{#if showEmptyStatePlaceholder}} | ||
<div class="empty-state"> | ||
<span class="empty-state-title">{{emptyState.title}}</span> | ||
<div class="empty-state-body"> | ||
<p>{{emptyState.body}}</p> | ||
</div> | ||
</div> | ||
{{else}} | ||
{{#unless site.mobileView}} | ||
{{#if showToggleBulkSelect}} | ||
{{bulk-select-button canDoBulkActions=true selected=selected action=(route-action "refresh")}} | ||
{{/if}} | ||
{{/unless}} | ||
|
||
{{#load-more class="paginated-topics-list" selector=".paginated-topics-list .topic-list tr" action=(action "loadMore")}} | ||
{{topic-dismiss-buttons | ||
{{#load-more class="paginated-topics-list" selector=".paginated-topics-list .topic-list tr" action=(action "loadMore")}} | ||
{{topic-dismiss-buttons | ||
position="top" | ||
selectedTopics=selected | ||
model=model | ||
showResetNew=showResetNew | ||
showDismissRead=showDismissRead | ||
resetNew=(action "resetNew")}} | ||
|
||
{{#if (gt incomingCount 0)}} | ||
<div class="show-mores"> | ||
<a tabindex="0" href {{action "showInserted"}} class="alert alert-info clickable"> | ||
{{count-i18n key="topic_count_" suffix="latest" count=incomingCount}} | ||
</a> | ||
</div> | ||
{{/if}} | ||
{{#if (gt incomingCount 0)}} | ||
<div class="show-mores"> | ||
<a tabindex="0" href {{action "showInserted"}} class="alert alert-info clickable"> | ||
{{count-i18n key="topic_count_" suffix="latest" count=incomingCount}} | ||
</a> | ||
</div> | ||
{{/if}} | ||
|
||
{{basic-topic-list topicList=model | ||
hideCategory=hideCategory | ||
showPosters=showPosters | ||
bulkSelectEnabled=bulkSelectEnabled | ||
selected=selected | ||
tagsForUser=tagsForUser | ||
onScroll=saveScrollPosition | ||
canBulkSelect=canBulkSelect | ||
scrollOnLoad=true | ||
toggleBulkSelect=(action "toggleBulkSelect") | ||
updateAutoAddTopicsToBulkSelect=(action "updateAutoAddTopicsToBulkSelect")}} | ||
{{basic-topic-list topicList=model | ||
hideCategory=hideCategory | ||
showPosters=showPosters | ||
bulkSelectEnabled=bulkSelectEnabled | ||
selected=selected | ||
tagsForUser=tagsForUser | ||
onScroll=saveScrollPosition | ||
canBulkSelect=canBulkSelect | ||
scrollOnLoad=true | ||
toggleBulkSelect=(action "toggleBulkSelect") | ||
updateAutoAddTopicsToBulkSelect=(action "updateAutoAddTopicsToBulkSelect")}} | ||
|
||
{{topic-dismiss-buttons | ||
{{topic-dismiss-buttons | ||
position="bottom" | ||
selectedTopics=selected | ||
model=model | ||
showResetNew=showResetNew | ||
showDismissRead=showDismissRead | ||
resetNew=(action "resetNew")}} | ||
|
||
{{conditional-loading-spinner condition=model.loadingMore}} | ||
{{/load-more}} | ||
{{conditional-loading-spinner condition=model.loadingMore}} | ||
{{/load-more}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters