Commit Graph

57293 Commits

Author SHA1 Message Date
Jarek Radosz 8613468ff5
Merge branch 'main' into 0-a-no-nest 2025-01-03 12:49:28 +01:00
Natalie Tay 91f7ae2741
DEV: Allow export user archive (job) to be requested and sent to an admin (#30543)
It is not possible for an admin to generate a suspended user's archive now, disallowing SAR (subject access requests) under the GDPR.

This commit expands the export_user_archive job to allow specifying a requesting_user_id which will send the archive to an admin. When not specified, this defaults to the user itself.
2025-01-03 14:27:10 +08:00
Osama Sayegh 5a55c9062a
DEV: Add reviewables:populate rake task (#30540)
Adds a new reviewables:populate rake task that works in a similar fashion to the existing *:populate rake tasks. The rake task creates pending reviewable of all core types, with possibility for plugins to extend the task to populate their own reviewable types.
2025-01-03 10:05:04 +08:00
Martin Brennan 4aa7a89371
DEV: Round 1 converting admin site setting components to gjs (#30526)
Converts the following site setting components:

* Bool
* Category
* Colors
* Category
* CompactList
* EmojiList
2025-01-03 11:34:28 +10:00
Martin Brennan 8d5c4ecc33
FIX: Dashboard report change tooltip was not translated (#30541)
Use i18n in the JS code instead of concatenating English
strings.

c.f. https://meta.discourse.org/t/titles-on-graphs-in-community-health-dashboard-are-not-localized/302776/8?u=martin
2025-01-03 11:20:29 +10:00
Martin Brennan 3260654505
UX: Admin setting page consistency - Notifications (#30528)
Followup c2282439b3

Make the Notifications config page reached from the sidebar
use our consistent site setting page rules.
2025-01-03 10:34:40 +10:00
dependabot[bot] 8316277b4b
Build(deps-dev): Bump unicode-display_width from 3.1.2 to 3.1.3 (#30476)
Bumps [unicode-display_width](https://github.com/janlelis/unicode-display_width) from 3.1.2 to 3.1.3.
- [Changelog](https://github.com/janlelis/unicode-display_width/blob/main/CHANGELOG.md)
- [Commits](https://github.com/janlelis/unicode-display_width/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: unicode-display_width
  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-02 22:25:07 +01:00
dependabot[bot] 6656f07bb8
Build(deps): Bump jwt from 2.9.3 to 2.10.1 (#30477)
Bumps [jwt](https://github.com/jwt/ruby-jwt) from 2.9.3 to 2.10.1.
- [Release notes](https://github.com/jwt/ruby-jwt/releases)
- [Changelog](https://github.com/jwt/ruby-jwt/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jwt/ruby-jwt/compare/v2.9.3...v2.10.1)

---
updated-dependencies:
- dependency-name: jwt
  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-02 22:24:53 +01:00
Guhyoun Nam b552d7214b
DEV: Add PluginOutlet on full-page-search-above-search-header and filters (#30454)
This PR adds PluginOutlets on full-page-search-above-search-header and full-page-search-filters.
2025-01-02 14:35:10 -06:00
Isaac Janzen b1602d0e7f
DEV: Add `topic-list-item-expand-pinned` value transformer (#30537)
- Add `topic-list-item-expand-pinned` value transformer
2025-01-02 13:51:46 -06:00
Bryce Huhtala b3772e23bf
UX: inherit font-size for code in headings (#30536)
* UX: inherit font-size for code in headings

* UX: use descendant selector

* FIX: linting
2025-01-02 13:30:01 -05:00
Renato Atilio eb58623b11
UX: replace partially written emoji when using picker on chat (#30517)
After searching for an emoji through the autocomplete, when a user uses the emoji picker (to see the full list of emojis) and selects one, the content in the chat composer would contain both the partially written emoji and the full :selected_emoji: code.

The actual fix is just re-using the emojiSelected method from TextManipulation.
2025-01-02 12:29:18 -03:00
dependabot[bot] d270cef08e
Build(deps): Bump sanitize from 6.1.3 to 7.0.0 (#30504)
Bumps [sanitize](https://github.com/rgrove/sanitize) from 6.1.3 to 7.0.0.
- [Release notes](https://github.com/rgrove/sanitize/releases)
- [Changelog](https://github.com/rgrove/sanitize/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rgrove/sanitize/compare/v6.1.3...v7.0.0)

---
updated-dependencies:
- dependency-name: sanitize
  dependency-type: direct:production
  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-02 15:18:40 +01:00
dependabot[bot] c8fb8dcbac
Build(deps): Bump ffi from 1.17.0 to 1.17.1 (#30505)
Bumps [ffi](https://github.com/ffi/ffi) from 1.17.0 to 1.17.1.
- [Changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ffi/ffi/commits)

---
updated-dependencies:
- dependency-name: ffi
  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-02 15:18:15 +01:00
Joffrey JAFFEUX 35f8b1d5d3
DEV: use isFocused dom helper (#30533) 2025-01-02 15:02:20 +01:00
David Taylor a21eefd142
UX: tweak suppress_secured_categories_from_admin setting description (#30532)
https://meta.discourse.org/t/344065/10
2025-01-02 13:10:28 +00:00
dependabot[bot] 8c94e17b6b
Build(deps): Bump the highlightjs group across 1 directory with 2 updates (#30465)
Bumps the highlightjs group with 2 updates in the / directory: [@highlightjs/cdn-assets](https://github.com/highlightjs/highlight.js) and [highlight.js](https://github.com/highlightjs/highlight.js).


Updates `@highlightjs/cdn-assets` from 11.10.0 to 11.11.1
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/main/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/11.10.0...11.11.1)

Updates `highlight.js` from 11.10.0 to 11.11.1
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/main/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/11.10.0...11.11.1)

---
updated-dependencies:
- dependency-name: "@highlightjs/cdn-assets"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: highlightjs
- dependency-name: highlight.js
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: highlightjs
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 13:37:16 +01:00
dependabot[bot] 72d7d683a6
Build(deps-dev): Bump ember-cli-deprecation-workflow from 3.0.2 to 3.1.0 (#30492)
Bumps [ember-cli-deprecation-workflow](https://github.com/ember-cli/ember-cli-deprecation-workflow) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/ember-cli/ember-cli-deprecation-workflow/releases)
- [Changelog](https://github.com/ember-cli/ember-cli-deprecation-workflow/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli-deprecation-workflow/commits)

---
updated-dependencies:
- dependency-name: ember-cli-deprecation-workflow
  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-02 13:18:48 +01:00
dependabot[bot] 4e00f3ab24
Build(deps-dev): Bump lefthook from 1.10.0 to 1.10.1 (#30475)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.10.0 to 1.10.1.
- [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.0...v1.10.1)

---
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-02 13:18:39 +01:00
dependabot[bot] d345cbef06
Build(deps-dev): Bump @swc/core from 1.10.1 to 1.10.4 (#30502)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.1 to 1.10.4.
- [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.1...v1.10.4)

---
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-02 13:05:10 +01:00
dependabot[bot] 3961a17528
Build(deps-dev): Bump concurrently from 9.1.0 to 9.1.2 (#30518)
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 9.1.0 to 9.1.2.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v9.1.0...v9.1.2)

---
updated-dependencies:
- dependency-name: concurrently
  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-02 12:29:47 +01:00
dependabot[bot] ca229dbbcc
Build(deps): Bump loofah from 2.23.1 to 2.24.0 (#30520)
Bumps [loofah](https://github.com/flavorjones/loofah) from 2.23.1 to 2.24.0.
- [Release notes](https://github.com/flavorjones/loofah/releases)
- [Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/loofah/compare/v2.23.1...v2.24.0)

---
updated-dependencies:
- dependency-name: loofah
  dependency-type: direct:production
  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-02 12:29:39 +01:00
dependabot[bot] 0e64745fbc
Build(deps): Bump dry-initializer from 3.1.1 to 3.2.0 (#30521)
Bumps [dry-initializer](https://github.com/dry-rb/dry-initializer) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/dry-rb/dry-initializer/releases)
- [Changelog](https://github.com/dry-rb/dry-initializer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dry-rb/dry-initializer/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: dry-initializer
  dependency-type: direct:production
  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-02 12:29:27 +01:00
Joffrey JAFFEUX 9b7fc3797e
UX: do not tab to an already active tab (#30531) 2025-01-02 12:28:57 +01:00
Joffrey JAFFEUX 80cda1212e
DEV: do not check for loading state (#30530)
This shouldn't be necessary and is already causing flakyness today.
2025-01-02 11:08:23 +01:00
Joffrey JAFFEUX a5ba788a23
DEV: allows d-menu to refocus trigger (#30522) 2025-01-02 09:31:15 +01:00
Ella E. e04af92740
UX: Add highlight for active nav in admin secondary sidebar (#30486)
This PR makes the secondary sidebar in the admin UI more consistent
navigation experience:

* Added a coloured background for links on hover
* Replaced the bold text and line style with a distinct background
highlight, ensuring it complements the admin sidebar while maintaining
its own identity
* Bringing in arrow indicators to match the active navigation state in
the category settings

### Before
<img width="488" alt="image"
src="https://github.com/user-attachments/assets/aa843766-0ed7-435a-8880-6f0598aa4782"
/>


### After
<img width="475" alt="image"
src="https://github.com/user-attachments/assets/ec31bab9-0f51-4757-ab06-95a961ae17ee"
/>
2025-01-01 23:50:16 -07:00
Kelv 50ac0a5702
DEV: refactor singleton mixin to class decorator (#30498)
Refactors the Singleton mixin into a class decorator that directly mutates target classes with the same static property & functions as the mixin. This maintains the public interface of such singleton classes.

Classes refactored to use the singleton class decorator:

Session
User
Site
I removed singleton functionality from LogsNotice since services are already singletons and what we had previously defined in its customized createCurrent method could be replaced by directly injecting the relevant services into the class. This also allowed us to get rid of the logs-notice initializer.

We are adding a deprecation warning to the Singleton mixin instead of deleting since there are plugins that could still be using it.
2025-01-02 12:57:48 +08:00
Martin Brennan 6b36b0b68d
FIX: Reports did not respect user locale (#30524)
Our bulk report endpoint uses `hijack`, which does not
use the current user's locale via the `with_resolved_locale`
method in `ApplicationController`. This is happening because
we are doing `around_action` to set the locale, then calling
the code in the block inside the action directly when we use
`hijack`.

We can fix this by capturing `I18n.locale` when starting the
hijack then using `I18n.with_locale` when evaluating the
block inside `hijack`, this way the translations will always
use the correct locale based on the current user.
2025-01-02 13:05:53 +10:00
Martin Brennan 9a12eb5c3c
FIX: Wizard branding step null logo (#30523)
Followup 3135f472e2

Fixes an issue where the wizard branding step would
error if SiteSetting.logo was null, this did not come
up during testing because in our testing discourse-logo-sketch-small.png
is used for the logo settings.
2025-01-02 10:44:31 +10:00
Martin Brennan 3135f472e2
FEATURE: Improve wizard quality and rearrange steps (#30055)
This commit contains various quality improvements to
our site setup wizard, along with some rearrangement of
steps to improve the admin setup experience and encourage
admins to customize the site early to avoid "all sites look the
same" sentiment.

#### Step rearrangement

* “Your site is ready” from 3 → 4
* “Logos” from 4 → 5
* “Look and feel” from 5 → 3

#### Font selector improvements

Changes the wizard font selector dropdown to show
a preview of all fonts with a CSS class so you don't
have to choose the font to get a preview.

Also makes the fonts appear in alphabetical order.

#### Preview improvements

Placeholder text changed from lorem ipsum to actual topic titles,
category names, and post content. This makes it feel more "real".

Fixes "undefined" categories. Added a date to the topic timeline.

Fixes button rectangles and other UI elements not changing in
size when the font changed, leading to cut off text which looked super
messy. Also fixed some font color issues.

Fixed table header alignment for Latest topic list.

#### Homepage style selector improvements

Limited the big list of homepage styles to Latest, Hot, Categories with latest topics,
and Category boxes based on research into the most common options.

#### Preview header

Changed the preview header to move the hamburger to the left
and add a chat icon

#### And more!

Changed the background of the wizard to use our branded blob style.
2025-01-02 09:28:23 +10:00
Martin Brennan c2282439b3
UX: Move first settings admin route to config page (#30510)
For consistency, we are updating all sidebar links that
point to an /admin/customize/site_settings URL to their
own config pages, in preparation for more focused config
pages in future. This will mitigate the issue we have now,
which is that every sidebar link you click showing a different
UI to admins.

This commit moves admin/config/login-and-authentication to
establish the pattern.
2025-01-02 09:13:37 +10:00
Martin Brennan 5711bf6f27
DEV: Move admin config pages out of /customize/ sub-route (#30511)
The customize routes add CSS classes that make these admin
config pages look different from the ones under /admin/config.
We want all config routes to be under /admin/config as well.

This commit moves the emoji, user fields, and permalinks pages
out of customize and into config, updating all references and
adding more rails routes as needed.

Also renames admin emojis route to emoji, emoji is singular and plural.
2025-01-02 09:13:11 +10:00
Penar Musaraj 2ff3f44b95
DEV: User page layout backwards compatibility (#30515)
Followup to #30499, fixes CSS for older browsers.
2024-12-31 11:43:49 -05:00
Régis Hanol d523c37057
FIX: correctly extract body and/or reply from exchange emails (#30512)
When receiving emails sent with Exchange, we look for some markers to identify the body of the mail and the reply (aka. previous email).

For some reasons, those markers aren't 100% reliable and sometimes, only one of them is present.

The commit 20ba54d536 introduced the bug because the `HTML_EXTRACTERS` regex for exchange looks for either `messageBodySection` or `messageReplySection` but we were only using the `reply` section. So if an email had only the `body` section, it would not be correctly extracted.

This commit handle the cases where either one of them is missing and use the other one as the actual "reply". When both are present, it correctly elides the "reply" section.
2024-12-31 15:29:36 +01:00
zogstrip 9497a6165f DEV: refactor email_controller.rb
- Make an `includes(:user)` explicit rather than implicit.
- Refactor the `unsubscribe` action to bail early when `key` is invalid
2024-12-31 15:28:59 +01:00
zogstrip 4d889f2ef8 FEATURE: add support for One-Click unsubscribe (RFC 8058)
We were missing the "List-Unsubscribe-Post" header in emails we sent to allow Yahoo / GMail and others to automagically show a link to unsubscribe.

Internal ref - t/144713
2024-12-31 15:28:59 +01:00
Gary Pendergast 25351bdb8e
FIX: Switch back to using a temp table for moving posts. (#30509) 2024-12-31 17:02:27 +11:00
Sam 9b9babdd72
FEATURE: allow disabling of anti spam profile hiding feature (#30508)
The profile hiding feature is particularly problematic on sites that are
private (invite only or must approve users) so it is unconditionally disabled.

Also certain sites may prefer to disable the anti spam feature, they can
opt out using `hide_new_user_profiles`


Co-authored-by: Martin Brennan <martin@discourse.org>
2024-12-31 15:04:53 +11:00
Ella E. d1b3b85584
DEV: Add element wrapper to the body and screenshot (#30497) 2024-12-30 18:09:04 -07:00
Gary Pendergast 86637403c7
UX: Add Sentence Casing for Setting Names (#30479) 2024-12-31 09:55:53 +11:00
Penar Musaraj 2ffcb94c8b
A11Y: Fix screen reader access to user directory (#30499) 2024-12-31 08:10:00 +11:00
Osama Sayegh 429fc91b2e
DEV: Fix build (#30501)
Follow-up to https://github.com/discourse/discourse/pull/30471

We've merged a PR that requires an entry for all site settings in the keywords section in `server.en.yml`, and I merged my previous PR without rebasing my branch so I didn't catch the new failure.
2024-12-30 23:02:18 +03:00
Osama Sayegh 3187606d34
FEATURE: Add option to hide full name input at signup (#30471)
This commit replaces the `full_name_required` setting with a new `full_name_requirement` setting to allow more flexibility with the name field in the signup form. The new setting has 2 options, "Required at signup" and "Optional at signup", which are equivalent to the true/false possibilities of the old setting, and a third option "Hidden at signup" that hides the name field from the signup form, making it effectively optional too.

New sites will have the "Hidden at signup" option as the default option, and existing site will continue to use the option that maps to their current configuration.

Internal topic: t/136746.
2024-12-30 22:26:20 +03:00
Sérgio Saquetim b728b74c49
DEV: Add showLogin action to post menu buttons and prevent text selection (#30500)
This commit adds `showLogin` as an available action to the post menu buttons. They can use this action to show the login form when there is no user logged in.

It also adds a small CSS tweak to prevent the content from the post menu to being user selectable. This was causing small UX issues in touch devices.
2024-12-30 15:57:07 -03:00
Angus McLeod ce7a14104b
Add user api key client rate limit settings (#30402) 2024-12-30 11:10:48 -05:00
Renato Atilio 9a22e8d2f1
DEV: fix cancel swipe callback typo (#30491) 2024-12-30 12:45:06 -03:00
communiteq bc3b38db19
FIX: correct topics and posts count in import:ensure_consistency rake task (#30104)
After running the rake task the post and topics counts where way off. When investigating, I found this six-year-old #TODO. It was an easy fix.
2024-12-30 15:15:18 +01:00
David Taylor bf35f7f860
DEV: Add deprecations for topic-status raw-view modifications (#30496)
This will make the 'auto' glimmer-topic-list feature aware of these modifications, so that the new topic-list will not be enabled until they're resolved.
2024-12-30 11:35:23 +00:00
David Taylor 9c83872a4e
PERF: Refactor and optimize splash screen implementation (#30373)
- Remove JS

- Remove "Loading..." text. This has been been broken for a while due to some conflicting discourse-ai CSS. Also, animating the `content:` property like this requires the browser to repaint/reflow, which cannot be done while JS is executing.

- Replace animated SVG with divs animated via CSS. When JS is executing, browsers pause animations of transform properties inside SVGs. This limitation does not exist on regular CSS animations. So with this change, the animation continues smoothly even you run an infinite loop in JS.

  To ensure the splash screen remains "contentful" for LCP purposes, an SVG background-image is used

There is no change to the visual look of the animation
2024-12-30 11:31:08 +00:00