Commit Graph

58468 Commits

Author SHA1 Message Date
d5e8a77b37 DEV: Fix flaky custom sidebar sections system spec (#31767) 2025-03-12 16:12:16 +08:00
5ddae1c574 DEV: Rerun AddIndexToPostStatComposerColumns migration (#31765)
The previous version of the migration is not idempotent and can result
in indexes created but marked as "invalid" by Postgres.

Per postgres documentation:

If a problem arises while scanning the table, such as a deadlock or a
uniqueness violation in a unique index,
the CREATE INDEX command will fail but leave behind an "invalid" index.
This index will be ignored for querying
purposes because it might be incomplete; however it will still consume
update overhead. The recommended recovery
  method in such cases is to drop the index and try again to perform
  CREATE INDEX CONCURRENTLY.
2025-03-12 11:49:51 +08:00
cf4d80d0b3 FIX: Notification email CTA by system user (#31726)
Followup https://github.com/discourse/discourse/pull/31505/

When sending notification emails for system user responses for PMs,
we removed the part of the CTA where it says "to respond to xyz" in a
previous commit.

This commit takes it slightly further -- we now only show a "Visit
Topic"
or "Visit Message" button if the PM notification is from a system user,
it's a bit cleaner.

This commit also adds more in-depth tests, and refactors the message
builder a little.
2025-03-12 13:49:12 +10:00
6e1954aa41 DEV: Try improve flaky topic map specs (#31764) 2025-03-12 13:24:18 +10:00
623f02aff6 FEATURE: add details (plugin) rich editor extension (#31718)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds `details` and `summary` nodes, parsers, and serializers, and a
click handler to toggle the `open` attribute.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-03-11 20:15:32 -03:00
968b851c1b FEATURE: add spoiler (plugin) rich editor extension (#31717)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds `spoiler` and `inline_spoiler` nodes, parsers, and serializers, and
a click handler to toggle its blurriness in the editor.
2025-03-11 20:13:52 -03:00
7e23096d5e FEATURE: add check (plugin) rich editor extension (#31716)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a `check` node, parser, and serializer, and an input rule to
convert when typing `[]`/`[ ]`/`[x]`
2025-03-11 20:13:44 -03:00
049e65ffe2 FEATURE: add poll (plugin) rich editor extension (#31715)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a `poll` node, parser, and serializer.
2025-03-11 20:13:27 -03:00
d1870d4811 FEATURE: add local-dates (plugin) rich editor extension (#31714)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds `local_date` and `local_date_range` nodes, parsers, and
serializers.
2025-03-11 20:13:09 -03:00
d56e69e7c0 FEATURE: add trailing-paragraph rich editor extension (#31713)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a plugin to enforce an empty trailing paragraph.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-03-11 20:12:31 -03:00
c9518f2384 FEATURE: add onebox rich editor extension (#31691)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a `onebox` and an `onebox_inline` node spec, their serializers, and
a plugin that automatically converts links to oneboxes.
2025-03-11 20:09:33 -03:00
b461c5f7a7 FIX: When testing multiple flagged words, ensure test matches expected word order. (#31758)
This fixes a flaky test, where the generated flagged words would sometimes not be in alphabetical order.
2025-03-12 09:45:44 +11:00
b4f9626984 DEV: allow render-tags to pass classes so we can use it in the history modal (#31755) 2025-03-11 17:34:04 -04:00
0a31aaa9e3 UX: restore CSS tag comma separator for Discourse oneboxes (#31756)
This is a follow-up to 55a3a4e, this restores the tag separator using
CSS — core's tags are no longer separated this way but it's necessary in
the Discourse oneboxes

Before:

![image](https://github.com/user-attachments/assets/d2cce1de-58df-49f3-93df-25aa26b89500)


After:

![image](https://github.com/user-attachments/assets/9a6dc82f-c82e-4c91-b695-2f855c0661b6)
2025-03-11 16:03:33 -04:00
e6034af1ba DEV: more resilient email change spec (#31754)
This might not reduce the failures to zero but some screenshots of the
failures clearly show we were still on the success message page.

Same fix than: https://github.com/discourse/discourse/pull/31750
2025-03-11 18:48:11 +01:00
b5ad4425e0 FIX: Limit referrerUrl redirect to topic URLs (#31751)
This should avoid unwanted early redirects from other routes (like the
user api key routes).
2025-03-11 13:33:09 -04:00
0c203f7689 DEV: more resilient homepage spec (#31753)
I suspect that sometimes the button was still not disabled yet when we
where checking for it. Checking for saved confirmation should be more
resilient.
2025-03-11 18:29:19 +01:00
d3c68ef1a7 Update translations (#31747) 2025-03-11 17:47:42 +01:00
31b621bfda DEV: more resilient email change spec (#31750)
This might not reduce the failures to zero but some screenshots of the
failures clearly show we were still on the success message page.
2025-03-11 17:44:03 +01:00
4433a72083 DEV: attempts to fix flakey drawer spec (#31749)
The setup was happening after the page has loaded which could lead to
inconsistent results.
2025-03-11 14:57:35 +01:00
14fe567bc6 DEV: Remove the symlinking message (#31745)
we don't need it at all
2025-03-11 13:36:35 +01:00
5d09300867 DEV: Fix stylelint violations (#31744)
Followup to 95922fe96b94df0e0887c71edd8e224b97446965
2025-03-11 12:32:38 +01:00
18c46ab0e8 DEV: Fix flaky signup spec (#31743)
- Remove `wait: 0` and base flow on site setting instead
- Ensure full-page-login has actually opened before running `go_back` -
otherwise we'll end up going back to `about:blank`
2025-03-11 10:56:59 +00:00
275da81f98 DEV: Symlinking fonts is not an error, output to stdout (#31741) 2025-03-11 11:44:22 +01:00
95922fe96b UX: scope btn states to touch devices (#31731)
Buttons used in the dMenu mobile (touch device) variant should not:
* show states like hover, or focus
* should never have round borders because the component is full-width
2025-03-11 11:14:57 +01:00
7ad42e0488 FIX: Show total members count when deleting a group (#31699)
When deleting a group, we show a confirmation dialog that includes the
group members count that will lose access to the group alongside other
information. However, there's currently an issue where the members count
shown in the dialog is the count of members that have been loaded in the
Members tab of the group. If you filter the members list and then click
delete, the count you currently see is the number of members that match
the filter, not the total members count.

This happens because the dialog uses the length of the members list
(`members.length`) instead of the `user_count` attribute of the group.

Internal topic: t/148832.
2025-03-11 12:46:32 +03:00
6d92165ae7 UX: Improve image upload component (#31668)
### Before
<img width="785" alt="image"
src="https://github.com/user-attachments/assets/0e9c7f5d-a53d-4768-b53e-2c2957a54625"
/>

### After
<img width="736" alt="image"
src="https://github.com/user-attachments/assets/bc3e41aa-60d0-4659-a3c3-74783402641a"
/>
2025-03-10 23:03:39 -06:00
38920724a0 DEV: Refactor reports index into service (#31667)
This list of all reports is needed in the admin search
controller as well, so this commit refactors it into
a service, adds specs, and also updates the admin
search code to use this new service & avoid a second
AJAX call to the server.
2025-03-11 14:36:06 +10:00
89a297fde3 FIX: Use filename as alt for hotlinked image uploads (#31651)
Currently, when converting raw hotlinked image urls to image upload
markdown, the `alt` attribute is left blank.
This change sets the `alt` to the original filename (which means it will
also appear in the lightbox).
This adds more context and accessibility to the image and is consistent
with how regular uploaded images default to use the filename.

For example:
`http://foo.bar/screenshot.jpg` becomes
`![screenshot](upload://bEs9WFJErcB8y7m1Ye5JopTWeX3.jpeg)`
2025-03-11 14:45:06 +11:00
0dc39fd560 UX: Show scope mode in API key list (#31605)
**Note:** Do not merge before the backfill (#31606) is merged.

### What is this change?

We're now storing the selected API key scope mode in the back-end, and
can display it in the API key list.

**Screenshot:**

<img width="551" alt="Screenshot 2025-03-04 at 7 27 42 PM"
src="https://github.com/user-attachments/assets/9f234242-cfaa-4a2c-93e9-740770bd9944"
/>
2025-03-11 10:00:42 +08:00
f2365fd98b DEV: Backfill API key scope modes (#31606)
### What is this change?

Follow-up to #31601. This will be used for display in the admin API keys
UI.
2025-03-11 10:00:27 +08:00
54771b5949 FIX: remove admin_sidebar_enabled_groups setting (#31693)
Old no sidebar admin panel is deprecated and admin sidebar is not
experimental anymore. Therefore, old setting should be deleted.
2025-03-11 11:41:38 +11:00
a5b2db4cd8 Build(deps): Bump rack from 2.2.12 to 2.2.13 (#31738)
Bumps [rack](https://github.com/rack/rack) from 2.2.12 to 2.2.13.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.12...v2.2.13)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 23:36:43 +01:00
de9ee0f1a5 Build(deps-dev): Bump esbuild from 0.25.0 to 0.25.1 (#31736)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.0 to 0.25.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.0...v0.25.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 23:36:22 +01:00
ecebe22864 Build(deps): Bump redis-client from 0.23.2 to 0.24.0 (#31737)
Bumps [redis-client](https://github.com/redis-rb/redis-client) from
0.23.2 to 0.24.0.
-
[Changelog](https://github.com/redis-rb/redis-client/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/redis-rb/redis-client/compare/v0.23.2...v0.24.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 23:36:14 +01:00
083d2eb35b UX: show timeline when composer preview is hidden (#31708)
This updates the timeline behavior so that when the composer preview is
closed, the full timeline is rendered.

Before: 


![image](https://github.com/user-attachments/assets/3eee00d6-3e8d-4db7-a3df-47efa791b95a)


After: 


![image](https://github.com/user-attachments/assets/399e3c7a-4723-4cdf-96b6-0acc734c3977)

When the preview is shown again, we recalculate and switch back to the
timeline if needed


![image](https://github.com/user-attachments/assets/ca4557de-7311-4903-8900-4c2598d0b58f)
2025-03-10 16:44:16 -04:00
263b6a65c2 Add plugin outlet for google-search (#31733)
Used by https://github.com/notriddle/discourse-duckduckgo-search
2025-03-10 20:36:06 +00:00
137e8a0fa0 DEV: ensures PostTextSelection is destroyed (#31730)
Due to an ember optimisation navigating from one topic to another was
not correctly playing the lifecycle of `PostTextSelection` which is
relying on the `willDestroy` event to occur.

This fix will avoid the following bug:
- select some text in a post
- click on a suggested topic at the bottom of the topic
- the post toolbar is still visible
2025-03-10 20:57:54 +01:00
cf3dde8c62 DEV: Fix smoke test when full_page_login is enabled (#31732)
Smoke test worked only when `full_page_login` site setting was disabled
as it expected specific elements from the login modal to exist. This
commit replaces those selectors with more specific ones (prefer IDs over
classes), but which are present in both the modal or the full page.
2025-03-10 21:09:04 +02:00
25048b5a8d DEV: Update lint-configs and rubocop-discourse (#31728)
…and autofix issues

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-03-10 19:52:19 +01:00
329e1055cf DEV: merge mobile topic.scss styles into common directory (#31712)
This eliminates the mobile topic.scss file by moving its styles into the
relevant common files with breakpoints, and also removes some unused
legacy styles. There should be no major visual changes as a result.
2025-03-10 11:31:15 -04:00
3dbbb940de DEV: Upgrade Sidekiq to v7.3.9 2025-03-10 15:02:48 +01:00
19acb61834 DEV: Remove unnecessary require (#31727)
`DistributedMutex` is eager loaded in production/test and autoloaded in
development.
2025-03-10 16:56:56 +08:00
85e525a8d7 DEV: Try to deflake homepage specs (#31725) 2025-03-10 09:15:14 +08:00
7da4fe82b6 FIX: redirect to parent tag when synonym page visited (#31688)
When a synonym page is visited, the user should be redirected to the
parent tag.
2025-03-10 09:45:38 +11:00
2237a0b0d5 Build(deps): Bump css_parser from 1.21.0 to 1.21.1 (#31721)
Bumps [css_parser](https://github.com/premailer/css_parser) from 1.21.0
to 1.21.1.
-
[Changelog](https://github.com/premailer/css_parser/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/premailer/css_parser/compare/v1.21.0...v1.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-09 23:23:49 +01:00
9bc844112d Build(deps-dev): Bump parallel_tests from 5.0.1 to 5.1.0 (#31720)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from
5.0.1 to 5.1.0.
-
[Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/grosser/parallel_tests/compare/v5.0.1...v5.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-09 23:23:32 +01:00
bf9c22c8e3 Build(deps-dev): Bump webmock from 3.25.0 to 3.25.1 (#31722)
Bumps [webmock](https://github.com/bblimke/webmock) from 3.25.0 to
3.25.1.
-
[Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/bblimke/webmock/compare/v3.25.0...v3.25.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-09 23:22:56 +01:00
3cab4afd28 Build(deps-dev): Bump @swc/core from 1.11.7 to 1.11.8 (#31723)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.11.7 to
1.11.8.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/swc-project/swc/compare/v1.11.7...v1.11.8)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-09 23:22:33 +01:00
1d1db19775 Build(deps): Bump autoprefixer from 10.4.20 to 10.4.21 (#31724)
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from
10.4.20 to 10.4.21.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
-
[Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/postcss/autoprefixer/compare/10.4.20...10.4.21)

---------

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-03-09 23:22:23 +01:00