Commit Graph

56646 Commits

Author SHA1 Message Date
David Taylor
216845e4c7
DEV: Deprecate template overrides (#29544)
Template overrides have been advised against for a long time, and are increasingly hard to maintain as Discourse's development accelerates. This commit officially deprecates this customization method, which will be removed in the not-too-distant future (likely in the first half of 2025).
2024-11-04 17:38:33 +00:00
Jarek Radosz
9c5fc6f1df
DEV: Add more-topics plugin API (#29143)
From plugin-api comment:

Registers a new tab to be displayed in "more topics" area at the bottom of a topic page.

```gjs
 api.registerMoreTopicsTab({
   id: "other-topics",
   name: i18n("other_topics.tab"),
   component: <template>tbd</template>,
   condition: ({ topic }) => topic.otherTopics?.length > 0,
 });
```

You can additionally use more-topics-tabs value transformer to conditionally show/hide
specific tabs.

```js
api.registerValueTransformer("more-topics-tabs", ({ value, context }) => {
  if (context.user?.aFeatureFlag) {
    // Remove "suggested" from the topics page
    return value.filter(
      (tab) =>
        context.currentContext !== "topic" ||
        tab.id !== "suggested-topics"
    );
  }
});
```
2024-11-04 17:32:49 +01:00
Keegan George
7a936da05c
DEV: Auto grid images no longer experimental (#29572)
Recently we added a new feature for automatically gridding images in the composer (https://github.com/discourse/discourse/pull/29260). After testing this feature under a setting for a short period of time, the feature is no longer experimental anymore.

This PR removes the site setting `experimental_auto_grid_images`.
2024-11-04 08:21:40 -08:00
Kris
1d637c5243
UX: remove extra margin from PM small actions (#29571) 2024-11-04 10:53:35 -05:00
Renato Atilio
b061fd9cc2
DEV: refactor textarea from d-editor (#29411)
Refactors the DEditor component making it textarea-agnostic.
2024-11-04 12:48:10 -03:00
Renato Atilio
6459ab9320
UX: allow anon users to download calendar (#29551)
Allows anonymous users to download the calendar file. Before, they were given the option, but it would fail silently with a `TypeError: Cannot read properties of null (reading 'user_option')`.
2024-11-04 12:35:45 -03:00
Kris
d853b5384b
UX: align PM icon when editing title, allow shrink-to-fit (#29570) 2024-11-04 10:31:11 -05:00
Jarek Radosz
380974ce00
DEV: Use hasAttribute/hasAria/hasStyle in tests (#29568) 2024-11-04 11:30:38 +01:00
Jarek Radosz
9694d2477a
DEV: Convert more notOk assertions (#29556)
…to either qunit-dom or `strictEqual`
2024-11-04 10:27:30 +01:00
Jarek Radosz
693a4e691b
DEV: Replace ok(true) assertions (#29555)
…with `verifySteps`, `expect(0)`, or by removing it
2024-11-04 10:27:11 +01:00
Joffrey JAFFEUX
584a9d98ed
DEV: adds is-disabled modifier to form field container (#29567)
We already had a data-attribute, but a class feels more natural in this case.
2024-11-04 17:57:40 +09:00
Joffrey JAFFEUX
88eb96b315
DEV: sets an icon_upload_id on a channel (#29566)
There's no UI for it at the moment but when creating a channel or updating it, it's now possible to pass `icon_upload_id` as param. This will be available on the channel as `icon_upload_url`.
2024-11-04 17:19:44 +09:00
Joffrey JAFFEUX
932bd6ba85
UX: logs when an automation is destroyed (#29565)
A `UserHistory` entry will now be created when an automation is destroyed. This is visible in `/admin/logs/staff_action_logs`. id, name, trigger and script will be logged.

This commit also creates a service `DestroyAutomation` to hold all the destroy automation logic.

---------
Co-authored-by: Martin Brennan <mjrbrennan@gmail.com>
2024-11-04 11:12:18 +09:00
dependabot[bot]
a43bd24c67
Build(deps): Bump @faker-js/faker from 9.1.0 to 9.2.0 (#29562)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 9.1.0 to 9.2.0.
- [Release notes](https://github.com/faker-js/faker/releases)
- [Changelog](https://github.com/faker-js/faker/blob/next/CHANGELOG.md)
- [Commits](https://github.com/faker-js/faker/compare/v9.1.0...v9.2.0)

---
updated-dependencies:
- dependency-name: "@faker-js/faker"
  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-11-03 23:18:38 +01:00
dependabot[bot]
f5b8a2d9ad
Build(deps-dev): Bump lint-to-the-future-eslint from 2.1.3 to 2.2.0 (#29563)
Bumps [lint-to-the-future-eslint](https://github.com/mansona/lint-to-the-future-eslint) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/mansona/lint-to-the-future-eslint/releases)
- [Changelog](https://github.com/mansona/lint-to-the-future-eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mansona/lint-to-the-future-eslint/commits)

---
updated-dependencies:
- dependency-name: lint-to-the-future-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>
2024-11-03 23:18:23 +01:00
dependabot[bot]
a5cad6640a
Build(deps): Bump date from 3.3.4 to 3.4.0 (#29561)
Bumps [date](https://github.com/ruby/date) from 3.3.4 to 3.4.0.
- [Release notes](https://github.com/ruby/date/releases)
- [Commits](https://github.com/ruby/date/compare/v3.3.4...v3.4.0)

---
updated-dependencies:
- dependency-name: date
  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-11-03 23:17:57 +01:00
pgcd
725d2411e5
This commit fixes an undesirable geometric query memory usage introduced in b908abe35a (#29539)
I have been unable to figure out a way of testing this usefully (as I fear it would require creating several thousands of objects), but existing tests pass and a manual test with ~400k topics succeeds after the fix, while it would hang indefinitely and/or consume all disk space before the fix.

I have reported the initial problem and my findings in https://meta.discourse.org/t/topic-reset-all-highest-exhausts-all-available-disk-space/333837
2024-11-04 09:00:03 +11:00
dependabot[bot]
f4865a4288
Build(deps-dev): Bump rubocop-ast from 1.33.0 to 1.33.1 (#29560)
Bumps [rubocop-ast](https://github.com/rubocop/rubocop-ast) from 1.33.0 to 1.33.1.
- [Release notes](https://github.com/rubocop/rubocop-ast/releases)
- [Changelog](https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-ast/compare/v1.33.0...v1.33.1)

---
updated-dependencies:
- dependency-name: rubocop-ast
  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-11-03 22:51:05 +01:00
dependabot[bot]
d5595284ea
Build(deps): Bump oj from 3.16.6 to 3.16.7 (#29558)
Bumps [oj](https://github.com/ohler55/oj) from 3.16.6 to 3.16.7.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.16.6...v3.16.7)

---
updated-dependencies:
- dependency-name: oj
  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-11-03 22:50:51 +01:00
Joffrey JAFFEUX
ce76b88eb2
DEV: start/stop reply implementation (#29542)
* DEV: join/leave presence chat-reply when streaming

This commit ensures that starting/stopping a chat message with the streaming option will automatically make the creator of the message as present in the chat-reply channel.

* implements start/stop reply

* not needed
2024-11-04 08:14:35 +11:00
Joffrey JAFFEUX
279fc846db
FEATURE: adds support for headings in chat (#29552)
```
```

Will now be converted into their html versions: <h1>, <h2>, <h3>, ...
2024-11-04 08:11:53 +11:00
Jarek Radosz
b81055a6d4
DEV: Convert more equal assertions (#29554)
…to either qunit-dom or `strictEqual`
2024-11-03 21:04:38 +01:00
Jarek Radosz
d2056c7fc6
DEV: Update checklist tests (#29553) 2024-11-03 21:04:22 +01:00
dependabot[bot]
ba7f4e3c63
Build(deps-dev): Bump webpack from 5.96.0 to 5.96.1 (#29545)
Bumps [webpack](https://github.com/webpack/webpack) from 5.96.0 to 5.96.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.96.0...v5.96.1)

---
updated-dependencies:
- dependency-name: webpack
  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-11-03 16:26:55 +01:00
Mark VanLandingham
deeed5b8c1
DEV: Add 'custom' WebHook event type group (#29549) 2024-11-01 13:30:37 -05:00
David Taylor
323013d9c7
DEV: restore topic argument for after-topic-status outlet (#29550)
Followup to dd329d55
2024-11-01 18:25:40 +00:00
Sérgio Saquetim
4863b2ab7e
DEV: Added value transformers that mutate the value instead of returning it (#29537) 2024-11-01 14:23:46 -03:00
Bianca Nenciu
723dc1fa55
Dev fix some types (#29547)
The primary key is usually a bigint column, but the foreign key columns
are usually of integer type. This can lead to issues when joining these
columns due to mismatched types and different value ranges.

This was using a temporary plugin / test API to make tests pass. After
more careful consideration, we concluded that it is safe to alter the
tables directly.
2024-11-01 19:19:25 +02:00
David Taylor
09e16a3c0d
DEV: Hide composer diffhtml/morphlex setting (#29548)
This has a number of known bugs, and we're unsure whether we'll be continuing development on it

(internal t/108372)
2024-11-01 16:02:15 +00:00
benj
cfc23c43e9
FEATURE - Add username column to custom emoji table (#29522)
* Adds emoji column for creator username
2024-11-01 10:32:59 -05:00
David Taylor
68c7c8e25d
DEV: Deprecate mobile-specific templates (#29514)
We are moving away from the mobile-specific template pattern in favor of logical `{{#if}}` statements. This brings us closer to a standard Ember app, makes testing easier, and reduces duplicate code.

This commit includes some minor refactoring in the resolver & component-templates initializer, so that the mobile lookups happen on desktop, without actually being used. This allows us to print the deprecation message consistently, to improve visibility to developers.
2024-11-01 14:51:12 +00:00
Osama Sayegh
397d41008e
FIX: Account for sidebars with no primary links when adding invite link (#29535)
Meta topic: https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876?u=osama.

Follow up to 19672faba6.

The migration that adds the invite link to the sidebar determines the position of the link by looking up the max position that a primary link has and inserts the invite link at the max position plus 1. This approach works fine for most sites, however, sites that have deleted all primary links from the sidebar will fail because the max position will be `nil` which blows up the migration.

This commit addresses this edge case by falling back to looking up the min position of secondary links,    or to zero if there're also no secondary links, and then inserts the invite link at the min position minus 1.
2024-11-01 10:31:21 +03:00
David Battersby
8aa4c39c3c
DEV: allow non focused tab to be primary tab in service worker (#29516)
Follow up to #29388 - when there are no clients in focus, we should take the first visible client as the primary tab.
2024-11-01 09:42:33 +04:00
Martin Brennan
9c17588f6a
FIX: Admin dashboard tooltips not working on mobile (#29538)
This commit fixes the (?) tooltips for reports on
the admin dashboard on mobile.

The fix is that float-kit instances can now have different triggers
and un-triggers for mobile and desktop, and float-kit is now aware
of the site being in mobile view.

Example usage:

```
@triggers={{hash mobile=(array "click")}}
```

So now, if you press on the tooltip trigger on mobile it shows
correctly, and on desktop both hover and click can be used.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-11-01 12:25:12 +10:00
Martin Brennan
254cf22559
FIX: Allow target attribute in translation overrides (#29503)
Some of our translations are HTML and have `target='_blank'`
included, we should allow the same when sanitizing input for
translation overrides.
2024-11-01 09:48:07 +10:00
Martin Brennan
bb13e18855
UX: Use correct case for "Add Flag" button (#29505)
Per https://meta.discourse.org/t/formatting-text-in-discourse-documentation-and-uis/324637
2024-11-01 09:47:53 +10:00
dependabot[bot]
dd768119aa
Build(deps-dev): Bump webpack from 5.95.0 to 5.96.0 (#29534)
Bumps [webpack](https://github.com/webpack/webpack) from 5.95.0 to 5.96.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.95.0...v5.96.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-10-31 23:48:47 +01:00
dependabot[bot]
816babe387
Build(deps-dev): Bump @swc/core from 1.7.40 to 1.7.42 (#29526)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.40 to 1.7.42.
- [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.40...v1.7.42)

---
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-10-31 23:20:54 +01:00
Sam
e7f62ab52b
FEATURE: add custom fields to chat (channel/message/thread) (#29504)
This allows various extensions to store extra information the 3 most popular
chat entities

Useful for certain plugins and migrations
2024-11-01 09:12:19 +11:00
dependabot[bot]
29d3b9b03e
Build(deps-dev): Bump rubocop from 1.67.0 to 1.68.0 (#29531)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.67.0 to 1.68.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.67.0...v1.68.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>
2024-10-31 23:02:47 +01:00
dependabot[bot]
87b52a2d58
Build(deps-dev): Bump parser from 3.3.5.0 to 3.3.5.1 (#29530)
Bumps [parser](https://github.com/whitequark/parser) from 3.3.5.0 to 3.3.5.1.
- [Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitequark/parser/compare/v3.3.5.0...v3.3.5.1)

---
updated-dependencies:
- dependency-name: parser
  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-10-31 23:02:29 +01:00
dependabot[bot]
618f4d4dd9
Build(deps): Bump jspreadsheet-ce from 4.14.0 to 4.15.0 (#29528)
Bumps [jspreadsheet-ce](https://github.com/jspreadsheet/ce) from 4.14.0 to 4.15.0.
- [Release notes](https://github.com/jspreadsheet/ce/releases)
- [Commits](https://github.com/jspreadsheet/ce/commits)

---
updated-dependencies:
- dependency-name: jspreadsheet-ce
  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-10-31 22:51:49 +01:00
dependabot[bot]
779aacbcf5
Build(deps-dev): Bump ember-qunit from 8.1.0 to 8.1.1 (#29527)
Bumps [ember-qunit](https://github.com/emberjs/ember-qunit) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/emberjs/ember-qunit/releases)
- [Commits](https://github.com/emberjs/ember-qunit/compare/v8.1.0...v8.1.1)

---
updated-dependencies:
- dependency-name: ember-qunit
  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-10-31 22:35:05 +01:00
dependabot[bot]
2caf5d79ba
Build(deps): Bump @embroider/addon-shim in the embroider group (#29524)
Bumps the embroider group with 1 update: [@embroider/addon-shim](https://github.com/embroider-build/embroider/tree/HEAD/packages/addon-shim).


Updates `@embroider/addon-shim` from 1.8.9 to 1.9.0
- [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/addon-shim)

---
updated-dependencies:
- dependency-name: "@embroider/addon-shim"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-31 22:31:28 +01:00
dependabot[bot]
db194ac38b
Build(deps-dev): Bump @types/qunit in the types group (#29525)
Bumps the types group with 1 update: [@types/qunit](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/qunit).


Updates `@types/qunit` from 2.19.11 to 2.19.12
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/qunit)

---
updated-dependencies:
- dependency-name: "@types/qunit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-31 22:31:10 +01:00
Keegan George
71f808dea9
DEV: Improve method of presenting link clicks (#29453)
Currently the tracking for clicked links are injected into the HTML in a span tag. This leads to the link counter value being highlighted when copying and pasting. Additionally, any means for using CSS to hide link counters result in a gap due to it occupying a specific width.

With this change, we make link counters appear in a data attribute on the link element and visually shown with CSS `::after` element.
2024-10-31 12:44:08 -07:00
Régis Hanol
927054b01e
FIX: duplicate topics in digests / summaries (#29517)
When using the `digest_suppress_tags` site setting to list some tags that should be removed from the digests, if there was a topic that had one suppressed tag and other regular tag(s), it would be duplicated in the summaries.

https://meta.discourse.org/t/multiple-repeated-summary-mail-entries/296539

Thanks to @scossar for [figuring it out](https://meta.discourse.org/t/multiple-repeated-summary-mail-entries/296539/30).
2024-10-31 18:22:41 +01:00
Kris
3fb3e3560e
REVERT: "A11Y: topic list links should not be headings (#27700)" (#29520)
This reverts commit 72a5389459.
2024-10-31 12:42:55 -04:00
David Taylor
210a295a87
DEV: Remove mobile template for subcategories-with-featured-topics (#29513)
We are moving away from the mobile-specific template pattern in favor of logical `{{#if}}` statements. This brings us closer to a standard Ember app, makes testing easier, and reduces duplicate code.
2024-10-31 16:12:16 +00:00
David Taylor
8300380287
DEV: Remove mobile-specific template for sub-category-* (#29512)
We are moving away from the mobile-specific template pattern in favor of logical `{{#if}}` statements. This brings us closer to a standard Ember app, makes testing easier, and reduces duplicate code.
2024-10-31 16:12:00 +00:00