Commit Graph

55698 Commits

Author SHA1 Message Date
Martin Brennan
36fc587f4c
DEV: pnpm ember-template-lint should not use run command (#28726)
On pre-commit, various people were getting an error like this:

> ERR_PNPM_NO_SCRIPT Missing script: ember-template-lint

This was because in our lefthook config we were doing
`pnpm run ember-template-lint` rather than the correct
`pnpm ember-template-lint`
2024-09-04 16:19:11 +10:00
David Battersby
fdcf4698fc
UX: Update Chat Group Name and Placeholder (#28703)
* UX: Update Chat Group Name and Placeholder

* update tests

* fix failing tests

* better checking of system user when setting dm title
2024-09-04 15:52:23 +10:00
Guhyoun Nam
93564bfa7d
DEV: Approved Post Webhook Event Category Update (#28725)
'Post approved by category experts' is moved to the post category
2024-09-04 13:58:17 +09:00
Martin Brennan
4f21a93a79
UX: Update post_menu and post_menu_hidden_items copy (#28723)
These settings are misleading since plugins and themes
and theme components can rearrange and add buttons to
the post menu. Better to indicate this in the setting
description.
2024-09-04 13:37:47 +10:00
Osama Sayegh
280adda09c
FEATURE: Support designating multiple groups as mods on category (#28655)
Currently, categories support designating only 1 group as a moderation group on the category. This commit removes the one group limitation and makes it possible to designate multiple groups as mods on a category.

Internal topic: t/124648.
2024-09-04 04:38:46 +03:00
Alan Guo Xiang Tan
7092d88ee4
DEV: Remove redundant step in tests workflow (#28716)
Base image no longer ships with Chromium so no need to remove it
2024-09-04 07:53:49 +08:00
dependabot[bot]
b27c8eee93
Build(deps-dev): Bump rspec-rails from 7.0.0 to 7.0.1 (#28718)
Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 7.0.0 to 7.0.1.
- [Changelog](https://github.com/rspec/rspec-rails/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-rails/compare/v7.0.0...v7.0.1)

---
updated-dependencies:
- dependency-name: rspec-rails
  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>
2024-09-04 01:28:01 +02:00
dependabot[bot]
7aa8cdd1f9
Build(deps-dev): Bump rspec-core from 3.13.0 to 3.13.1 (#28717)
Bumps [rspec-core](https://github.com/rspec/rspec-core) from 3.13.0 to 3.13.1.
- [Release notes](https://github.com/rspec/rspec-core/releases)
- [Changelog](https://github.com/rspec/rspec-core/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-core/compare/v3.13.0...v3.13.1)

---
updated-dependencies:
- dependency-name: rspec-core
  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>
2024-09-04 01:27:53 +02:00
dependabot[bot]
536b0e641c
Build(deps-dev): Bump @ember/test-helpers from 4.0.2 to 4.0.3 (#28722)
Bumps [@ember/test-helpers](https://github.com/emberjs/ember-test-helpers) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/emberjs/ember-test-helpers/releases)
- [Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/commits)

---
updated-dependencies:
- dependency-name: "@ember/test-helpers"
  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>
2024-09-04 01:26:16 +02:00
David Taylor
023236d600
DEV: Convert card-contents-base from mixin to base class (#28709)
* DEV: Convert card-contents-base from mixin to base class

This allows us to convert it to native class syntax

Mixins are essentially deprecated, and will not be receiving native class syntax support. In this case, there is no real need for it to be a mixin, so a base class makes sense.
2024-09-04 07:51:40 +10:00
Renato Atilio
289249303c
UX: avoid flashing error when loading form template (#28700) 2024-09-03 17:41:20 -03:00
dependabot[bot]
460b875d03
Build(deps-dev): Bump @swc/core from 1.7.22 to 1.7.23 (#28694)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.22 to 1.7.23.
- [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.7.22...v1.7.23)

---
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>
2024-09-03 19:28:30 +01:00
Kris
653ee734db
FIX: don't use post ID as timeline collapse delay (#28712) 2024-09-03 14:01:59 -04:00
Bianca Nenciu
5d7fdfb0a6
DEV: Use recorded runtime log for plugin specs (#28711)
The recorded runtime log was specified when running the plugin specs,
but it failed to match the entries from the runtime log and the passed
as command line arguments because the runtime log entries were not
prefixed with `./`.
2024-09-03 20:36:46 +03:00
Discourse Translator Bot
0171eb0c94
Update translations (#28705) 2024-09-03 11:46:50 -04:00
Penar Musaraj
8c19104866
FIX: Passkey login when Discourse used as SSO provider (#28672)
Co-authored-by: Osama Sayegh <asooomaasoooma90@gmail.com>
2024-09-03 11:46:23 -04:00
dependabot[bot]
393c2f61ea
Build(deps-dev): Bump puppeteer-core from 23.2.1 to 23.2.2 (#28701)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 23.2.1 to 23.2.2.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v23.2.1...puppeteer-core-v23.2.2)

---
updated-dependencies:
- dependency-name: puppeteer-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>
2024-09-03 15:54:45 +01:00
dependabot[bot]
a9696902bb
Build(deps-dev): Bump lefthook from 1.7.14 to 1.7.15 (#28693)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.7.14 to 1.7.15.
- [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.7.14...v1.7.15)

---
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>
2024-09-03 15:46:25 +01:00
David Taylor
c9e8c9eeaf
DEV: Drop @discourse/ember-instantsearch dependency (#28707)
This was part of the `https://github.com/discourse/discourse-instant-search` experiment, which is no longer under development. If that changes, this dependency can be reintroduced.
2024-09-03 15:24:25 +01:00
David Taylor
967af18c4b
DEV: Use blob URL to install discourse/squoosh fork (#28704)
Workaround for https://github.com/dependabot/dependabot-core/issues/10124
2024-09-03 13:52:37 +01:00
Osama Sayegh
dbe7613352
DEV: Add PluginOutlets from the old /about page to the new one (#28695)
The old /about page has 3 plugin outlets: one after the description, one after the admins list, and one after the mods list. These outlets translate cleanly to the new /about page, so we should add them to it to make plugins/themes compatible with the new page.
2024-09-03 14:02:07 +03:00
Loïc Guitaut
db168a09d1
DEV: Ignore .pnpm-store directory (#28699) 2024-09-03 11:24:20 +01:00
Joffrey JAFFEUX
e418f7056f
FIX: prevents PM to large groups (#28681)
This commit introduces a new hidden site setting: `group_pm_user_limit`, default to `1000` which will raise an error when attempting to create a PM target a large group.
2024-09-03 12:08:14 +02:00
David Taylor
80b9c280ba
DEV: Switch to pnpm for JS dependencies (#28671)
This will bring significant improvements to install speed & storage requirements. For information on how it may affect you, see https://meta.discourse.org/t/324521

This commit:
- removes the `yarn.lock` and replaces with `pnpm-lock.yaml`
- updates workspaces to pnpm format
- adjusts package dependencies to work with pnpm's stricter resolution strategy
- updates Rails app to load modules from more specific node_modules directories
- adds a `.pnpmfile` which automatically cleans up old yarn-managed `node_modules` directories
- updates various scripts to call `pnpm` instead of `yarn`
- updates patches to use pnpm's native patch system instead of patch-package
- adds a patch for licensee to support pnpm
2024-09-03 10:51:07 +01:00
Loïc Guitaut
9b4b5b5028 FIX: Return proper results when searching for a topic in Japanese
Currently, when the default locale is Japanese, the search for a topic
using its URL, path or ID doesn’t work as expected. It will either
return wrong results or no result at all.

The problem lies with how we process the provided terms in Japanese
mode. For example, if `http://localhost/t/-/55` is provided, currently
this will result in `http localhost t 5 5` to be searched for.

This patch addresses the issue by checking whether the provided term
needs segmenting. If the provided term is a number, or a path or a full
URL, then it doesn’t need segmenting. When that happens we skip the
processing we normally apply for Japanese, making the search return the
expected results.
2024-09-03 09:48:58 +02:00
Natalie Tay
cc873977ec
DEV: Ensure unique notification level per tag user (#28638)
TagUser.rb is used to set user notification levels for a tag, we don't have a unique index on the notification level itself. This means that there might be some weird case where a user may have multiple of the same notification level on a tag.

This PR adds a migration which de-duplicates this based on defaults, where we keep the earliest record in the event there is multiple notification level per-user-per-tag.
2024-09-03 15:43:02 +08:00
Linca
74c9b5c11c
FIX: Keep the original URLParams in navigation item (#28696)
Originally, we assumed that the href passed to the NavigationItem must
not have URLParams, and roughly appended URLParams such as
`?order=created` to the end. This will result in something like
`/latest?state=my_votes?order=created` (note the double question mark
here), for example the discourse-topic-voting plugin

This commit modifies the logic for appending URLParams to the end,
ensuring that the original URL parameters are preserved.
2024-09-03 15:16:52 +08:00
Daniel Waterworth
baf41790dd
PERF: Don't do initialization for every DB if RAILS_DB is set (#28668) 2024-09-03 15:56:46 +10:00
Kelv
a455567f9e
DEV: make UserPassword 1:1 to User (#28528)
* add data migration to keep only unexpired or most recently expired user password
* refactor to 1:1 relationship between User and UserPassword
* add migration to remove redundant indexes on user passwords
2024-09-03 11:09:33 +08:00
dependabot[bot]
49ba9f93fc
Build(deps-dev): Bump rspec-rails from 6.1.4 to 7.0.0 (#28691)
Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 6.1.4 to 7.0.0.
- [Changelog](https://github.com/rspec/rspec-rails/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-rails/compare/v6.1.4...v7.0.0)

---
updated-dependencies:
- dependency-name: rspec-rails
  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>
2024-09-03 10:33:21 +08:00
dependabot[bot]
0604472a31
Build(deps): Bump logger from 1.6.0 to 1.6.1 (#28689)
Bumps [logger](https://github.com/ruby/logger) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/ruby/logger/releases)
- [Commits](https://github.com/ruby/logger/compare/v1.6.0...v1.6.1)

---
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>
2024-09-03 10:33:06 +08:00
dependabot[bot]
b96fa619fd
Build(deps): Bump zeitwerk from 2.6.17 to 2.6.18 (#28690)
Bumps [zeitwerk](https://github.com/fxn/zeitwerk) from 2.6.17 to 2.6.18.
- [Changelog](https://github.com/fxn/zeitwerk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fxn/zeitwerk/compare/v2.6.17...v2.6.18)

---
updated-dependencies:
- dependency-name: zeitwerk
  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>
2024-09-03 10:32:50 +08:00
Osama Sayegh
9780f0fd52
UX: Adjustments for the about page banner image (#28692)
Meta topic: https://meta.discourse.org/t/new-about-banner-cut-off-on-mobile/324354?u=osama
2024-09-03 02:36:28 +03:00
Krzysztof Kotlarek
7577231ba2
DEV: the ability to define setting areas (#28570)
A new setting attribute is used to define the areas (separated by `|`).

In addition, endpoint `/admin/config/site_settings.json` accepts new `filter_area` data.
2024-09-03 09:25:45 +10:00
Guhyoun Nam
050c665160
FEATURE: Added Category Experts approved WebHook Event (#28525)
This PR is adding a Category Experts WebHook event type.
2024-09-03 06:59:15 +09:00
Joffrey JAFFEUX
153175d676
DEV: removes unused intergation.rake (#28687)
This is dead code which won't even run.
2024-09-02 21:37:49 +02:00
Joffrey JAFFEUX
0a1432e1cc
FIX: ensures global notices are destroyed on post created (#28684)
Prior to this fix we could exit early if tags was `[]` as `tags && (tags & post.topic.tags.map(&:name)).empty?` would have returned true. This commit ensures it's not the case anymore and adds a test for it.

Co-Authored-By: Martin Brennan <mjrbrennan@gmail.com>
2024-09-02 21:17:10 +02:00
Joffrey JAFFEUX
b771d3173f
FIX: ensures default required validator handles 0 (#28686)
Prior to this fix `0` would be erroring as non-existing and would raise the required error.
2024-09-02 20:46:04 +02:00
David Taylor
c180d1db1e
DEV: Update sample vscode config (#28685)
- Update extension recommendations and move under `.vscode/extensions.json`
- Update sample tasks/settings, and move under `.vscode/settings.json.sample` and `.vscode/tasks.json.sample`

`.vscode/settings.json` and `.vscode/tasks.json` remain gitignored, so will not be overwritten by this commit
2024-09-02 19:05:45 +01:00
Discourse Translator Bot
b1e539c1b9
Update translations (#28682) 2024-09-02 18:00:43 +02:00
Joffrey JAFFEUX
b4f8ea6ade
FIX: correctly pass updateGroupings to the modal (#28683)
A previous refactor has moved this function in the controller instead of the route making it inaccessible to the modal.

This commit is fixing this and also adding a spec.
2024-09-02 17:32:18 +02:00
David Battersby
997fbc9757
FEATURE: Add ability to watch chat threads (#28639)
This change introduces a new thread notification level allowing users to get notified when someone replies to the thread.

Users who watch a thread will get a green notification on the chat icon and a user notification (blue). User notifications are consolidated based on thread id to prevent cluttering the original users notification area.

---------

Co-authored-by: Régis Hanol <regis@hanol.fr>
2024-09-02 16:45:55 +04:00
David Taylor
cef1dcfc7d
DEV: Support passing component class to RenderGlimmer (#28660)
In particular, this allows us to use gjs `<template>` for RenderGlimmer, registerWidgetShim, and decorateCooked's `helper.renderGlimmer`.

```js
// Simple component class:
registerWidgetShim(
  "render-glimmer-test-component-shim",
  "div.initial-wrapper-class",
  SimpleComponent
);
```

```gjs
// Or an inline `<template>`
registerWidgetShim(
  "render-glimmer-test-component-shim",
  "div.initial-wrapper-class",
  <template>Hello world</template>
);
```
2024-09-02 11:21:46 +01:00
David Taylor
a31dc0a84a
DEV: Raise an exception if trying to set a readonly column with default (#27416) 2024-09-02 10:09:40 +01:00
David Taylor
583c932173
DEV: Refactor complex initializers into classes (#28661)
We're working to remove all decorators from object-literal-properties. This commit refactors all initializers which were using these decorators into classes, where decorators are allowed. Also adds cleanup logic to the local-dates initializer, which was previously missing.
2024-09-02 10:08:07 +01:00
David Taylor
8b2009cd44
DEV: Skip babel for ace-builds and json-editor (#28659)
This will avoid warnings: "The code generator has deoptimised the styling of {path} as it exceeds the max of 500KB."

Should also provide a tiny improvement in build times
2024-09-02 10:07:43 +01:00
David Taylor
3fb3ef7c85
FIX: Mini-profiler CSP nonce when in report-only mode (#28664) 2024-09-02 10:04:47 +01:00
dependabot[bot]
b7164f1283
Build(deps-dev): Bump puppeteer-core from 23.2.0 to 23.2.1 (#28651)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 23.2.0 to 23.2.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v23.2.0...puppeteer-core-v23.2.1)

---
updated-dependencies:
- dependency-name: puppeteer-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>
2024-09-02 10:14:08 +02:00
dependabot[bot]
a88b0d3f10
Build(deps-dev): Bump @swc/core from 1.7.21 to 1.7.22 (#28678)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.21 to 1.7.22.
- [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.7.21...v1.7.22)

---
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>
2024-09-02 10:06:59 +02:00
dependabot[bot]
72896d44b8
Build(deps-dev): Bump the embroider group with 4 updates (#28677)
Bumps the embroider group with 4 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat), [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core), [@embroider/macros](https://github.com/embroider-build/embroider/tree/HEAD/packages/macros) and [@embroider/webpack](https://github.com/embroider-build/embroider/tree/HEAD/packages/webpack).


Updates `@embroider/compat` from 3.6.0 to 3.6.1
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat)

Updates `@embroider/core` from 3.4.14 to 3.4.15
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/core)

Updates `@embroider/macros` from 1.16.5 to 1.16.6
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/macros)

Updates `@embroider/webpack` from 4.0.4 to 4.0.5
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/webpack)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/macros"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/webpack"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 10:06:40 +02:00