Running this spec locally I was getting an error:
```
1) translate accelerator plugins loads plural rules from plugins
Failure/Error: DiscoursePluginRegistry.unregister_locale("foo")
NoMethodError:
undefined method `unregister_locale' for class DiscoursePluginRegistry
# ./spec/lib/freedom_patches/translate_accelerator_spec.rb:113:in `block (3 levels) in <main>'
Finished in 0.17998 seconds (files took 1.88 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/lib/freedom_patches/translate_accelerator_spec.rb:117 # translate accelerator plugins loads plural rules from plugins
```
On top of this, this spec was flakey, Im not sure this is going to fix
flakyness, but this seems like a good first step.
The way playwright renders headed browser is different than selenium,
and depending on the size of your screen you could not be able to see
part of the app. To avoid this issue you can now use
`PLAYWRIGHT_NO_VIEWPORT=1` which will default to a smaller viewport.
Note that to ensure we don't fail randomly on CI, the viewport on CI
will always be 1400x1400, so if you develop with
`PLAYWRIGHT_NO_VIEWPORT=1` you might experience failures on CI.
Doing a full page load in system test is expensive and takes about 1
second on average. Since this shared example is being run across 70
official
plugins, the additional time to execute these full page loads adds up.
Therefore, we are trading off some readability here for CI runtime.
Before:
```
Randomized with seed 7202
..................
Finished in 21.26 seconds (files took 1.72 seconds to load)
18 examples, 0 failures
```
After:
```
Randomized with seed 7202
........
Finished in 14.28 seconds (files took 1.74 seconds to load)
8 examples, 0 failures
```
Switches to using `URL.createObjectURL` for better support of very large
images (30Mb+). Using blob URLs is more memory-efficient and on testing,
handles a 90Mb file just fine (previously, it would fail and skip
optimization).
These changes have been made for playwright as it was hard to test a
long press even on playwright given `click` won't trigger `touchstart`
even with `isMobile:true` and `hasTouch:true`. You have to use `tap`,
but you don't have the `delay` option on tap, so you can't make it a
long tap.
Sadly this code is apparently not working correctly on Android 15. This
commit will revert the modifier to what it was before and is relying on
native JS to trigger the fake long press in specs, which seems to work
nicely.
This commit also attempts to centralize the actions on messages in page
objects to avoid code duplication.
- When using the Glimmer Post Stream, ensure the status wrapper is only
rendered for mentions of users with a status set.
This prevents an empty wrapper from adding a small blank space at the
end of the mention.
- Ensures the post's user field in initialized with the
`avatar_template` in the PostStream to prevent missing avatar on small
actions
- Fix an issue where the path would be incorrectly linked on small
actions
- Fix an issue where the relative timestamp would be incorrectly
displayed in wiki posts
Previously when changing back to the same email (ie. change to new
email, then change back again) we can easily end up showing the
incorrect old email if changing back to the same email more than once.
Then passing the incorrect old email causes an error as it can't be found.
This happens because we only searched for a combination of `user_id` and
`new_email` which can load an older change from the database. By using
the current email address when finding / initializing the
`EmailChangeRequest` we can prevent this issue as we will be creating a
new entry rather than loading an outdated one.
We just added this site setting to be used for switchover as we merge a theme component into core. However, as it wasn't marked client: true, the theme component cannot read it. 🤦
In this PR, test was removed
https://github.com/discourse/discourse/pull/32639
To be sure result are consistent, we need to define a data set which
will confirm that the page is getting bonus points.
When Translation Overrides are changed, a message is sent on the
`/i18n-flush` channel to ensure all running unicorns flush their caches.
This message is not received in a database-specific context, so running
`ExtraLocalesController.clear_cache!` was only affecting the default
site in a multisite cluster. This commit updates it to flush caches for
all sites.
When we create a custom homepage using the `custom_homepage` modifier we
can hide the sidebar using `{{hideApplicationSidebar}}` in the template
— this forces the hamburger dropdown to appear in the header.
This creates an issue when navigating from the custom homepage to the
admin area, because when the route transitions the hamburger menu isn't
closed... and at this point, it cannot be closed at all. The
`clickOutside` listener from the open menu is calling
`toggleNavigation`, which is now the sidebar... so instead of closing
the hamburger menu, it toggles the sidebar and prevents other elements
from being clicked (because the `clickOuside` listener is only removed
when the hamburger menu is destroyed).

This change ensures that when the admin sidebar is forced, the hamburger
menu will be hidden.
## 🔍 Overview
This update adds the ability for users to manually add translations to
specific posts. It adds a 🌐 icon on the post menu where you can click to
add translations for posts.
It also introduces a new site setting:
`content_localization_debug_allowed_groups` which is convenient when
debugging localized posts. It adds a globe icon in the post meta data
area along with a number of how many languages the post is translated
in. Hovering over the icon will show a tooltip with access to editing
and deleting the translated posts.
## 📸 Screenshots
<img width="1234" alt="Screenshot 2025-05-07 at 13 26 09"
src="https://github.com/user-attachments/assets/9d65374d-ee3e-4e8b-b171-b98db6f90f23"
/>
<img width="300" alt="Screenshot 2025-05-07 at 13 26 41"
src="https://github.com/user-attachments/assets/6ee9c5e6-16ed-4dab-97ec-9401804a4ac8"
/>
The new themes listing page at `/admin/config/customize/themes`
currently has poor performance compared to the components page
(`/admin/config/customize/components`) due to various N+1 issues,
loading all themes and components from the server when only themes are
needed, and serializing data/attributes that aren't needed for rendering
the themes grid.
This commit improves the performance by eliminating all N+1 that are
currently present, excluding components from the page payload, and
reducing the amount of data transmitted for each theme when loading the
page.
If a user was using invalid values for the contract we would return
"Unexpected error", which is incorrect given we know the exact error.
The user will now get the following exception: "Page size must be less
than or equal to 50"
This PR addresses a problem with the Xenforo importer.
Xenforo has moved from "likes" table and now calls the same table
"reactions" table. Similarly the columns has been also renamed.
With this PR, the importer is upgraded to use the latest naming.
Signed-off-by: Abhiram Shibu <abhiramshibu1998@gmail.com>
Users won't be able to use video locally but we think it's not necessary
for now. This could also cause permissions errors on CI as deps require
sudo to be installed.