discourse/app/assets/javascripts/admin/addon/models
Sérgio Saquetim 0c4f285618
DEV: Replace deprecated Ember's array uniq and uniqBy (#35227)
This commit replaces several instances of `.uniq`, `.uniqBy`, and related
array deduplication methods with a new utility function
`uniqueItemsFromArray`. This change ensures proper deduplication logic
across the codebase while addressing the deprecation issues.

**Main Changes:**

* Created new utility function `uniqueItemsFromArray`: Located in a new
file, `array-tools.js`, this function provides a reusable and
configurable alternative for deduplication.
* Replaced old methods: Updated multiple files to use the new utility
function instead of deprecated or custom implementations for
deduplication.
* Replaced manual deduplication: Replace uses of `[...new Set(array)]`
to standardize the deduplication logic across the codebase.
* Added unit tests: Introduced thorough test coverage
(`array-tools-test.js`) to validate functionality and edge cases for the
utility function.
* Updated deprecation workflow: Added logging for deprecated uniq and
uniqBy methods to the `deprecation-workflow.js`.

This change is primarily focused on code quality improvements, ensuring
future-proof deduplication, and maintaining alignment with deprecation
guidelines.
2025-10-13 16:47:36 -03:00
..
admin-dashboard.js
admin-plugin.js
admin-user.js FIX: Correct assignment of admin user groups property (#35315) 2025-10-10 13:27:36 -03:00
api-key.js
backup-status.js
backup.js
color-scheme-color.js DEV: Remove dual mode support for palettes and drop theme-owned palettes (#34467) 2025-08-26 06:24:11 +03:00
color-scheme.js FEATURE: Allow editing theme-owned palettes (#34722) 2025-10-06 09:02:39 +03:00
email-log.js
email-preview.js
email-settings.js
email-style.js
email-template.js
flag-type.js
form-template.js
incoming-email.js
permalink.js
report.js UX: show 0% instead of em dash in percent-type report columns (#33931) 2025-07-29 21:09:26 +05:30
screened-email.js
screened-ip-address.js
screened-url.js
site-setting.js DEV: Change admin site settings filter to be route based (#33167) 2025-06-16 11:20:38 +08:00
site-text.js
staff-action-log.js
theme-settings.js FEATURE: Themeable site settings (#32233) 2025-07-16 11:00:21 +10:00
theme-site-settings.js FEATURE: Themeable site settings (#32233) 2025-07-16 11:00:21 +10:00
theme.js DEV: Replace deprecated Ember's native array any with some (#35010) 2025-09-30 15:49:13 -03:00
tl3-requirements.js
user-export.js
user-field.js DEV: Replace the use of Ember's .findBy for native methods on arrays (#34557) 2025-09-24 15:32:13 -03:00
version-check.js
watched-word.js
web-hook.js DEV: Replace deprecated Ember's array uniq and uniqBy (#35227) 2025-10-13 16:47:36 -03:00