Commit Graph

55507 Commits

Author SHA1 Message Date
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
Martin Brennan
e60b808f49
UX: Apply new admin UI guidelines to What's New (#28454) 2024-08-22 10:28:29 +10:00
Jan Cernik
5090a56aa2
UX: Show topic map in topics without replies by default (#28468) 2024-08-21 17:41:50 -03:00
Joffrey JAFFEUX
5eca77dd70
FIX: ensures href is not set two times (#28466)
This would cause the infamous error:

```
index.js:118 Uncaught (in promise)
Error: Assertion Failed: You attempted to update `href` on `<ExtraNavItem:ember384>`, but it had already been used previously in the same computation.
```

Moreover, set didnt seem necessary here.
2024-08-21 20:27:21 +02:00
Renato Atilio
676f0897ac
FIX: subfolder account activation (#28463) 2024-08-21 13:50:38 -03:00
Kris
70ea3f8fcd
UX: improve mention colors for dark color schemes (#28462) 2024-08-21 11:45:48 -04:00
Jarek Radosz
cee2605d88
FIX: Lost outer context in #each block in hbr (#28461)
Regressed 3.5 years ago in e80332a2bc :P
2024-08-21 17:11:36 +02:00
Osama Sayegh
b69a7ea824
FIX: Specify @type arg for the image uploader in the about config area (#28460)
Specifying the type is required for the uploader to work on sites that use S3 uploads.
2024-08-21 16:35:32 +03:00
David Taylor
150f5694dc
FIX: Write stylesheet cache atomically (#28457)
In some situations, the filesystem cache will be read and persisted to the database. If the file being read is still being written, then that can lead to empty/partial caches being stored in the database.

This commit ensures that cannot happen by switching to our `atomic_write_file` helper (which writes to a temp file, and then does an atomic `mv` operation to move it to the destination)
2024-08-21 12:44:17 +01:00
Martin Brennan
9dd47ca755
UX: Fix restore info link on admin backups page (#28452)
Followup 1446596089

The link to inform admins that restore is disabled
was not correct. This fixes it and also changes it
to go to /admin/backups/settings
2024-08-21 13:23:24 +10:00
Martin Brennan
8632ea5a63
UX: Apply admin UI guidelines to custom flags (#28433)
This commit changes the custom flags admin config area
to use the AdminPageHeader component and conforms
to the new admin UI guidelines. Also makes some slight
modifications to the reusable components to handle using
a @route for an action button.
2024-08-21 10:42:00 +10:00
dependabot[bot]
8079560441
Build(deps-dev): Bump rspec-expectations from 3.13.1 to 3.13.2 (#28451)
Bumps [rspec-expectations](https://github.com/rspec/rspec-expectations) from 3.13.1 to 3.13.2.
- [Release notes](https://github.com/rspec/rspec-expectations/releases)
- [Changelog](https://github.com/rspec/rspec-expectations/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-expectations/compare/v3.13.1...v3.13.2)

---
updated-dependencies:
- dependency-name: rspec-expectations
  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-21 01:04:33 +02:00
dependabot[bot]
e1855da40d
Build(deps-dev): Bump ember-cli from 5.10.0 to 5.11.0 (#28449)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 5.10.0 to 5.11.0.
- [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/v5.10.0...v5.11.0)

---
updated-dependencies:
- dependency-name: ember-cli
  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-21 00:54:06 +02:00
dependabot[bot]
3d217dc6b3
Build(deps): Bump ace-builds from 1.35.4 to 1.35.5 (#28450)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.35.4 to 1.35.5.
- [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.4...v1.35.5)

---
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>
2024-08-21 00:52:25 +02:00
Sérgio Saquetim
649cbad216
DEV: Use the glimmer header in the Styleguide (#28427) 2024-08-20 19:44:26 -03:00
Osama Sayegh
eb0b2c9308
FIX: Use correct subtitle for Site contact name field (#28448)
A copy-and-paste error resulted in using the wrong subtitle for the "Site contact name" field in the admin config area for the /about page.
2024-08-21 01:21:49 +03:00
Kris
6c159241c9
UX: view count in topic map should always be at least 1 (#28447) 2024-08-20 17:26:09 -04:00
Osama Sayegh
10ae7ef44a
FEATURE: Add estimated number of global and EU visitors to the about page (#28382)
This commit implements 2 new metrics/stats in the /about page for the _estimated_ numbers of unique visitors from the EU and the rest of the world. This new feature is currently off by default, but it can be enabled by turning on the hidden `display_eu_visitor_stats` site settings via the rails console.

There are a number of assumptions that we're making here in order to estimate the number of unique visitors, specifically:

1. we're assuming that the average of page views per anonymous visitor is similar to the average number of page views that a logged-in visitor makes, and
2. we're assuming that the ratio of logged in visitors from the EU is similar to the ratio of anonymous visitors from the EU

Discourse keeps track of the number of both logged-in and anonymous page views, and also the number of unique logged-in visitors and where they're from. So with those numbers and the assumptions above, we can estimate the number of unique anonymous visitors from the EU and the rest of the world.

Internal topic: t/128480.
2024-08-21 00:03:42 +03:00
Mark VanLandingham
9802d4040f
DEV: Add class to span wrapping after-topic-list plugin outlet (#28445) 2024-08-20 14:08:06 -05:00
David Taylor
0b2b3f6d6f
DEV: Show ember-cli build progress when using bin/ember-cli -u (#28443)
`bin/ember-cli -u` buffers the output of ember-cli, which means progress is not shown clearly. This commit uses `TERM=dumb` to put ember-cli into a more simple mode, which outputs progress on separate lines. Also adds a `[ember-cli]` prefix to all output.
2024-08-20 19:20:47 +01:00
Tobias Eigen
5916eaac13
Update client.en.yml (#28442)
changed "contact us at email" to "contact email", which is shorter and reads well even if site is run by an individual.
2024-08-20 10:26:03 -07:00
Discourse Translator Bot
9f32bef544
Update translations (#28438) 2024-08-20 17:54:10 +02:00
Ted Johansson
948e7bd55e
DEV: Allow disabling problem checks programatically (#28440)
We need a way to disable certain checks programatically, e.g. on Discourse hosting. This PR adds a configuration option for this, and makes it so that disabled checks aren't run as part of #run_all.
2024-08-20 16:42:06 +02:00