Commit Graph

57469 Commits

Author SHA1 Message Date
d7aa13328d FIX: strip unsubscribe links in incoming emails (#30695)
When we send an email notification to a user, we always include a link
that will allow them unsubscribe to these emails.

If the user reply to the email notification, the link to unsubscribe
might still be present in the final post (often in the elided part).

Since those links do not require authentication to unsubscribe a user
(this is a feature, not a bug), we would like to avoid showing them to
other users on Discourse.

(If such an email is forwarded elsewhere, then it's totally out of our
control.)

This commmit ensures we always strip those unsubscribe links from any
incoming email to avoid making it easier to unsubscribe another user.

Since the format we use for those links might be similar to the ones
used by other applications, the regular expression used to match those
links uses the absolute URL of the Discourse (aka.
`Discourse.base_url`).
2025-01-13 11:33:46 +01:00
03119312b5 FIX: ensure GroupChooser works with localized group names (#30593)
The "Tag Groups Form" component was using group names to handle
permissions. This works just fine when the default locale is "English"
but breaks as soon as it's changed to a different locale.

The fix is to use the group id's for handling the permissions instead of
the group name.

Reported in https://meta.discourse.org/t/221849
2025-01-13 11:29:04 +01:00
79b68bc32b FIX: show both group's full name & name when they differ (#30672)
In the groups page (/g) where we list all the groups, we were only
showing one group "name" per group. If a full name was set, we would
show it, otherwise we would show the group's "display name".

This was somewhat inconsistent because we only show the group's names
in all the various controls we use to filter/search by group.

Plus we used a slightly different logic when displaying the names of a
group on the "group page".

So I updated the "GroupsInfo" component to show either 1 or 2 names
depending on whether a full name is set, and it's different from the
display name or the name of the group.

I used this component in the "group page" so the names will be
consistent between the "groups page" and the "group page".

Also renamed the "GroupsInfo" component to "GroupInfo" since it only
ever deals with 1 group at a time.

Ref - https://meta.discourse.org/t/-/345415

---

## When "full name" differs from the "group's name"

(cf. `@admins`, `@staff`, and `@moderators`)

<img width="1250" alt="Screenshot 2025-01-09 at 15 56 29"
src="https://github.com/user-attachments/assets/f8a0ecdd-2715-40d9-a1ed-26288f638d9f"
/>

## When "full name" is the same as the "group's name"

When `unicode` is allowed in usernames, then the group's full name is
the same as the group's name, so we only show one name.

<img width="1249" alt="Screenshot 2025-01-09 at 16 25 53"
src="https://github.com/user-attachments/assets/03438fbd-04f1-4672-91d5-bd6af2b32475"
/>
2025-01-13 11:28:29 +01:00
979325c500 DEV: Move discourse-common/ helpers to discourse/ (#30728)
`discourse-common` was created in the past to share logic between the
'wizard' app and the main 'discourse' app. Since then, the wizard has
been consolidated into the main app, so the separation of
`discourse-common` is no longer useful.

This commit moves `discourse-common/helpers/*` into
`discourse/helpers/*`, removes `discourse-common` from the Ember
resolver config, and adds shims for the imports.
2025-01-13 09:36:11 +00:00
47c8197ea1 FEATURE: add drafts dropdown menu (#30277)
This change adds a new dropdown trigger next to the "New Topic" button.
When clicked a menu will display a list of topic/post drafts that can be
clicked to resume the draft within the composer.

The "New Topic" button will no longer change text to show "Open Draft"
when a draft topic exists, it will still attempt to load the existing
draft if one exists (this will change later when we support multiple
drafts in a separate PR).

The "My Posts" link in desktop sidebar will now be "My Drafts" and only
appear when the current user has existing drafts.
2025-01-13 13:33:57 +04:00
0b3663a16a DEV: fix flaky chat new message spec (#30731)
Ensures that visiting the route creates a new chat channel before
checking the new redirected url is using the last channel.
2025-01-13 17:01:08 +08:00
7c96d7587e FIX: Allow admins to use reserved usernames (#30262)
It is possible for admins to rename users like `system`
to some other username, but if they try to change it back
they cannot, since `system` is a reserved username.

This commit allows admins to change any user's username
to a reserved username _as long as that username is not
already in use_.
2025-01-13 17:30:36 +10:00
cc50b3ea66 DEV: Update copyright year in README (#30625)
We forgot to update it last year 😊
2025-01-13 17:04:38 +11:00
89ba034422 DEV: Improve distributed cache multisite specs (#30662)
Distributed cache when namespace is false is not multisite safe as
values are shared between sites. Distributed cache with namespace option
(default) is multisite safe.

Improved specs to cover both cases.
2025-01-13 17:03:56 +11:00
e8aa2b8d9a DEV: Add a nofollow to /u so user profiles don't get added as a target for crawling (#30693)
In some sites, we are noticing that /u routes are getting indexed.

This commit adds a
["nofollow"](https://developers.google.com/search/docs/crawling-indexing/qualify-outbound-links)
on user profiles so that Google will not index these user profile URLs.
2025-01-13 13:50:00 +08:00
0caeadd9b1 FEATURE: Add IP Lookup to review queue (#30688)
Moves the theme component
https://github.com/discourse/discourse-review-ip-lookup into core, this
allows looking
up a user's IP directly from the review queue and seeing if
there are other users with the same IP on the forum
2025-01-13 13:03:13 +10:00
3e00e994a6 FIX: Add back API keys plugin outlet lost in translation (#30730)
When converting the admin API keys page to the new admin UI guidelines we lost a plugin outlet. This adds that back.
2025-01-13 10:32:57 +08:00
0fc2d86259 DEV: Remove pull_request_template (#30709)
We'd like to enable the "default commit message: pull request title and body" option for squash merges. That means we need PR bodies to be clean, and do not want HTML comments like this template to end up becoming part of the commit message body.
2025-01-13 09:27:06 +10:00
7a4da92657 DEV: Move topic-list-item-class transformer to a getter (#30726)
See 03bb43f
2025-01-11 12:13:47 +01:00
af8f01a0d3 Build(deps-dev): Bump @discourse/lint-configs from 2.2.1 to 2.2.3 (#30725)
Bumps [@discourse/lint-configs](https://github.com/discourse/lint-configs) from 2.2.1 to 2.2.3.
- [Commits](https://github.com/discourse/lint-configs/commits)

---
updated-dependencies:
- dependency-name: "@discourse/lint-configs"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-11 12:00:29 +01:00
88888642f7 FIX: correctly position emoji picker when clicking more (#30724) 2025-01-11 00:40:47 +01:00
066ece95eb Build(deps-dev): Bump eslint from 9.17.0 to 9.18.0 (#30723)
Bumps [eslint](https://github.com/eslint/eslint) from 9.17.0 to 9.18.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.17.0...v9.18.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 23:36:16 +01:00
7c61bc5a09 UX: improve discobot certificate font language support (#30722) 2025-01-10 17:13:24 -05:00
ac60ba5954 DEV: Update dependabot commit-message splitting (#30721)
Followup to c6da8e335637cd7be3f258a311509469e452c2ee
2025-01-10 20:58:50 +00:00
b2167a79b4 DEV: Remove now unused bootstrap dependency (#30715) 2025-01-10 21:28:31 +01:00
7f38cf588b Build(deps): Bump cppjieba_rb from 0.4.2 to 0.4.4 (#30713)
Bumps [cppjieba_rb](https://github.com/fantasticfears/cppjieba_rb) from 0.4.2 to 0.4.4.
- [Release notes](https://github.com/fantasticfears/cppjieba_rb/releases)
- [Changelog](https://github.com/erickguan/cppjieba_rb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fantasticfears/cppjieba_rb/compare/v0.4.2...v0.4.4)

---
updated-dependencies:
- dependency-name: cppjieba_rb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 21:22:44 +01:00
e679310b66 Build(deps): Bump pg from 1.5.4 to 1.5.9 (#30714)
Bumps [pg](https://github.com/ged/ruby-pg) from 1.5.4 to 1.5.9.
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.md)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.5.4...v1.5.9)

---
updated-dependencies:
- dependency-name: pg
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 21:14:48 +01:00
f1383b9858 Build(deps-dev): Bump eslint from 9.14.0 to 9.17.0 (#30711)
Bumps [eslint](https://github.com/eslint/eslint) from 9.14.0 to 9.17.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.14.0...v9.17.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 21:13:18 +01:00
14b46b1b54 Build(deps): Bump logger from 1.6.4 to 1.6.5 (#30706)
Bumps [logger](https://github.com/ruby/logger) from 1.6.4 to 1.6.5.
- [Release notes](https://github.com/ruby/logger/releases)
- [Commits](https://github.com/ruby/logger/compare/v1.6.4...v1.6.5)

---
updated-dependencies:
- dependency-name: logger
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 20:39:41 +01:00
5a92579626 Build(deps-dev): Bump rubocop from 1.69.2 to 1.70.0 (#30707)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.69.2 to 1.70.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.69.2...v1.70.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 20:13:13 +01:00
c6da8e3356 DEV: Add workflow to replace dependabot PR bodies with plaintext (#30708)
We'd like to enable the "default commit message: pull request title and body" option for squash merges. That doesn't currently work well for dependabot PRs, because the PR body includes rich HTML.

Therefore, this commit introduces a new workflow which replaces any dependabot PR bodies with plaintext content from the commit message. The original rich content will be added in a comment.
2025-01-10 19:12:55 +00:00
1cbb8b5703 Build(deps-dev): Bump @swc/core from 1.10.6 to 1.10.7 (#30705)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.6 to 1.10.7.
- [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.10.6...v1.10.7)

---
updated-dependencies:
- dependency-name: "@swc/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 20:12:45 +01:00
14146e7a95 Build(deps-dev): Bump @glint/environment-ember-template-imports (#30703)
Bumps [@glint/environment-ember-template-imports](https://github.com/typed-ember/glint) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/typed-ember/glint/releases)
- [Changelog](https://github.com/typed-ember/glint/blob/main/.release-it.yml)
- [Commits](https://github.com/typed-ember/glint/compare/1.5.0...1.5.1)

---
updated-dependencies:
- dependency-name: "@glint/environment-ember-template-imports"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 20:12:33 +01:00
ee6ef4e96e Build(deps-dev): Bump puppeteer-core from 23.11.1 to 24.0.0 (#30704)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 23.11.1 to 24.0.0.
- [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-v23.11.1...puppeteer-core-v24.0.0)

---
updated-dependencies:
- dependency-name: puppeteer-core
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 20:12:22 +01:00
70e9552145 Build(deps): Bump exifr from 1.4.0 to 1.4.1 (#30701)
Bumps [exifr](https://codeberg.org/rwv/exifr) from 1.4.0 to 1.4.1.

---
updated-dependencies:
- dependency-name: exifr
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 20:10:00 +01:00
b35d6a6a15 Build(deps-dev): Bump lefthook from 1.10.1 to 1.10.3 (#30702)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.10.1 to 1.10.3.
- [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.10.1...v1.10.3)

---
updated-dependencies:
- dependency-name: lefthook
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 19:29:43 +01:00
d223d866ba Build(deps): Bump @babel/standalone in the babel group (#30700)
Bumps the babel group with 1 update: [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.26.4 to 7.26.5
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.5/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-10 19:29:22 +01:00
b4cb8cb204 DEV: Move 'symlinking fonts' message to STDERR (#30699)
Having it in stdout means it pollutes the output of some scripts & rake tasks, which then gets piped to other tooling
2025-01-10 18:02:16 +00:00
6a50b3d4b4 FIX: removes blank spacing in message actions (#30697)
This is a regression of https://github.com/discourse/discourse/pull/28277
2025-01-10 17:34:22 +01:00
85f7778563 DEV: Add reviewables:mass-handle rake task (#30658)
This commit introduces a new rake task that can be used in situations where a community receives a large number of flags/reports and needs a quick way to handle all of those pending reports. Usage instructions are included in the rake task source code.

Internal topic: t/145475.
2025-01-10 19:22:43 +03:00
b96a9b9896 FIX: simplify body scroll lock on iOS (#30696)
This will have the following advantages:
- removes a very annoying bug which was making text selection super hard on iOS
- removes the flashing of header when transitioning from disable to enable body scroll lock
2025-01-10 17:13:48 +01:00
07e5f8907e DEV: Consolidate mobile positioning strategies on mobile and iPad (#30241)
This removes some longstanding Safari iOS positioning hacks and refactors the mobile positioning strategy across Safari, Chrome and Firefox. See PR descriptions for more details. 

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-01-10 11:00:15 -05:00
ce97e51b63 UX: Improve git blob oneboxes (#30694)
Rearranges the info at the top of github/gitlab 'blob' oneboxes to make them easier to read
2025-01-10 11:49:36 +00:00
690ffcf1d5 UX: Add DPageHeader to watched words and color palettes (#30686)
Part of our admin UI consistency efforts, this is a stop-gap
until we can do a further UI review of these pages.
2025-01-10 15:32:10 +10:00
d566cbbf45 DEV: Add missing root breadcrumb to API keys page (#30690)
Addressing a couple minor inconsistencies on the admin API keys page.

1. Add missing "Admin" root breadcrumb.
2. De-titleize "API Keys" -> "API keys".
2025-01-10 13:19:34 +08:00
4a78999b6f DEV: Add new admin UI header to site texts page (#30689)
This adds the new admin UI header to the site texts page.
2025-01-10 13:19:14 +08:00
8719235cfd DEV: update deprecated icon name archive to box-archive in chat plugin (#30687) 2025-01-10 12:59:56 +08:00
b1bae9b785 FIX: Add back missing API key 'peek' step (#30683)
In #30096 we converted the API keys UI to follow the new admin UI guidelines.

During this conversion, the step where you get a chance to copy the API key after creating, was lost due to a rebase mistake.

This re-introduces it.
2025-01-10 10:21:22 +08:00
f4b417462b UX: Final pass of admin setting pages (#30682)
This commit finalises the admin setting page consistency
efforts by:

* Converting all route templates into .gjs
* Adding `@hideTabs={{true}}` for all the page headers so we
  don't show a border line when it's not needed
* Introduce `@showBreadcrumb` and default to true for
  AdminAreaSettings, for all these pages the Settings part of
  the breadcrumb is redundant
2025-01-10 11:03:07 +10:00
c99a8dcfe7 Revert "UX: use font with more glyphs for discobot certificates" (#30681)
This reverts commit 55914bf9a3086570e21db8eb04347f27d54a1392.
2025-01-09 18:56:47 -05:00
05e1ca1de6 Build(deps-dev): Bump @glint/environment-ember-loose from 1.5.0 to 1.5.1 (#30680)
Bumps [@glint/environment-ember-loose](https://github.com/typed-ember/glint) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/typed-ember/glint/releases)
- [Changelog](https://github.com/typed-ember/glint/blob/main/.release-it.yml)
- [Commits](https://github.com/typed-ember/glint/compare/1.5.0...1.5.1)

---
updated-dependencies:
- dependency-name: "@glint/environment-ember-loose"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-09 23:36:40 +01:00
06c90614f7 Build(deps): Bump ace-builds from 1.37.3 to 1.37.4 (#30679)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.37.3 to 1.37.4.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.37.3...v1.37.4)

---
updated-dependencies:
- dependency-name: ace-builds
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-09 23:14:23 +01:00
28c5761d87 Build(deps): Bump google-protobuf from 4.29.2 to 4.29.3 (#30678)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 4.29.2 to 4.29.3.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

---
updated-dependencies:
- dependency-name: google-protobuf
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-09 22:41:17 +01:00
5c4be8fc1c Build(deps-dev): Bump parallel_tests from 4.8.0 to 4.9.0 (#30677)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 4.8.0 to 4.9.0.
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/grosser/parallel_tests/compare/v4.8.0...v4.9.0)

---
updated-dependencies:
- dependency-name: parallel_tests
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-09 22:40:41 +01:00
d91c48cece FIX: correct emoji picker size in modal (#30675)
Following a change in b1e40d04b9 the width of the picker has been reduced in modals when it should have been reduced only when NOT in a modal.
2025-01-09 21:53:49 +01:00