mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-17 23:29:09 +08:00
This commit introduces several updates across multiple files. The
main focus is improving array removal functionality, replacing outdated
patterns, and fixing Ember tracked properties for cleaner and modernized
code. It also includes updates to the deprecation workflow and newly
added unit tests for array removal.
**Main Changes:**
* Introduction of removeValueFromArray utility:
* Added array-tools.js, which provides a utility function to remove
elements from arrays (including tracked arrays).
* Added unit tests to validate removeValueFromArray behavior for various
scenarios.
* Refactor tracked property usage:
* Updated various properties (allLoaded, expandedBadges, etc.) to use
Ember's tracked primitives for better reactivity management.
* Refactoring of deprecated Ember patterns:
* Replaced the usage of .get() and .set() with modern JavaScript object
handling across files.
* Removed redundant or outdated computed property decorators.
* Enhancements in badge-related functionality:
* Grouped badges handling is improved, and reactive array updates are
introduced.
* Added a proper initialization of expandedBadges and cleaned elements
using removeObject.
* Deprecation workflow adjustments:
* Added logging for additional deprecated native array extension
methods.
* Test updates:
* New unit tests verify the correctness of added array utility
functionalities (array-tools-test.js).
---------
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
|
||
|---|---|---|
| .. | ||
| color-scheme-manager.js | ||
| constants.js | ||
| hex-to-rgba.js | ||
| setting-object-helper.js | ||
| site-setting-filter.js | ||
| site-setting-matcher.js | ||
| template-form-fields.js | ||