Commit Graph

58799 Commits

Author SHA1 Message Date
db214a38a2 DEV: Add Content admin config page (#32194)
This PR adds a dedicated page for Content related site settings. It has four different site setting tabs.
2025-04-10 11:20:22 +08:00
db68fd7046 DEV: Skip prosemirror flaky (#32231)
Example of a failure is here

https://github.com/discourse/discourse/actions/runs/14345676579/job/40214833933
2025-04-10 12:54:11 +10:00
7f851c416d DEV: Add Dashboard settings tab to Reports page (#32235)
This change adds a Dashboard settings tab to the Reports page.
2025-04-10 10:41:12 +08:00
d32d0277fb DEV: Move User API admin settings into API keys page (#32232)
We used to have a User API admin page, which is just a page with the site settings. This PR moves that into a Settings tab under API keys.
2025-04-10 10:40:25 +08:00
92a9fb33e6 Build(deps-dev): Bump ember-test-selectors from 7.0.0 to 7.1.0 (#32248)
Bumps
[ember-test-selectors](https://github.com/mainmatter/ember-test-selectors)
from 7.0.0 to 7.1.0.
- [Release
notes](https://github.com/mainmatter/ember-test-selectors/releases)
-
[Changelog](https://github.com/mainmatter/ember-test-selectors/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mainmatter/ember-test-selectors/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-10 03:00:55 +02:00
14a42bdafe FIX: incorrect flag message when en_GB language (#32191)
Currently, this is the order of i18n translate function:
1. Translation in required language;
2. Optional `defaultValue` provided;
3. Fallback to forum default language.

When admin set language as English GB, translation was not correctly
displayed as it went to step 2 and displayed `defaultValue` instead of
correct translation from default language.
2025-04-10 08:06:52 +08:00
af64c85670 Build(deps-dev): Bump puppeteer-core from 24.6.0 to 24.6.1 (#32249)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.6.0 to 24.6.1.
- [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.6.0...puppeteer-core-v24.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-10 01:45:11 +02:00
fff1ae60f1 DEV: ensures chat can work without discourse-presence
discourse presence can be disabled, given it's a plugin the `composerPresenceManager` service couldn't be present anymore and would cause an error.

No test as it's testing imbrication of multiple plugins and hard to test reliably.
2025-04-09 17:00:31 -04:00
fb162ad64d UX: make admin code editor height more flexible (#32241)
Reported here:
https://meta.discourse.org/t/issue-with-custom-css-save-button-on-smaller-screens/358505


Allows the admin code editor to adjust to the viewport regardless of
error message and nav height in both normal and maximized modes


Before:


![image](https://github.com/user-attachments/assets/657fb938-04d2-4ad8-a0c3-f5b6177d7fa2)


![image](https://github.com/user-attachments/assets/bfbf532d-d193-4387-b8c9-546fb6653ff6)


After:


![image](https://github.com/user-attachments/assets/9c2cb0ad-2eff-4171-8912-918dd5326eae)


![image](https://github.com/user-attachments/assets/fa865a13-0891-4fa6-9af6-ed2422bf676e)
2025-04-09 16:20:48 -04:00
949953d025 UX: only-emoji consistency between rich editor and cooked (#32245) 2025-04-09 16:54:05 -03:00
5ece8112da FIX: safari bug on rich editor's list item (#32243)
This fixes a bug on Safari where, for some reason, it was leaking to
affect the rich editor list item rendering. When typing, the current
list item was breaking to a next line.

With this change, it doesn't happen anymore, and the more specific `svg`
target will serve the same purpose as it's currently defined on
`InputTip`.
2025-04-09 15:03:52 -03:00
d096ba8cbb UX: whisper color and font-style on rich editor (#32239)
Respects the same styling from the preview for font-style and color for
the ProseMirror editor when we're composing a whisper.
2025-04-09 12:52:22 -03:00
3106c30f16 Added button to remove password from account (#32200)
Added button to remove password from account if user has a linked
external account or passkey

The button only displays if the user has at least one associated account
or a passkey set up. Uses the ConfirmSession dialog in addition to a
warning about deleting the password.

Users can still reset their password via the Reset Password button
(which will now display "Set Password" if they've removed it).

Also prevent user from removing their last remaining associated account
or passkey if they have no password set.

Replaces PR #31489 from my personal repo, with some fixes for conflicts
since then.
2025-04-09 09:32:51 -05:00
752eca04a8 FIX: add category badge style to category list (#32109)
Adds support for category style headings (square, emojis and icons) to
the all categories list.
2025-04-09 18:31:47 +04:00
70998b73db Build(deps-dev): Bump lefthook from 1.11.7 to 1.11.8 (#32227)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.11.7
to 1.11.8.
- [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.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-04-09 13:12:55 +02:00
4dc1ea11af Build(deps-dev): Bump webpack from 5.99.2 to 5.99.5 (#32226)
Bumps [webpack](https://github.com/webpack/webpack) from 5.99.2 to
5.99.5.
- [Release notes](https://github.com/webpack/webpack/releases)
-
[Commits](https://github.com/webpack/webpack/compare/v5.99.2...v5.99.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 13:10:45 +02:00
3f15508009 Build(deps): Bump faraday from 2.12.2 to 2.13.0 (#32225)
Bumps [faraday](https://github.com/lostisland/faraday) from 2.12.2 to
2.13.0.
- [Release notes](https://github.com/lostisland/faraday/releases)
-
[Changelog](https://github.com/lostisland/faraday/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/lostisland/faraday/compare/v2.12.2...v2.13.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 13:03:20 +02:00
5e9a1a64c7 DEV: Fix the error message from the deprecated icon handler
The string was written as a JS one (using ``), but in Ruby this syntax
tries to execute the string as a command on the host system.
2025-04-09 12:18:14 +02:00
5836a9a664 UX: backspace rich editor keymap improvements (#32234) 2025-04-09 06:54:15 -03:00
90b2ca16dc DEV: Update mailgun pricing (#32222)
mailgun no longer offers a 5k/3 month trial. it offers a 50k/30 day
trial. the "Basic" level for $15/mo with 10k emails has no ability to
trial it for any time.
2025-04-09 09:56:03 +08:00
6e969d5cd4 DEV: Skip a flaky test (#32230)
Has been assigned for investigation soon

```
1) Admin::SiteSettingsController#update when logged in as an admin sanitizes integer values
    Failure/Error: expect(SiteSetting.suggested_topics).to eq(1000)

      expected: 1000
          got: 5

      (compared using ==)
    # ./spec/requests/admin/site_settings_controller_spec.rb:318:in `block (4 levels) in <main>'
    # ./spec/rails_helper.rb:588:in `block (3 levels) in <top (required)>'
    # ./vendor/bundle/ruby/3.3.0/gems/timeout-0.4.3/lib/timeout.rb:185:in `block in timeout'
    # ./vendor/bundle/ruby/3.3.0/gems/timeout-0.4.3/lib/timeout.rb:192:in `timeout'
    # ./spec/rails_helper.rb:578:in `block (2 levels) in <top (required)>'
    # ./spec/rails_helper.rb:535:in `block (2 levels) in <top (required)>'
    # ./vendor/bundle/ruby/3.3.0/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
```
2025-04-09 09:49:16 +08:00
0a63c94e4d UX: improve onebox handling on rich editor (#32221)
Adjusts the rich editor onebox handling to ensure the full protocol URLs
are passed to the inline/full onebox endpoints, but when they are
resolved, we keep the original textual content as the stored URLs for
the onebox nodes, because we need to keep them as-is when serializing
them back to Markdown.

Additionally, it now re-uses the `isTopLevel` logic for inline oneboxes,
so top level domains like `example.com` are not mistakenly inline
oneboxed.
2025-04-08 21:04:59 -03:00
1557e425c6 DEV: refactor scrolling mixin logic into scroll-manager service (#32212)
This PR refactors the scrolling mixin into a proper Ember service,
moving away from the mixin pattern. We will leave the actual removal of
the scolling mixin for a separate PR as there are still other
repositories dependent on it.

I considered refactoring to an ember-modifier but that will have to come
later if we want to go with a smaller refactor for `load-more` -
`load-more` is used in non-core repos and so we shouldn't change its
behaviour too drastically. The service approach allows us to do this in
a more gradual fashion as it can replace the `Scrolling` mixin directly
in `load-more` in this iteration.

For reference, this is the mixin we are refactoring:
38bd0b3f86/app/assets/javascripts/discourse/app/mixins/scrolling.js
2025-04-09 07:39:21 +08:00
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