Commit Graph

55679 Commits

Author SHA1 Message Date
dependabot[bot]
85b8410001
Build(deps-dev): Bump rubocop-rails from 2.25.1 to 2.26.0 (#28529)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.25.1 to 2.26.0.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.25.1...v2.26.0)

---
updated-dependencies:
- dependency-name: rubocop-rails
  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>
2024-08-26 08:47:31 +08:00
dependabot[bot]
fa00cf023c
Build(deps): Bump css_parser from 1.17.1 to 1.19.0 (#28530)
Bumps [css_parser](https://github.com/premailer/css_parser) from 1.17.1 to 1.19.0.
- [Changelog](https://github.com/premailer/css_parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/premailer/css_parser/compare/v1.17.1...v1.19.0)

---
updated-dependencies:
- dependency-name: css_parser
  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>
2024-08-26 08:47:17 +08:00
dependabot[bot]
70c12e93e6
Build(deps-dev): Bump test-prof from 1.4.0 to 1.4.1 (#28531)
Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/test-prof/test-prof/releases)
- [Changelog](https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/test-prof/test-prof/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: test-prof
  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-08-26 08:47:01 +08:00
Alan Guo Xiang Tan
b586f2cb98
DEV: Don't hardcode number of parallel processes for QUnit (#28535) 2024-08-26 08:42:35 +08:00
Martin Brennan
e58e7a49f5
FIX: Bookmark reminder was clearing incorrectly (#28506)
Followup 76c56c8284

The change introduced above made it so the expired
bookmark reminders were cleared when using the bulk
action menu for bookmarks. However this also affected
clearing reminders for bookmarks when sending notifications.

When clearing bookmark reminders after sending notifications,
we take into account the auto delete preference:

* never          - The bookmark `reminder_at` date should not be cleared,
                   and the bookmark is kept.
* clear_reminder - The bookmark `reminder_at` date is cleared and
                   the bookmark is kept

The `never` option made it so "expired" bookmark reminder show
on the user's bookmark list.

This commit fixes the change from the other commit and only
forces clearing of `reminder_at` if using the bookmark bulk
action service.
2024-08-26 09:17:39 +10:00
Blake Erickson
274e18622e
FIX: Video uploads sometimes hang indefinitely (#28523)
If there is a codec issue or something trying to process a video file
for thumbnail generation, uploads could hang indefinitely. This fix
  ensures that we continue the upload process even if we encounter an
  error trying to generate a thumbnail for it.
2024-08-23 15:58:54 -06:00
Keegan George
b1a369ab13
UX: Make keyboard shortcut styling more subtle (#28522) 2024-08-23 13:31:53 -07:00
Osama Sayegh
a7cd523faf
FIX: Refresh the edit tag section when navigating to another tag (#28519)
If you’re viewing a tag and you switch to a different tag via the sidebar or the tags dropdown, after expanding the info section of the tag page via the wrench button, the info section keeps showing the previous tag's details instead of the new one.

This happens because the tag info section makes an ajax request to load the tag's details, and this request is made inside the `didInsertElement` hook which is only fired once when the component is rendered. To fix this, we need to set the result from the ajax request to null and add a `didUpdateAttrs` hook to trigger another request to load the info of the new tag.

Internal topic: t/134809.
2024-08-23 20:08:24 +03:00
chapoi
208007d9a0
UX: centralise DMenu mobile styling + fixes (#28469) 2024-08-23 17:56:35 +02:00
Joffrey JAFFEUX
6bdda3cb71
FIX: prevents creating post from impacting the app (#28518)
Create a topic can fail in many different ways and we don't want this to impact the rest of the application, the call will now be wrapped in a begin/rescue block and log an error if it fails.
2024-08-23 15:17:16 +02:00
Jarek Radosz
5a8e7c5f29
DEV: Convert admin charts to glimmer/gjs (#28271) 2024-08-23 14:59:56 +02:00
Joffrey JAFFEUX
fee8caf529
FIX: correctly reset form before destroying it (#28516)
This change is preventing the "is dirty check" from happening when clicking delete on this form. This was not good UX and was also causing bugs by leaving the form in a unexpected state.
2024-08-23 14:58:31 +02:00
David Taylor
fe6c91daa3
DEV: Convert select-kit subclasses to native class syntax (#28491)
This covers all select-kit subclasses in core and core plugins

Followup to https://github.com/discourse/discourse/pull/28489
2024-08-23 13:19:26 +01:00
Osama Sayegh
bb04a1e0d3
DEV: Small copyedit to visitors stats notice (#28514) 2024-08-23 15:07:07 +03:00
David Taylor
87ae3f689c
DEV: Convert mapping-router to native class syntax (#28513) 2024-08-23 12:58:19 +01:00
David Taylor
d1cc60c435
DEV: Convert select-kit components to native class syntax (#28489)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-23 12:17:07 +01:00
Joffrey JAFFEUX
2829b670f9
DEV: adds support for replaceText in toolbarEvent (#28512)
This function was available in textarea manipulation mixin, but not exposed as other functions like addText, applySurround, ...
2024-08-23 11:44:27 +02:00
Alan Guo Xiang Tan
17db30ab7e
DEV: Avoid hardcoding PARALLEL_TEST_PROCESSORS in tests workflow (#28511)
This allows to maximize the CPU cores when the tests workflow is ran on
a larger runner.
2024-08-23 16:56:09 +08:00
Alan Guo Xiang Tan
21bb28df91
PERF: Ensure suggested topics is only loaded on last page of topic view (#28507)
This commit improves `TopicsController#show` to not load suggested and
related topics unless it is the last page of the topic's view.
Previously, we avoided loading suggested and related topics by the use
of conditionals in the `TopicViewSerializer` to avoid calling
`TopicView#suggested_topics` and `TopicView#related_topics`. However,
this pattern is not reliable as the methods can still be called from
other spots in the code base. Instead, we ensure that
`TopicView#include_suggested` and `TopicView#include_related` is set
correctly on the instance of `TopicView` which ensures that for the
given instance, `TopicView#suggested_topics` and
`TopicView#related_topics` will be a noop.
2024-08-23 16:10:50 +08:00
Alan Guo Xiang Tan
b83a2a34a4
DEV: Update app-cache cache key for tests workflow (#28508)
We cannot just key on `runner.os` the number of CPU cores matter as
well. Therefore, we need to key on `runner.name` instead since each
runner has its own unique OS and CPU cores. Technically, two different
runner with different names can have the same `os` and `cpu cores` but
we don't have that problem now.
2024-08-23 11:13:03 +08:00
dependabot[bot]
1ac7482271
Build(deps): Bump @babel/standalone in the babel group (#28500)
Bumps the babel group with 1 update: [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.25.3 to 7.25.4
- [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.25.4/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>
2024-08-23 01:51:58 +02:00
dependabot[bot]
cd4efb8d68
Build(deps-dev): Bump webpack from 5.93.0 to 5.94.0 (#28501)
Bumps [webpack](https://github.com/webpack/webpack) from 5.93.0 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.93.0...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  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>
2024-08-23 01:51:21 +02:00
Sam
7ab7e6bb23
FEATURE: allow plugins to specify keyboard shortcuts for hidden toolbar items (#28456)
Previous to this change there is no clean way to apply keyboard shortcuts
to things such as "add poll" and other hidden options in the toolbar

This allows shortcuts to be specified similar to how they are on the toolbar



Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-08-23 09:28:28 +10:00
dependabot[bot]
02af4fb5b8
Build(deps): Bump mini_sql from 1.5.0 to 1.6.0 (#28475)
Bumps [mini_sql](https://github.com/discourse/mini_sql) from 1.5.0 to 1.6.0.
- [Changelog](https://github.com/discourse/mini_sql/blob/main/CHANGELOG)
- [Commits](https://github.com/discourse/mini_sql/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: mini_sql
  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>
2024-08-23 06:56:12 +08:00
dependabot[bot]
ec6c8ae482
Build(deps): Bump rexml from 3.3.5 to 3.3.6 (#28498)
Bumps [rexml](https://github.com/ruby/rexml) from 3.3.5 to 3.3.6.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.3.5...v3.3.6)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-23 06:55:43 +08:00
dependabot[bot]
4f5b830027
Build(deps): Bump the rails group with 6 updates (#28499)
Bumps the rails group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [actionmailer](https://github.com/rails/rails) | `7.1.3.4` | `7.1.4` |
| [actionpack](https://github.com/rails/rails) | `7.1.3.4` | `7.1.4` |
| [actionview](https://github.com/rails/rails) | `7.1.3.4` | `7.1.4` |
| [activerecord](https://github.com/rails/rails) | `7.1.3.4` | `7.1.4` |
| [activesupport](https://github.com/rails/rails) | `7.1.3.4` | `7.1.4` |
| [railties](https://github.com/rails/rails) | `7.1.3.4` | `7.1.4` |


Updates `actionmailer` from 7.1.3.4 to 7.1.4
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1/actionmailer/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.1.4)

Updates `actionpack` from 7.1.3.4 to 7.1.4
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1/actionpack/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.1.4)

Updates `actionview` from 7.1.3.4 to 7.1.4
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1/actionview/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.1.4)

Updates `activerecord` from 7.1.3.4 to 7.1.4
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1/activerecord/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.1.4)

Updates `activesupport` from 7.1.3.4 to 7.1.4
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1/activesupport/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.1.4)

Updates `railties` from 7.1.3.4 to 7.1.4
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1/railties/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.1.4)

---
updated-dependencies:
- dependency-name: actionmailer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rails
- dependency-name: actionpack
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rails
- dependency-name: actionview
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rails
- dependency-name: activerecord
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rails
- dependency-name: activesupport
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rails
- dependency-name: railties
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rails
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-23 06:55:21 +08:00
dependabot[bot]
7e01abdcd8
Build(deps): Bump activejob from 7.1.3.4 to 7.1.4 (#28503)
Bumps [activejob](https://github.com/rails/rails) from 7.1.3.4 to 7.1.4.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1/activejob/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.1.4)

---
updated-dependencies:
- dependency-name: activejob
  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-08-23 06:54:57 +08:00
dependabot[bot]
4e9d7c8e2e
Build(deps): Bump activemodel from 7.1.3.4 to 7.1.4 (#28504)
Bumps [activemodel](https://github.com/rails/rails) from 7.1.3.4 to 7.1.4.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.2.1/activemodel/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.1.4)

---
updated-dependencies:
- dependency-name: activemodel
  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>
2024-08-23 06:54:38 +08:00
Joffrey JAFFEUX
eb70b3bc93
DEV: adds more fields to topic fabricator (#28497) 2024-08-22 23:01:17 +02:00
Kris
ecc2ffc78a
UX: adjust software update banner for headerless pages (#28496) 2024-08-22 16:51:26 -04:00
Kris
828c34451e
UX: don't use split subcategory color in docked header (#28494) 2024-08-22 16:36:59 -04:00
Kris
fd4f7868ca
UX: fix textarea height on mobile (#28495) 2024-08-22 16:31:48 -04:00
Blake Erickson
b53df4d884
FIX: Videos not uploading due to thumbnail generation error (#28493)
If we don't get a `videoWidth` back for a video don't try and generate a
thumbnail for it.

Also as part of this change I switched getImageData, the function
throwing the error, to use video.videoWidth instead of canvas.width
because it's very likely we were setting canvas.width too early before
the width could be read. Now that we are reading the value inside of the
setTimeout hopefully we will actually have a width. Just incase we don't
detect a width we will now exit early instead of throwing an error.

We only need to check for `0` and not null because the value is an
integer and will always return a 0 if it can't be read. https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/videoWidth

See https://meta.discourse.org/t/322363
2024-08-22 13:35:18 -06:00
Joffrey JAFFEUX
842d2749a1
FIX: adds chat-draw-expanded class to body (#28490)
To achieve this, the code is now using bodyClass instead of relying on the addChatDrawerStateCallback`.
2024-08-22 17:46:41 +02:00
David Taylor
5fa0496f81
DEV: fixup select-kit pluginApiIdentifiers typo (#28487)
Followup to 3e3c051164
2024-08-22 16:36:24 +01:00
锦心
ac365a86a2
FIX: Trigger user_logged_out event when the user logs out (#28482)
What did this fix?
===============

Previously, we only triggered this event in the `user.logged_out` method.
This resulted in the event being triggered only when the user was logged
out by the administrator or the site had strict logout mode enabled.
This bug affected customers who managed user status via webhooks.

meta topic: https://meta.discourse.org/t/user-log-out-event-not-triggered-in-webhooks/249464
2024-08-22 21:48:27 +08:00
David Taylor
819d07469d
DEV: fixup themes:install:archive flag (#28486)
Followup to a69f3a0880
2024-08-22 13:22:37 +01:00
Osama Sayegh
67cde14a61
DEV: Use Service::Base for suspend and silence actions (#28459)
This commit moves the business logic in the `Admin::UsersController#suspend` and `Admin::UsersController#silence` actions to dedicated service classes. There's no functional changes in this commit.

Internal topic: t/130014.
2024-08-22 14:38:56 +03:00
David Taylor
58c4528a1c
DEV: Replace silent theme-install fails with exceptions (#28485)
Previously, we were silently failing when a theme hit SSRF protection, or the `git clone` command failed for some reason. This commit updates them to be exceptions, so they provide more useful error messages
2024-08-22 12:09:56 +01:00
David Taylor
a69f3a0880
DEV: Add env to themes:install:archive to allow skipping child themes (#28484) 2024-08-22 12:07:27 +01:00
Osama Sayegh
6997b3c5ce
FIX: Hide heading when there's no custom description (#28470)
In the new /about page, when there's no extended description provided by the admin, the "About" heading above the description should not be displayed.
2024-08-22 13:47:19 +03:00
Loïc Guitaut
f11f2b983f DEV: Put back the model step in HandleCategoryUpdated service
Now that `ActiveRecord` relations are properly handled in a `model`
step, putting this step back will allow the service to stops its
execution if there are no users to be removed without calling the pretty
big SQL query contained in the `CalculateMembershipsForRemoval` action.
2024-08-22 12:33:58 +02:00
dependabot[bot]
9d367cc9a1
Build(deps): Bump ace-builds from 1.35.5 to 1.36.0 (#28471)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.35.5 to 1.36.0.
- [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.35.5...v1.36.0)

---
updated-dependencies:
- dependency-name: ace-builds
  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>
2024-08-22 12:22:31 +02:00
David Taylor
50c10de459
DEV: Update GitHub Actions runners to ubuntu 22.04 (#28481) 2024-08-22 11:09:39 +01:00
Régis Hanol
4b49e358fb
FIX: skip 1:1s when chat search returns users (#28464)
When we use CTRL/CMD + K to search, on the server we run 4 queries:

- 1 for users
- 1 for groups
- 1 for category channels
- 1 for direct message channels

The server returns up to 10 results per type and the client concatenate all the results (in the order I described) and then takes the first 10 or so.

Let's say you've had 1:1s with john1, john2, and john3. Searching for “john” would return all the johns as “users”. It doesn’t make sense to also return them as 1:1 dms.

That’s what this fixes. When the search returns some users, we skip all 1:1s because we assume they will show up as the results of the “users” query.

We’ll always return matching direct messages with more than 2 users (aka. “group chats”). All 3 other queries (users, groups, and category channels) are unaffected.

Internal ref - t/136079
2024-08-22 11:35:13 +02:00
dependabot[bot]
13938984c2
Build(deps-dev): Bump puppeteer-core from 23.1.0 to 23.1.1 (#28473)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 23.1.0 to 23.1.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.1.0...puppeteer-core-v23.1.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-08-22 11:00:42 +02:00
Joffrey JAFFEUX
905b4f900e
DEV: adds tag to core fabricators (#28480) 2024-08-22 10:49:00 +02:00
David Taylor
c91dcd0447
DEV: Convert core components to native class syntax (batch 1) (#28465)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-22 09:39:28 +01:00
David Taylor
3e3c051164
DEV: Convert select-kit base classes to native class syntax (#28467)
This lays the groundwork for converting SelectKit subclasses to native class syntax. This commit is designed to be entirely backwards-compatible, so it should not affect any existing subclasses.

Of interest:

- Any properties which are designed to be overridden by subclasses are implemented using a local `@protoProp` decorator. That means they are applied to the prototype, so that they can be overridden in subclasses by both legacy `.extend()` prototype extensions, and by modern native-class fields.

- New class decorators are introduced: `@selectKitOptions` and `@pluginApiIdentifiers`. These are native class versions of the legacy `concatenatedProperties` system. This follows the pattern Ember has introduced for `@className`, `@classNameBindings`, etc.
2024-08-22 09:39:03 +01:00
Martin Brennan
ebbe23e4d2
UX: Add title token for What's New admin page (#28476)
Followup e60b808f49,
I missed adding it here.
2024-08-22 14:36:32 +10:00