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 FEATURE: Always show full page "New Features" to admins (#28383) 2024-08-16 09:12:24 +10:00
admin-plugin.js DEV: Use default admin routes for plugins with settings (#30941) 2025-02-04 14:57:28 +08:00
admin-user.js FIX: Correct assignment of admin user groups property (#35315) 2025-10-10 13:27:36 -03:00
api-key.js DEV: Require at least one scope for API key granular mode (#31253) 2025-02-10 13:22:08 +08:00
backup-status.js DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00
backup.js DEV: Update admin models to native class syntax (#20704) 2023-03-17 10:18:42 +00:00
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 DEV: Extract e-mail logs into their own admin page (#32211) 2025-04-08 17:50:12 +08:00
email-preview.js DEV: Update admin models to native class syntax (#20704) 2023-03-17 10:18:42 +00:00
email-settings.js DEV: Add e-mail site settings to e-mail admin page (#32214) 2025-04-08 18:59:50 +08:00
email-style.js DEV: Update admin models to native class syntax (#20704) 2023-03-17 10:18:42 +00:00
email-template.js UX: Use DPageHeader on the Emails page (#30781) 2025-01-15 15:36:16 +11:00
flag-type.js DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00
form-template.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
incoming-email.js DEV: Extract e-mail logs into their own admin page (#32211) 2025-04-08 17:50:12 +08:00
permalink.js FIX: Make permalink search work even when there're 100+ permalinks (#31354) 2025-02-16 00:19:16 +03:00
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 DEV: Update lint-configs and autofix issues (#31620) 2025-03-05 01:20:16 +01:00
screened-ip-address.js DEV: Update lint-configs and rubocop-discourse (#31728) 2025-03-10 19:52:19 +01:00
screened-url.js DEV: Update lint-configs and autofix issues (#31620) 2025-03-05 01:20:16 +01:00
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 DEV: Sort imports 2023-10-10 21:46:54 +01:00
staff-action-log.js FEATURE: Allow rejected user details to be scrubbed (#31987) 2025-03-31 12:40:35 +11:00
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 DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00
user-export.js FEATURE: Allow admins to export users (#30918) 2025-01-24 08:13:25 +11:00
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 DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00
watched-word.js DEV: Consolidate i18n import paths (#29804) 2024-11-19 20:45:18 +00:00
web-hook.js DEV: Replace deprecated Ember's array uniq and uniqBy (#35227) 2025-10-13 16:47:36 -03:00