discourse/app
Alan Guo Xiang Tan 70f7d369fb
DEV: Rewrite SchemaThemeSetting::Editor to avoid rerendering problems (#26416)
Why this change?

Prior to this change, the `SchemaThemeSetting::Editor#tree` was creating a
new `Tree` instance which holds instances of `Node`. Both classes
consisted of tracked properties. The problem with this approach is that
when any tracked properties is updated, Ember will revaluate
`SchemaThemeSetting::Editor#tree` and because that method always return
a new instance of `Tree`, it causes the whole navigation tree to
rerender just because on tracked property changed.

This rerendering of the whole navigation tree every time made it hard to
implement simple features like hiding a section in
9baa820d53. Instead of being able to just
declare a tracked property to hide/show a section, we end up with a more
complicated solution.

This commit rewrites `SchemaThemeSetting::Editor` to depend on Ember
components to form the tree structure instead. As needed, each component
in the tree structure can declare its own tracked property as necessary.
2024-03-28 21:13:02 +08:00
..
assets DEV: Rewrite SchemaThemeSetting::Editor to avoid rerendering problems (#26416) 2024-03-28 21:13:02 +08:00
controllers DEV: Consolidate experimental 'Link' header implementations (#26377) 2024-03-27 09:06:50 +00:00
helpers DEV: Consolidate experimental 'Link' header implementations (#26377) 2024-03-27 09:06:50 +00:00
jobs PERF: only allow one reviewable notification at a time (#26330) 2024-03-22 17:37:06 -04:00
mailers FIX: Add higher read & open timeouts for group SMTP emails (#24593) 2023-11-28 15:32:59 +10:00
models DEV: Add missing belongs_to to UserAction model (#26415) 2024-03-28 16:13:18 +10:00
serializers DEV: Change category type to categories type for theme object schema (#26339) 2024-03-27 10:54:30 +08:00
services DEV: Promote block problem checks to ProblemCheck (#26193) 2024-03-20 08:52:25 +08:00
views DEV: Consolidate experimental 'Link' header implementations (#26377) 2024-03-27 09:06:50 +00:00