Whats the fastest way to change how filteredTopics (Line 26) is comprised. I would like to have full control of which topics (with what properties) are collected.
I have been using the GitHub - discourse/discourse-topic-thumbnails: Display thumbnails in topic lists theme component on our hosted environment and we wanted to make additional changes to it to cater to our needs.
Instead of having all topics mixed up into one large chunk of grid items, we’d like to bring in some order.
We are aiming for the following:
Initially, we want to sort by seen/unseen, 2nd we want to sort by category; then after that we’d like to group them by chronology (and create buckets e.g. Today (all relevant posts from today), Yesterday, Last week.
So our topics list should look like this with 3 distinct grids below each other:
<TODAY, YESTERDAY, LAST WEEK> represents a grouping
Topic 20, Topic 30, Topic 40
<TODAY : [ART: Topic 1, Topic 2], [DESIGN: Topic 4]> <YESTERDAY: [CONCEPT: Topic 3], [OTHER_CATEGORY: Topic 6, Topic 11]> <LAST WEEK: Topic 8, Topic 10>
<TODAY : [ART: Topic 4, Topic 12], [DESIGN: Topic 4]> <YESTERDAY: [CGI: Topic 13], [OTHER_CATEGORY: Topic 16, Topic 21]>, <LAST WEEK: Topic 18, Topic 100>
My main question would be how I can create/extend the query that creates the result set that is then iterated over in
via the filteredList.
I found a place where this is maybe populated but I was not sure how to “extend” it. There seems to be queryParam system and some route stuff that can affect a resultset but I didn’t get it.
Can anyone point me to the right place?
We are using the above mentioned theme component, meaning that we are limited in what we can do.
I’d be helpful for me if someone could show me how to limit the filteredList to only unread-post topics for example - I could take it from there then.
Thank you so much!