discourse/app/assets/javascripts/admin
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
..
addon DEV: Rewrite SchemaThemeSetting::Editor to avoid rerendering problems (#26416) 2024-03-28 21:13:02 +08:00
app
.npmrc
ember-cli-build.js DEV: Update ember-cli to 4.12.0 (#21074) 2023-04-19 12:58:29 +02:00
index.js DEV: invert admin/wizard build logic (#22520) 2023-07-10 22:07:21 +01:00
package.json Build(deps): Bump the babel group with 2 updates (#26272) 2024-03-21 07:03:29 +08:00