discourse/app/assets/javascripts/admin/addon/lib
Sérgio Saquetim 27bc2b1549
DEV: Replace deprecated Ember's native array.get and .set (#35000)
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>
2025-10-08 16:21:14 -03:00
..
color-scheme-manager.js DEV: Replace the use of Ember's .findBy for native methods on arrays (#34557) 2025-09-24 15:32:13 -03:00
constants.js FEATURE: User preference for editor Markdown monospace font (#34051) 2025-08-04 14:56:21 +10:00
hex-to-rgba.js DEV: Convert admin charts to glimmer/gjs (#28271) 2024-08-23 14:59:56 +02:00
setting-object-helper.js DEV: Replace deprecated Ember's native array.get and .set (#35000) 2025-10-08 16:21:14 -03:00
site-setting-filter.js DEV: Improve site setting search ranking (#32461) 2025-04-28 16:58:27 +08:00
site-setting-matcher.js DEV: Replace deprecated Ember's native array any with some (#35010) 2025-09-30 15:49:13 -03:00
template-form-fields.js FEATURE: Implement tag group selection in dropdown and multi-select for topic creation and preview when using Form Templates (#32108) 2025-04-17 08:38:03 -05:00