Replaces deprecated usage of the Ember's native array extension `.any()`
function with `.some()` across several JavaScript files in the project.
This is a purely refactoring change intended to modernize the codebase
to follow current JavaScript standards.
**Main Changes:**
* Replaced .any() with .some() for array handling in 25 instances across
various files.
* Updated deprecation workflow to handle the any() and related
deprecations explicitly.
We are not sure of the reasons but there are multiple similar (yet not
exactly the same) reports of resizing issues with calendar causing this
exact same `width: 0` state we have experienced.
When fetching voters from the `/polls/voters.json` API endpoint, each
page after the first has an extra voter (the last one from the previous
page). This causes duplicate voters to be returned if loading multiple
pages. This PR fixes the off-by-one error that causes this. (This fix
has initially been proposed by Rob Mackenzie.)
The PR also fixes an issue that could cause non-deterministic ordering
of results from that API; however, I have not been able to craft a test
to reproduce the issue, so the fix is theoretical.
Reported here:
https://meta.discourse.org/t/polls-voters-json-returning-duplicate-users-across-paged-requests/376636
Covers default reactions,
`discourse_reactions_experimental_allow_any_emoji`,
`discourse_reactions_enabled_reactions`, and interaction with the
`emoji_deny_list` setting from core.
---------
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
Replaces Ember's deprecated `filterBy` with the native JavaScript method
`filter`. This aligns with modern JavaScript practices, improves code
clarity, and prepares for future deprecations.
Changes involve various components, controllers, and models across the
codebase.
Replace individual per-locale queries with a single query that
calculates completion progress for all locales at once.
This commit also removes methods off the `base_candidate` (used for
Categories and Topics as well) which are not used any more, as the
progress dashboard only shows progress for posts.
t/162846/4
---------
Co-authored-by: Nat <natalie.tay@discourse.org>
This Pull Request introduces changes that replace the use of .sortBy
with .sort combined with compare from @ember/utils. This update aims to
modernize and standardize sorting operations throughout the codebase.
**Main Changes:**
* Replaced .sortBy with .sort and compare in various components,
controllers, and services to improve sorting practices.
* Updated sorting logic to handle optional chaining (?.) for increased
robustness.
* Adjusted sorting logic, including reversing, in some cases for more
clarity and correctness.
* Added a new deprecation workflow entry to handle sortBy deprecation
logs (discourse.native-array-extensions.sortBy).
Replaces usages of `mapBy` across the codebase with JavaScript's native
`.map`. This resolves deprecation warnings related to Ember's array
extensions and ensures compatibility with future Ember versions.
---------
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
Refactor all instances of `reject` and `rejectBy` across the codebase to
use the native `filter` method paired with appropriate logic. Updates
include changes in models, components, and services.
This ensures compatibility with modern JavaScript standards and reduces
reliance on deprecated array extension methods.
- Adds a transformer to allow subtitle addition to the user notes form
- Adds plugin outlet to allow customization of each note in the modal
form
- Rename a handler placement to place the avatar under the correct
outlet
For historical reasons, Discourse has a customized Ember resolver. This
had a much more fuzzy implementation of 'normalize' and 'findTemplate'
functions. This leniency meant that our file naming hasn't always
matched Ember conventions.
Standardizing our naming will make things easier to understand for
developers, and will make adoption of newer ecosystem tooling easier
(e.g. route-based bundle splitting in Embroider/vite)
This commit adds deprecations to the resolver when this leniency is
used, and uses a fully bespoke codemod to rename all of the affected
routes/controllers/templates in the Discourse core repository.
Backwards-compatibility is maintained for anyone looking up the old
names in the resolver.
Add a `Welcome banner text color` setting that admins can use to adjust the color of the heading and subheading text on the welcome banner when they are using a background image.
For now, we want to force the markdown mode for email template
editing for admins, as this is a niche area and doesn't much
benefit from RTE for now...we may want to revert this decision
in future and do a better solution here.
This commit also fixes an issue where, for templates like
system_messages.reviewables_reminder which have a `one` and
`other` key for their text body (and thus "multiple bodies"),
we were showing `object Object` in the editor. Instead, we
want to do the same thing we do for multiple subjects, which
is provide a link to site texts with the text:
> This email template has multiple bodies.
There is only one known case of this happening so far, but at least
this minimally handles the issue for now.
Discover - Our complimentary conversation search widget now features a
dedicated setting to enable it, and it no longer relies on the AI bot.
We also ship a default persona for it.
## 🔍 Overview
This update adds a button to the post translations menu. For automatic
translations created through Discourse AI, translation moderators will
be able to click a refresh translations button to re-translate a
specific post beyond the twice a day maximum.
## ➕ More details
To achieve adding a new button to the core translations menu, a new
wrapper plugin outlet called: `post-menu-translations-dropdown` will be
used.
## 📷 Screenshots
<img width="264" height="202" alt="Screenshot 2025-09-22 at 14 08 41"
src="https://github.com/user-attachments/assets/f64132af-0648-4320-a509-10b2f3e8bdfd"
/>
<img width="853" height="172" alt="Screenshot 2025-09-22 at 14 08 48"
src="https://github.com/user-attachments/assets/9453eed4-79ed-4f85-866d-8473cf35074d"
/>
---------
Co-authored-by: Nat <natalie.tay@discourse.org>
- rename from calendar -> calendar and events
- fix config for plugin to show a tab for settings
still needs some CSS adjustments but mostly there
---------
Co-authored-by: Martin Brennan <martin@discourse.org>
Disabling post event with category events set would cause an error when
visiting the category, this commit ensures it's not the case and adds a
test for it.
Also added tests to ensure we correctly render category calendar in
different outlets as the before-topic-list-body one was broken.