discourse/spec
Alan Guo Xiang Tan e3977f84a3
FIX: Incorrect topic tracking state count when a new category is created (#20506)
What is the problem?

We have a hidden site setting `show_category_definitions_in_topic_lists`
which is set to false by default. What this means is that category
definition topics are not shown in the topic list by default. Only the
category definition topic for the category being viewed will be shown.
However, we have a bug where we would show that a category has new
topics when a new child category along with its category definition
topic is created even though the topic list does not list the child
category's category definition topic.

What is the fix here?

This commit fixes the problem by shipping down an additional
`is_category_topic` attribute in `TopicTrackingStateItemSerializer` when
the `show_category_definitions_in_topic_lists` site setting has been set
to false. With the new attribute, we can then exclude counting child
categories' category definition topics when counting new and unread
counts for a category.
2023-03-06 10:13:10 +08:00
..
fabricators DEV: Define form template field inputs (#20430) 2023-03-01 11:07:13 -08:00
fixtures DEV: Remove old secure_media setting (#20259) 2023-02-14 09:41:18 +10:00
helpers DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
import_export DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
initializers DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
integration DEV: fix a flakey spec in slugs_controller (#20350) 2023-02-17 18:56:25 +01:00
integrity DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
jobs UX/DEV: Review queue redesign fixes (#20239) 2023-03-02 16:40:53 +01:00
lib DEV: Experimental /filter route to filter through topics (#20494) 2023-03-03 09:46:21 +08:00
mailers DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
models UX/DEV: Review queue redesign fixes (#20239) 2023-03-02 16:40:53 +01:00
multisite DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
requests DEV: Experimental /filter route to filter through topics (#20494) 2023-03-03 09:46:21 +08:00
script/import_scripts DEV: Correct syntax_tree violations 2023-02-02 13:03:11 +00:00
serializers PERF: Eager load linkables when loading custom sidebar sections (#20490) 2023-03-01 07:39:35 +08:00
services UX: Skip applying link-type watched words to user custom fields (#20465) 2023-03-01 10:43:34 +08:00
support FIX: Fast edit doesn’t work on content with certain characters (#20410) 2023-02-23 11:30:16 +08:00
system FIX: Incorrect topic tracking state count when a new category is created (#20506) 2023-03-06 10:13:10 +08:00
tasks FEATURE: Add rake task to mark old hashtag format for rebake (#19876) 2023-01-18 10:16:05 +10:00
views SECURITY: Show only visible tags in metadata 2023-02-23 17:22:20 +01:00
rails_helper.rb DEV: Port sidebar mobile view acceptance tests to system tests (#20421) 2023-02-23 15:01:39 +08:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00