Commit Graph

58776 Commits

Author SHA1 Message Date
9301a11896 UX: Wrap participants in pm topic item (#32223) 2025-04-08 18:03:07 -05:00
baad2ae9a0 Build(deps-dev): Bump lefthook from 1.11.6 to 1.11.7 (#32204)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.11.6
to 1.11.7.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
-
[Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/evilmartians/lefthook/compare/v1.11.6...v1.11.7)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 00:47:12 +02:00
ad0966afa9 FEATURE: Introduce new components listing page (#32164)
Follow-up to https://github.com/discourse/discourse/pull/31887

This commit introduces a new design for the components listing page, which
is not linked from anywhere in the UI at the moment, but it can be
accessed by heading to the `/admin/config/customize/components` path
directly. We'll make this new design available from the sidebar and
remove the old page once we've tested and validated the new design
internally.

Internal topic: t/146007.

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-04-08 17:58:29 +03:00
e84083ee36 FEATURE: prosemirror-codemark for a fake boundary cursor on rich editor (#32165)
Uses prosemirror-codemark to provide a fake boundary cursor to code marks, to easily
prepend/append text either code-marked or not.
2025-04-08 10:32:15 -03:00
6fb8f3ff7a FEATURE: auto-link/unlink url-like words on rich editor when typing (#32163)
Using markdown-it's linkify strategy, this plugin adds marks to regular
text that happens to be identified as a URL, and removes marks from
link-marked text that happens to not be a valid URL anymore.

Additionally, it changes the onebox handling to only act if we're not in
the same word as the link to be oneboxed.
2025-04-08 10:31:51 -03:00
b1e97d9ebd DEV: Add e-mail site settings to e-mail admin page (#32214)
Follow-up to #32211. This PR adds a Settings tab to the Email settings admin page. The current Settings tab is renamed to Server settings.
2025-04-08 18:59:50 +08:00
a021032a35 DEV: Extract e-mail logs into their own admin page (#32211)
This is a lift-and-shift of the admin e-mail logs, moving it out of the "Server setup & logs" page and into its own dedicated admin page.
2025-04-08 17:50:12 +08:00
c90544ab44 DEV: Add missing specs to User::BulkDestroy 2025-04-08 11:42:51 +02:00
c289100f60 Build(deps-dev): Bump webpack from 5.98.0 to 5.99.1 (#32205)
Bumps [webpack](https://github.com/webpack/webpack) from 5.98.0 to
5.99.1.
- [Release notes](https://github.com/webpack/webpack/releases)
-
[Commits](https://github.com/webpack/webpack/compare/v5.98.0...v5.99.1)

---------

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-04-08 11:37:33 +02:00
c24aba7e66 Build(deps-dev): Bump @swc/core from 1.11.16 to 1.11.18 (#32208)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.11.16 to
1.11.18.
- [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.16...v1.11.18)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-08 11:03:51 +02:00
69b4c80448 Build(deps-dev): Bump ember-cli from 6.3.0 to 6.3.1 (#32207)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 6.3.0 to
6.3.1.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
-
[Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/ember-cli/ember-cli/compare/v6.3.0...v6.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-08 11:03:37 +02:00
1e69d74966 FIX: Selecting a parent category shouldn't clear other form fields (#32206)
This commit fixes a bug where, if you're editing or creating a category,
selecting a parent category for the category that's being edited/created
causes the rest of the fields in the category edit/create form to be
cleared out.

Internal topic: t/151232.
2025-04-08 06:25:15 +03:00
063d28763a FIX: flaky admin_branding_spec fonts section (#32209)
Wait for state to be updated before submit fonts form to avoid random
failures.

Form was submitted too quickly.
2025-04-08 10:56:20 +08:00
8483d09fc4 UX: Add missing admin config page titles (#32198)
A number of admin config pages are missing a page title. This PR adds them in.
2025-04-08 10:02:11 +08:00
ec0b6affd7 DEV: Add Site admin admin config page (#32196)
This PR adds a dedicated admin config page for Site admin related site settings.
2025-04-08 09:52:42 +08:00
464726d973 DEV: Add Interface and layout admin config page (#32197)
This PR adds a dedicated admin settings page for Interface & layout related site settings.
2025-04-08 09:22:10 +08:00
5f0b186061 DEV: Add User defaults admin config page (#32195)
This PR adds a dedicated admin config page for User defaults related site settings.
2025-04-08 09:21:54 +08:00
206ea17c3f DEV: Fix mixed-decls Sass deprecation warning (#32202)
When running specs I noticed this mixed-decls Sass deprecation warning:

> Deprecation Warning [mixed-decls]: Sass's behavior for declarations
that appear after nested
> rules will be changing to match the behavior specified by CSS in an
upcoming
> version. To keep the existing behavior, move the declaration above the
nested
> rule. To opt into the new behavior, wrap the declaration in & {}.
>
> More info: https://sass-lang.com/d/mixed-decls

This change address that issue.

Follow up to: 928f9175f05413289c45d3fd6424f62956ea0944
2025-04-07 18:26:55 -06:00
67d083ede0 FIX: flaky admin_branding_spec (#32193)
When remove image, ensure that state is updated before saving form.

We know that state is updated when remove button is no longer available.
2025-04-08 07:27:53 +08:00
abfdc1fa11 Build(deps): Bump prosemirror-view from 1.38.1 to 1.39.1 in the prosemirror group (#32186)
Bumps the prosemirror group with 1 update:
[prosemirror-view](https://github.com/prosemirror/prosemirror-view).


Updates `prosemirror-view` from 1.38.1 to 1.39.1
-
[Changelog](https://github.com/ProseMirror/prosemirror-view/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/prosemirror/prosemirror-view/compare/1.38.1...1.39.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 18:30:48 +02:00
51854ad0ed Build(deps): Bump reline from 0.6.0 to 0.6.1 (#32181)
Bumps [reline](https://github.com/ruby/reline) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/ruby/reline/releases)
- [Commits](https://github.com/ruby/reline/compare/v0.6.0...v0.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 18:29:09 +02:00
251cac39af DEV: Adds a basic importer for the IntermediateDB
* It only imports users and emails so far
* It stores mapped IDs and usernames in a SQLite DB. In the future, we might want to copy those into the Discourse DB at the end of a migration.
* The importer is split into steps which can mostly be configured with a simple DSL
* Data that needs to be shared between steps can be stored in an instance of the `SharedData` class
* Steps are automatically sorted via their defined dependencies before they are executed
* Common logic for finding unique names (username, group name) is extracted into a helper class
* If possible, steps try to avoid loading already imported data (via `mapping.ids` table)
* And steps should select the `discourse_id` instead of the `original_id` of mapped IDs via SQL
2025-04-07 17:22:36 +02:00
7c6b116dfd DEV: Adds a new converter for migrating from Discourse
It only contains a few user-related steps right now
2025-04-07 17:22:36 +02:00
17ba19c7ae REFACTOR: Code generator for migrations IntemerdiateDB
* Splits the existing script into multiple classes
* Adds command for generating IntermediateDB schema (`migrations/bin/cli schema generate`)
* Changes the syntax of the IntermediateDB schema config
* Adds validation for the schema config
* It uses YAML schema aka JSON schema to validate the config file
* It generates the SQL schema file and Ruby classes for storing data in the IntermediateDB
2025-04-07 17:22:36 +02:00
71a90dcba2 DEV: Refactor migrations-tooling
* Updates GitHub Action for migrations
* Rubocop: Always `EnforcedShorthandSyntax` for hashes in the `migrations` directory
* Automatically load all available converter steps
* Enable YJIT at runtime, if available
* Progressbar shows skipped records and other small improvements
2025-04-07 17:22:36 +02:00
7b5839ec44 DEV: Optionally include everyone groups when searching (#32199)
`GroupsController#search` now accepts an `include_everyone` parameter to
include the "everyone" group in the results. discourse-ai relies on this
 endpoint for configuring personas' allowed groups and needs this group
 to be present. You still need to be able to see the group.
2025-04-07 11:55:27 -03:00
6637eb2b64 DEV: discourse-emojis 1.0.39 (#32180)
d575425413
2025-04-07 10:49:42 +02:00
cfd216598d DEV: Add Analytics and SEO admin config page (#32190)
This PR adds a dedicated page for Analytics and SEO related site settings.
2025-04-07 16:15:37 +08:00
601fecde06 FIX: flaky admin_customize_themes_spec (#32169)
Ensure that translations are loaded before checking input value.
2025-04-07 10:39:21 +08:00
928f9175f0 FEATURE: fonts section for branding page (#32031)
New configure fonts section was added. Because now we have two sections
completed (logos and fonts), new /branding page was introduced and old
/logo and /font pages was removed.

When text size is changed, modal is displayed to ask if preferences of
existing users should be retrospectively updated.



https://github.com/user-attachments/assets/f6b0c92a-117f-4064-bd76-30fa05acc6d3

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2025-04-07 10:28:42 +08:00
637a221517 FIX: Fallback to #search-menu for search input (#32188)
Followup c4d971ea2c7677d893e0d6fdcec5d7d93d9c964e

There are some customizations still relying on #search-menu
for an ID, this provides a fallback to that ID if no
@searchInputId arg is provided while we work through the
customizations.
2025-04-07 11:57:27 +10:00
c9d583be92 Build(deps-dev): Bump selenium-webdriver from 4.29.1 to 4.31.0 (#32185)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from
4.29.1 to 4.31.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
-
[Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
-
[Commits](https://github.com/SeleniumHQ/selenium/commits/selenium-4.31.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 09:53:23 +08:00
ce6583d226 Build(deps-dev): Bump bullet from 8.0.2 to 8.0.3 (#32184)
Bumps [bullet](https://github.com/flyerhzm/bullet) from 8.0.2 to 8.0.3.
- [Changelog](https://github.com/flyerhzm/bullet/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/8.0.2...8.0.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 09:07:03 +08:00
cc4e4eaab1 Build(deps-dev): Bump selenium-devtools from 0.133.0 to 0.135.0 (#32183)
Bumps [selenium-devtools](https://github.com/SeleniumHQ/selenium) from
0.133.0 to 0.135.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
-
[Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 09:06:45 +08:00
231e9ca99a DEV: Remove an unused admin component+helpers (#32179) 2025-04-04 20:36:05 +02:00
089d34a591 Build(deps-dev): Bump express from 4.21.2 to 5.1.0 (#32089)
Bumps [express](https://github.com/expressjs/express) from 4.21.2 to
5.1.0.
- [Release notes](https://github.com/expressjs/express/releases)
-
[Changelog](https://github.com/expressjs/express/blob/master/History.md)
-
[Commits](https://github.com/expressjs/express/compare/4.21.2...v5.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-04 20:29:03 +02:00
80e6d3d8c5 DEV: Add modifier for meta_data_content in ApplicationHelper (#32159)
I've considered some _very_ generic, like:

  ```rb

DiscoursePluginRegistry.apply_modifier(:"meta_data_content_for_#{property}",
content, property, opts)
```


But, I think for now, we can use this one and rely on the plugin to do the filtering (`if property == :title`)
2025-04-04 12:28:38 -03:00
a57925b6db FEATURE: Dynamic size for hot topic IDs cache (#32175)
This change makes the cache size either 100, or the 10% of topics with
activity since the hot topic days cutoff, whatever is lower.

We observed that in sites with a small number of topics, everything is
flagged as hot, which while true, defeats the purpose of the feature.
2025-04-04 11:58:06 -03:00
a88d8a0393 FEATURE: prioritize the user who is getting the reply in the autocomplete (#32086)
When replying to a post, the user who is getting the reply should be
prioritized in the autocomplete

- Added in composer a getter for getting `.replyingToUser`
- Added in d-editor the reference to the user that is getting the
reply(`this.composer.replyingToUser`)
- Passed along the reference to the user that is getting the reply to
the user-search service as `replyingToUser`
- Controller `users_controller.rb` was modified to accept the `user_id`
parameter and pass it to the `UserSearch` model
- The `UserSearch` model was modified to accept the `user_id` parameter
and use it to prioritize the user that is getting the reply in the
autocomplete on the first time you call the autocomplete service and
while the username is included in the searched term
- Had to update the serializer to pass the id of the `replyingToUser`
from the post
2025-04-04 10:11:37 -03:00
f571c3c62e Revert "DEV: refactor password validation helper class to take explic… (#32173)
…it args (#32149)"

This reverts commit 568ccdc19d0ab5090e21023c7f5709b02aca6102.

Need to resolve some incompatibilities with plugins
2025-04-04 14:10:35 +01:00
ae2bc240af PERF: Set JOBS=1 for low-memory build environments (#32171)
Recent testing has shown that this config requires significantly less
memory for a successful build, which should improve the situation for
people running Discourse on low-memory servers.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2025-04-04 13:48:19 +01:00
aebb1f0968 DEV: Pass full model for tag to sidebar serializer (#32170)
We are currently only passing a few attributes of a tag when serializing
sidebar tags.

This commit passes the `Tag` into the serializer instead.
2025-04-04 16:29:57 +08:00
aa5fd55e71 FIX: Archiving messages from group inbox (#32166)
Bulk archiving group messages can be done from two places: a) from the user's view (/u/ted/messages/group/swedes) and b) from the group's view (/g/swedes/messages/inbox). Only the former is currently working. From the latter view, the action looks like a success, but is actually a no-op.
2025-04-04 16:05:43 +08:00
4c8420833e FEATURE: One-click chat reaction settings (#32150)
Adds a one-click chat reactions setting to the chat preferences page
where members can determine what one-click reactions are shown in chat.

- Frequent: This will be the default setting. (Automatically set based
on most used chat reactions)
- Custom: Members can choose up to three reactions they want to see in
their one-click chat/DM reactions menu. Defaults are `❤️`, `👍` ,
and `😄`.


![image](https://github.com/user-attachments/assets/8913db0e-d6ec-4347-ad91-2329206b127c)

This pull request is essentially the work of @dsims in
https://github.com/discourse/discourse/pull/31761

---------

Co-authored-by: dsims <1041068+dsims@users.noreply.github.com>
2025-04-04 09:15:13 +02:00
33748895a9 FEATURE: Highlight watched words found in reviewables. (#32167)
This change highlights watched words found in any reviewable posts.
2025-04-04 17:26:14 +11:00
0724b03fb8 DEV: Bump Capybara.default_max_wait_time to 20 on CI (#32143)
There are flaky system tests that have been exhausting the 10 seconds
default max wait time which we have set previously on CI. However, I
have yet to be able to figure out why and lack the tools to be able to
figure out why. The hope here is that the upcoming playwright driver
will provide us with better tooling to debug such problems.

I've attempted to use `Capybara::Session#using_wait_time` by there is
some race condition going on where the session's default max wait time
is sometimes not set properly. I can't figure out why and have spent too
much time trying to figure out why. Instead, I will just bump up the
`default_max_wait_time` to `20`. This may the build take longer when
there are test failures but it is a trade-off we will make right now.
2025-04-04 12:50:28 +08:00
e3e5f20cb6 FIX: flaky admin_sidebar_navigation_spec (#32168)
Wait till all sections are expanded before checking expected links.
2025-04-04 12:38:31 +08:00
3d6b7e2574 FEATURE: Copy thread messages when copying thread OP (#32139)
This introduces functionality to chat transcripts. If
you select _only_ a thread's OP and press the Copy button,
we will now copy the OP plus all of the thread's replies
into the transcript.

This is being done to make it easier to copy all the context
of a thread easily. The old way of selecting only some messages
inside a thread still works too.

This commit also unskips and refactors some transcript specs.
2025-04-04 13:45:37 +10:00
568ccdc19d DEV: refactor password validation helper class to take explicit args (#32149)
This aligns closer to how we are passing data through to such helper
classes (for example, the UserFieldsHelperClass
https://github.com/discourse/discourse/pull/31670) and reduces coupling
with the component itself.
2025-04-04 11:13:49 +08:00
564edc52eb UX: add flex to mentions mixin + update units (#32145)
Fixing hashtag text glued to the icon, and updated some related properties to using better units.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-04-04 12:20:35 +10:00