Commit Graph

58787 Commits

Author SHA1 Message Date
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
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