Commit Graph

59226 Commits

Author SHA1 Message Date
a445e8cce5 DEV: Port the about page extra groups functionality into core (#32659)
We want to merge the theme component that allows admins to display extra groups on the about page. The settings for this are now under About your site.

All the code is lift-and-shift, with some minor adjustments, e.g. theme components can't use the group_list setting type, but it has been converted to that here.

Also the system tests for the admin controls are new.

This whole thing is gated behind a hidden site setting to avoid double rendering while we deprecate the theme component.
2025-05-14 09:44:25 +08:00
404e2598b3 DEV: Fix flaky system tests (#32720)
We were not correctly relying on capybara matchers leading to test
flakiness

```
ailure/Error: super

Capybara::Playwright::Node::StaleReferenceError:
  Element is not attached to the DOM

/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-playwright-driver-0.5.6/lib/capybara/playwright/node.rb:91:in `rescue in assert_element_not_stale'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-playwright-driver-0.5.6/lib/capybara/playwright/node.rb:81:in `assert_element_not_stale'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-playwright-driver-0.5.6/lib/capybara/playwright/node.rb:124:in `visible_text'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-3.40.0/lib/capybara/node/element.rb:60:in `block in text'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-3.40.0/lib/capybara/node/base.rb:84:in `synchronize'
./spec/rails_helper.rb:421:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-3.40.0/lib/capybara/node/element.rb:60:in `text'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-3.40.0/lib/capybara/result.rb:44:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-3.40.0/lib/capybara/result.rb:44:in `each'
./spec/system/page_objects/modals/sidebar_edit_categories.rb:45:in `map'
./spec/system/page_objects/modals/sidebar_edit_categories.rb:45:in `has_categories?'
./spec/system/editing_sidebar_categories_navigation_spec.rb:161:in `block (2 levels) in <main>'
```
2025-05-14 09:14:29 +08:00
736f247511 Build(deps): Bump terser from 5.39.0 to 5.39.1 (#32716)
Bumps [terser](https://github.com/terser/terser) from 5.39.0 to 5.39.1.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.39.0...v5.39.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-14 07:48:54 +08:00
94932de163 Build(deps-dev): Bump ember-qunit from 9.0.2 to 9.0.3 (#32718)
Bumps [ember-qunit](https://github.com/emberjs/ember-qunit) from 9.0.2
to 9.0.3.
- [Release notes](https://github.com/emberjs/ember-qunit/releases)
-
[Changelog](https://github.com/emberjs/ember-qunit/blob/main/.release-plan.json)
- [Commits](https://github.com/emberjs/ember-qunit/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-14 07:15:18 +08:00
fdf3d8ea5d FIX: wrong class in schema setting editor stylesheet file (#32715)
relates to https://github.com/discourse/discourse/pull/32707 and
https://github.com/discourse/discourse/pull/32706

I've retested manually and all should be fine now.
2025-05-13 19:00:28 -03:00
105f5eca8c UX: Modal to inherit border radius (#32709) 2025-05-13 15:27:51 -05:00
2a738620c4 UX: minor style adjustments for experimental translation feature (#32708)
Before:

![image](https://github.com/user-attachments/assets/ff51c2b8-fff9-4c19-a8c8-6edb8a72a2fb)


After: 

![image](https://github.com/user-attachments/assets/c3b9a858-3499-4e35-bb48-a8da3ba5db3c)
2025-05-13 16:10:37 -04:00
51c687e6db UX: add missing import to admin_base.scss (#32707)
While re-reviewing what I did in
https://github.com/discourse/discourse/pull/32706, I noticed that the
import for customize_show_schema in `admin_base.scss` file was missing.
Probably removed by mistake in the rebase.
2025-05-13 16:41:13 -03:00
5072615290 FEATURE: Add the group show endpoint to search groups by id instead of only the slug name (#32442)
**Description**
As part of a customer request, we have added the option to search groups
by ID when doing API calls. However, in doing so we have decided to
correct the confusion around the group's routes. Previously the route
would look like `g/:id` while taking the `name` of the group as the
param. For example, when getting a group the route would be like this:

```
GET /g/admins
```

This would make the code in the controller seem as if it was handling
the group IDs instead of names. With these changes, this should be
addressed.
2025-05-13 14:22:06 -05:00
4d99c839b6 FEATURE: porting type object to site settings (#32706) 2025-05-13 14:30:24 -03:00
c688554cdd Build(deps-dev): Bump ember-async-data from 2.0.0 to 2.0.1 (#32699)
Bumps
[ember-async-data](https://github.com/tracked-tools/ember-async-data)
from 2.0.0 to 2.0.1.
- [Release
notes](https://github.com/tracked-tools/ember-async-data/releases)
-
[Changelog](https://github.com/tracked-tools/ember-async-data/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tracked-tools/ember-async-data/commits)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-05-13 15:25:30 +02:00
7e3b2c4738 Build(deps-dev): Bump testem from 3.15.2 to 3.16.0 (#32697)
Bumps [testem](https://github.com/testem/testem) from 3.15.2 to 3.16.0.
- [Release notes](https://github.com/testem/testem/releases)
- [Commits](https://github.com/testem/testem/compare/v3.15.2...v3.16.0)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-05-13 15:22:58 +02:00
9328ab54a0 Build(deps-dev): Bump playwright-ruby-client from 1.51.0 to 1.52.0 (#32694)
Bumps
[playwright-ruby-client](https://github.com/YusukeIwaki/playwright-ruby-client)
from 1.51.0 to 1.52.0.
-
[Commits](https://github.com/YusukeIwaki/playwright-ruby-client/compare/1.51.0...1.52.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 15:21:55 +02:00
0e7b9df9a6 DEV: bump max_image_size_kb to 10MB (#32688)
This allows, in particular, for larger animated image uploads. Due to
optimizing (clientside and serverside), the actual size of the uploaded
(non-animated) image often ends up being smaller than the o riginal
size. I.e. it may already be optimized before hitting this limit.
2025-05-13 08:47:38 -04:00
da956937d0 Build(deps): Bump json from 2.11.3 to 2.12.0 (#32691)
Bumps [json](https://github.com/ruby/json) from 2.11.3 to 2.12.0.
- [Release notes](https://github.com/ruby/json/releases)
- [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md)
- [Commits](https://github.com/ruby/json/compare/v2.11.3...v2.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 19:44:44 +08:00
9319b8c704 Build(deps-dev): Bump diff-lcs from 1.6.1 to 1.6.2 (#32692)
Bumps [diff-lcs](https://github.com/halostatue/diff-lcs) from 1.6.1 to
1.6.2.
-
[Changelog](https://github.com/halostatue/diff-lcs/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/halostatue/diff-lcs/compare/v1.6.1...v1.6.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 19:44:32 +08:00
f734cdc6cf Build(deps): Bump psych from 5.2.5 to 5.2.6 (#32693)
Bumps [psych](https://github.com/ruby/psych) from 5.2.5 to 5.2.6.
- [Release notes](https://github.com/ruby/psych/releases)
- [Commits](https://github.com/ruby/psych/compare/v5.2.5...v5.2.6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 19:44:18 +08:00
b585033a49 Build(deps-dev): Bump language_server-protocol from 3.17.0.4 to 3.17.0.5 (#32695)
Bumps
[language_server-protocol](https://github.com/mtsmfm/language_server-protocol-ruby)
from 3.17.0.4 to 3.17.0.5.
-
[Changelog](https://github.com/mtsmfm/language_server-protocol-ruby/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/mtsmfm/language_server-protocol-ruby/compare/v3.17.0.4...v3.17.0.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 19:14:31 +08:00
6f9e765ff2 Build(deps): Bump loofah from 2.24.0 to 2.24.1 (#32696)
Bumps [loofah](https://github.com/flavorjones/loofah) from 2.24.0 to
2.24.1.
- [Release notes](https://github.com/flavorjones/loofah/releases)
-
[Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/flavorjones/loofah/compare/v2.24.0...v2.24.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 19:14:11 +08:00
7315a2fc70 UX: add fixed scrollbar gutter to avoid jump with modals (#32702) 2025-05-13 11:43:55 +02:00
70a0cc4d7a DEV: better error message when "becoming" an inactive user (#32689)
In development mode, when 'DISCOURSE_DEV_ALLOW_ANON_TO_IMPERSONATE' is
enabled, and going to /session/:username/become, we will now show an
error message when trying to impersonate an inactive user.

This was not obvious why trying to impersonate a user wasn't working
locally because I would hit the URL and be redirected back to the index
without any error and without being logged in.
2025-05-13 11:10:12 +02:00
32ba12a408 DEV: prevent files being watched warning when using devenv (#32690)
Ignore any files/directories in '.devenv' like we do for those in
'node_modules' to 1) speed-up watching files and 2) prevent files from
being watched multiples times (due to symlinks).

No specs since this is only a warning that is being shown in development
when using devenv.

---

Here's an example of the 100s of warning you get when using devenv

```plain
** ERROR: directory is already being watched! **

Directory: /Users/zogstrip/Poetry/discourse/plugins/discourse-login-client/.devenv/profile

is already being watched through: /nix/store/jp4qhxc2f98nyq90kia200mrygl2ndcy-devenv-profile

MORE INFO: https://github.com/guard/listen/blob/master/README.md        
```
2025-05-13 11:09:53 +02:00
2f41cdd2f7 FIX: header search mobile z-index issue (#32683)
Follow up fix for #32401 


![CleanShot 2025-05-12 at 13 51
02@2x](https://github.com/user-attachments/assets/08cef352-8dbe-4a6f-936b-5ac72dcd9e06)![CleanShot
2025-05-12 at 13 50
17@2x](https://github.com/user-attachments/assets/f3c51588-6afb-464f-9553-f3def8fc0a5d)
2025-05-13 10:11:15 +02:00
c2ae2e244c DEV: Fix cooked content rendering issues in the Glimmer Post Stream (#32670) 2025-05-12 16:23:08 -03:00
0658773056 DEV: use DButton for user header avatar menu (#32687)
We were using a vanilla `button` tag here, but can use `DButton` now,
this helps us be more consistent with classes... we had a minor issue
where class differences changed the active state between buttons here...


Before (hamburger and avatar forced active):

![image](https://github.com/user-attachments/assets/64511b29-40c0-4bdb-8564-410fb7b0f961)


After (hamburger and avatar forced active): 

![image](https://github.com/user-attachments/assets/d2412583-7f2e-4e1e-ae36-4369d6bf9e6b)


I also noticed we have a useless title attribute on the image here, the
title should be on the button and the image doesn't need one.

I've also cleaned up the titles:

* hamburger menu was previously just `menu` but we refer to this as
`Navigation menu` generally, and that provides a lot more context

* the notification menu was "Username's account" but more accurately
it's "Notifications and account" (and I don't think we need the username
present)
2025-05-12 15:12:11 -04:00
c16bc66e1a DEV: Enable iOS media optimization by default (#32686)
Tests following
fa03d7719f
and
f3c41af772
are successful, let's enable this for iOS now by default.
2025-05-12 14:21:43 -04:00
6551bd8155 DEV: clean up review queue button classes (#32685)
These reject/approve buttons were getting `btn-default` classes rather
than `btn-danger` or `btn-success`, which meant the styles for the
colors had to be applied separately to `.approve-post` and
`.reject-post`. This also meant the styles needed an additional override
in themes.

Moving to our common button classes helps centralize the styles and
avoids a manual override being needed in themes.

Button appearance is the same before/after 


![image](https://github.com/user-attachments/assets/941514f6-90c4-477c-b2e2-a02b2f296acc)
2025-05-12 13:20:22 -04:00
d213cd1b00 DEV: Refactor content-tag usage in theme-transpiler, and upgrade (#32684)
This strategy allows us to synchronously init the wasm, without needing
a patch on the npm package

---------

Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2025-05-12 17:54:48 +01:00
de32f00b30 DEV: add value transformer for hamburger click outside exceptions (#32673)
This allows themes to add exceptions for menus that may be triggered
from the hamburger menu... like this

```js
api.registerValueTransformer(
  "hamburger-dropdown-click-outside-exceptions",
  ({ value }) => {
    return [...value, ".topic-drafts-menu-content"];
  }
);
```
2025-05-12 10:12:30 -04:00
46093eddf3 DEV: Bump linting dependencies and fix violations (#32682)
template-lint ignores added to workaround bug. Fix is pending release in https://github.com/ember-template-lint/ember-template-lint/pull/3248
2025-05-12 14:14:07 +01:00
5883085af3 DEV: Replace all @breakpoint with @viewport.* (#32649) 2025-05-12 12:52:45 +01:00
4e41dc87ce Build(deps): Bump psych from 5.2.4 to 5.2.5 (#32679)
Bumps [psych](https://github.com/ruby/psych) from 5.2.4 to 5.2.5.
- [Release notes](https://github.com/ruby/psych/releases)
- [Commits](https://github.com/ruby/psych/compare/v5.2.4...v5.2.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-12 11:08:50 +01:00
d915dd72f2 Build(deps-dev): Bump parallel_tests from 5.1.0 to 5.2.0 (#32678)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from
5.1.0 to 5.2.0.
-
[Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/grosser/parallel_tests/compare/v5.1.0...v5.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-12 11:08:20 +01:00
d8bef9450a Build(deps-dev): Bump @ember/test-helpers from 5.2.1 to 5.2.2 (#32680)
Bumps
[@ember/test-helpers](https://github.com/emberjs/ember-test-helpers)
from 5.2.1 to 5.2.2.
- [Release
notes](https://github.com/emberjs/ember-test-helpers/releases)
-
[Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/commits)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-05-12 11:07:58 +01:00
43872ac210 UX: search CSS refactor + fixes (#32401)
* change spacing to use consistent values
* change font weight and colours for search results
* updated copy for mobile to reflect the removal of the search icon
(using native keyboard CTA now)
* results are full-width, in line with other dropdowns; noticable in
hover effects
* trying to make sure all search results items are of equal height, were
possible
* fixing missing `in-this-topic` context button

**Ignore the silly emoji in the screenshots on mobile – different
problem, alrdy fixed on main**

## Desktop
### Search Header
| Before | After |
|--------|--------|
| ![CleanShot 2025-04-23 at 12 11
19@2x](https://github.com/user-attachments/assets/324cf155-9832-4580-8d62-d49436813477)
| ![CleanShot 2025-04-23 at 12 22
23@2x](https://github.com/user-attachments/assets/db9860a4-7e37-418f-85e9-9d68d5a5ab72)
|
| ![CleanShot 2025-04-23 at 12 12
02@2x](https://github.com/user-attachments/assets/0445a36b-1076-4c25-921d-0c2871266b47)|
![CleanShot 2025-04-23 at 11 20
42@2x](https://github.com/user-attachments/assets/93ab484e-2362-4520-9dba-53f2acd7e257)
|
| ![CleanShot 2025-04-23 at 12 12
12@2x](https://github.com/user-attachments/assets/f457b837-0d3c-491f-890d-e9578697dda1)
| ![CleanShot 2025-04-23 at 11 20
52@2x](https://github.com/user-attachments/assets/eec6df3b-0e74-4011-96dd-f531190c28c2)
|
| ![CleanShot 2025-04-23 at 12 14
13@2x](https://github.com/user-attachments/assets/89e3f391-a300-49cb-8f20-0dca10ffc3ad)
| ![CleanShot 2025-04-23 at 11 43
38@2x](https://github.com/user-attachments/assets/9f88c896-868c-4494-924c-bcb5ee26f30a)
|
| ![CleanShot 2025-04-23 at 12 12
34@2x](https://github.com/user-attachments/assets/8dea31e2-b15c-4884-97f3-ff54280d7076)
| ![CleanShot 2025-04-23 at 11 21
17@2x](https://github.com/user-attachments/assets/fe8b2f8a-65d1-43af-9a98-f177b41c3630)
|

### Search Welcome Banner
| Before | After |
|--------|--------|
| ![CleanShot 2025-04-23 at 12 16
17@2x](https://github.com/user-attachments/assets/43a0c727-8a84-4f75-a89c-b2444cbac903)
| ![CleanShot 2025-04-23 at 11 22
29@2x](https://github.com/user-attachments/assets/f3f3e059-deb8-4181-b1ac-a8c4604b50c5)
|
| ![CleanShot 2025-04-23 at 12 16
28@2x](https://github.com/user-attachments/assets/53ef9554-790e-4fbb-9141-4a7b65909cce)
| ![CleanShot 2025-04-23 at 11 22
55@2x](https://github.com/user-attachments/assets/343ed01b-8f4f-41da-af92-93316f2df960)
|
| ![CleanShot 2025-04-23 at 12 16
42@2x](https://github.com/user-attachments/assets/1fdb4fc8-6f04-4161-85b0-dee9e4d444af)
| ![CleanShot 2025-04-23 at 11 23
06@2x](https://github.com/user-attachments/assets/4bc27eb8-29d9-43f6-8ac9-5de66d70cee8)|
| ![CleanShot 2025-04-23 at 12 17
07@2x](https://github.com/user-attachments/assets/85cc8948-3bbf-4aad-abc2-e2ff0966df55)
| ![CleanShot 2025-04-23 at 11 43
02@2x](https://github.com/user-attachments/assets/f566ddf5-25b1-4bcd-91eb-a2ec320e7797)|
| ![CleanShot 2025-04-23 at 12 17
17](https://github.com/user-attachments/assets/43098fed-edef-460b-b7b9-165331ea3c98)
| ![CleanShot 2025-04-23 at 11 43
16@2x](https://github.com/user-attachments/assets/0c6c9f76-0084-4e49-8135-d07b91672182)
|

### Search in Topic
| Before | After |
|--------|--------|
| ![CleanShot 2025-04-23 at 12 19
49@2x](https://github.com/user-attachments/assets/3914cf25-2071-465f-8ed1-bfcb736fc7be)
| ![CleanShot 2025-04-23 at 12 24
32@2x](https://github.com/user-attachments/assets/f0e0a19a-8ca1-4881-8c1c-0c117bd27cc6)
|
| ![CleanShot 2025-04-23 at 12 20
28@2x](https://github.com/user-attachments/assets/c56967f7-624a-4949-a024-b9a45fd31426)
| ![CleanShot 2025-04-23 at 11 53
28@2x](https://github.com/user-attachments/assets/3346972a-4bb8-4362-8480-69fe6f55f49a)
|
| ![CleanShot 2025-04-23 at 12 20
47@2x](https://github.com/user-attachments/assets/b725df3c-4c3d-43d5-b717-0840bc4e07d4)
| ![CleanShot 2025-04-23 at 11 53
45@2x](https://github.com/user-attachments/assets/18c0004b-f09a-4e0a-8e40-e95be6471abc)
|
| ![CleanShot 2025-04-23 at 12 21
42@2x](https://github.com/user-attachments/assets/7ea4e1bd-7325-4440-aac5-ae8d6a572593)
| ![CleanShot 2025-04-23 at 11 44
49@2x](https://github.com/user-attachments/assets/85b6ed6e-8bd4-4a94-8df7-6fe2778f8bc8)
|
| ![CleanShot 2025-04-23 at 12 18
12@2x](https://github.com/user-attachments/assets/2a1c97ef-2062-49b7-9d43-e7b998284939)
| ![CleanShot 2025-04-23 at 11 45
39@2x](https://github.com/user-attachments/assets/3f32555a-1846-4ef7-97e4-9028d547617e)
|
| ![CleanShot 2025-04-23 at 12 20
59@2x](https://github.com/user-attachments/assets/42688cc9-276d-475a-97df-90e76832b3a3)
| ![CleanShot 2025-04-23 at 11 50
35@2x](https://github.com/user-attachments/assets/53d964db-6035-44d5-becf-3a27d2764902)|

## Mobile
| Before | After |
|--------|--------|
| ![CleanShot 2025-04-23 at 12 04
10@2x](https://github.com/user-attachments/assets/3ce86a35-8506-4bea-b9d1-0a28ad18d4b4)
| ![CleanShot 2025-04-23 at 12 01
50@2x](https://github.com/user-attachments/assets/af760c91-9b8c-4445-bcee-e840782dd5ad)
|
| ![CleanShot 2025-04-24 at 18 53
56@2x](https://github.com/user-attachments/assets/9ef215bc-0914-4a54-8e7b-91595fca5aef)
| ![CleanShot 2025-04-24 at 18 50
55@2x](https://github.com/user-attachments/assets/9bcfc456-04df-43e2-b3ac-78f843a42cc3)
|
| ![CleanShot 2025-04-24 at 18 53
46@2x](https://github.com/user-attachments/assets/4f969a98-8990-44bd-8964-809d4e1c1c37)
| ![CleanShot 2025-04-24 at 18 51
55@2x](https://github.com/user-attachments/assets/67dc3b4c-ecc6-468d-874d-0c8face3ca29)
|
| ![CleanShot 2025-04-24 at 18 53
37@2x](https://github.com/user-attachments/assets/0c7eccd4-d4d0-4174-b153-28b87bc48424)
| ![CleanShot 2025-04-24 at 18 52
08@2x](https://github.com/user-attachments/assets/24e51250-4abc-4445-baa6-ea806417943f)
|
| ![CleanShot 2025-04-24 at 18 53
26@2x](https://github.com/user-attachments/assets/81e02807-4a38-440d-9740-f27dd0cf138f)
| ![CleanShot 2025-04-24 at 18 52
18@2x](https://github.com/user-attachments/assets/1a5be4ec-8322-4fbe-a20c-ec14a6472ba7)
|
| ![CleanShot 2025-04-24 at 19 57
43@2x](https://github.com/user-attachments/assets/296a00ca-926c-4b21-96f1-5d45853cc0d1)
| ![CleanShot 2025-04-24 at 19 57
09@2x](https://github.com/user-attachments/assets/cf0745c9-4753-4d70-ad97-4fb4e582fdaa)
|

---------

Co-authored-by: Yuriy Kurant <yuriy@discourse.org>
2025-05-12 11:28:12 +02:00
d932383cf8 FIX: correct reload edit theme page (#32658)
When edit theme page is reloaded or visited directly, we should display
new layout.
2025-05-12 13:47:13 +08:00
ec24a7c3fd DEV: flaky spec (#32677) 2025-05-11 19:29:57 +02:00
1fd843ced6 DEV: Deprecate boundDate and formatAge helpers (#32672) 2025-05-10 20:08:08 +02:00
da111d87bd DEV: adds unregister_locale (#32676)
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.
2025-05-10 19:50:00 +02:00
7f2233b1d3 DEV: ensures type_in_search appends (#32674)
If the field had the value: "tags:" we would end up with "tag1tags:"
2025-05-10 13:03:52 +02:00
d2717d0416 DEV: introduces PLAYWRIGHT_NO_VIEWPORT (#32675)
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.
2025-05-10 13:03:21 +02:00
eff31e0d42 DEV: Speed up "having working core features" shared example by ~30% (#32666)
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
```
2025-05-10 06:56:12 +08:00
fa03d7719f DEV: Further optimize large image uploads on iOS (#32671)
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).
2025-05-09 15:26:41 -04:00
52b79012e9 DEV: revert long press changes (#32668)
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.
2025-05-09 18:58:42 +02:00
fe29bb7189 Build(deps-dev): Bump puppeteer-core from 24.8.1 to 24.8.2 (#32655)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.8.1 to 24.8.2.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
-
[Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v24.8.1...puppeteer-core-v24.8.2)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-05-09 17:34:41 +02:00
58009fb0e7 DEV: Fix small issues in the Glimmer Post Stream (#32656)
- 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
2025-05-09 12:17:28 -03:00
f3c41af772 DEV: Refactor image compression for iOS (#32652) 2025-05-09 09:51:30 -04:00
90c19ee54d DEV: remove email updater debugging (#32664) 2025-05-09 15:11:11 +04:00
38ee9a0a79 DEV: scroll to reply button before click (#32663)
This will help with reliability of specs.
2025-05-09 11:46:15 +02:00
b28df068fc FIX: ensure old email set correctly when updating email (#32309)
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.
2025-05-09 12:50:01 +04:00