Commit Graph

32240 Commits

Author SHA1 Message Date
Régis Hanol
b908abe35a
FIX: keep topic.word_count in sync (#27065)
Whenever one creates, updates, or deletes a post, we should keep the `topic.word_count` counter in sync.

Context - https://meta.discourse.org/t/-/308062
2024-05-17 17:05:49 +02:00
Régis Hanol
e04ac5e2d8
FIX: display validation errors when converting topics (#27064)
When converting a PM to a public topic (and vice versa), if there was a validation error (like a topic already used, or a tag required or not allowed) the error message wasn't bubbled up nor shown to the user.

This fix ensures we properly stop the conversion whenever a validation error happens and bubble up the errors back to the user so they can be informed.

Internal ref - t/128795
2024-05-17 16:36:25 +02:00
Mark VanLandingham
9264479c27
DEV: Add modifier for webhook event header generation (#27054) 2024-05-17 09:33:39 -05:00
Bianca Nenciu
f5a0da6eba
FIX: Simplify navigation to subcategories page (#27053)
Navigation to subcategories page was possible through the category drop
and the "view all" link or through the category drop from the categories
page. This commit removes the latter method.

Follow up to commit 77b032c2b5.
2024-05-17 13:16:44 +03:00
Sérgio Saquetim
17add599e3
DEV: Add new plugin outlets in the header/topic/info component (#27038)
* Add header-topic-info__before and header-topic-info__after outlets
2024-05-16 19:29:44 -03:00
Jean
63b7a36fac
FEATURE: Extend embeddable hosts with Individual tags and author assignments (#26868)
* FEATURE: Extend embeddable hosts with tags and author assignments
2024-05-16 15:47:01 -04:00
Régis Hanol
0e9451e93f
FIX: crawler view with unicode usernames (#27051)
When "unicode_usernames" is enabled, calling the "user_path" helper with a username containing some non ASCII character will break due to the route constraint we have on username.

This fixes the issue by always encoding the username before passing it to the "user_path" helper.

Internal ref - t/127547
2024-05-16 17:11:24 +02:00
Bianca Nenciu
77b032c2b5
FEATURE: Filter with CategoryDrop on category page (#26689)
Using the CategoryDrop on the categories page redirected the user to the
"latest topics" page with topics only from that category. With these
changes, selecting a category will take the user to a "subcategories
page" where only the subcategories of the selected property will be
displayed.
2024-05-16 10:45:13 +03:00
dependabot[bot]
2a63374887
Build(deps-dev): Bump sinon from 17.0.2 to 18.0.0 (#27039)
Bumps [sinon](https://github.com/sinonjs/sinon) from 17.0.2 to 18.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v17.0.2...v18.0.0)

---
updated-dependencies:
- dependency-name: sinon
  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-05-16 09:01:38 +08:00
Isaac Janzen
33871c4830
DEV: Add disabled attribute to form templates (#27033) 2024-05-15 11:40:51 -06:00
Bianca Nenciu
2b5e0bca53
FIX: Async load category for composer (#27004)
Categories are loaded in the composer via the category chooser, but
that only loads a subset of the fields. With these changes, the category
will be loaded async to make sure that the template is updated.
2024-05-15 18:55:15 +03:00
Jarek Radosz
24c55d6797
FIX: Sidebar mode switching on subfolder (#27026) 2024-05-15 10:12:15 +02:00
Natalie Tay
777b8f6d51
Revert "FIX: send activity summaries based on "last seen"" (#27029)
This reverts commit 95885645d9.
2024-05-15 14:09:29 +08:00
Sérgio Saquetim
454a343188
DEV: Add plugin outlets on the user-dropdown/notifications component (#27025) 2024-05-14 21:40:38 -03:00
dependabot[bot]
9e40933d83
Build(deps): Bump ember-template-imports from 4.1.0 to 4.1.1 (#27024)
Bumps [ember-template-imports](https://github.com/ember-template-imports/ember-template-imports) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/ember-template-imports/ember-template-imports/releases)
- [Changelog](https://github.com/ember-template-imports/ember-template-imports/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-template-imports/ember-template-imports/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ember-template-imports
  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-05-15 02:27:59 +02:00
Osama Sayegh
e3ae57ea7a
FIX: Create directory items for new users when in bootstrap mode (#27020)
The users directory is updated on a daily cadence. However, when a site is new and doesn't have many users, it can be confusing that a user who has just joined doesn't show up in the users until a day after they join. To eliminate this confusion, this commit triggers a refresh for the users directory as soon as as a user joins, if the site is in bootstrap mode. The reason for the conditional trigger is that refreshing the users directory is an expensive operation and doing it often on a large site with many users could lead to performance problems.

Internal topic: t/126076.
2024-05-15 03:06:58 +03:00
Jarek Radosz
d112a49cc5
FIX: Incorrect user menu title/alt (#27019) 2024-05-14 15:46:11 +02:00
Osama Sayegh
722d694305
UX: Use a different JIT message when there are no search results in the users directory (#27009)
This commit adds a different message to the users directory (`/u`) that's shown when there are no results for the search term instead of showing the one for when there are no users on the site yet.

Internal topic: t/126076.
2024-05-14 16:07:45 +03:00
Régis Hanol
941d0f1cf5 FIX: sorting user topics lists
Sorting a topics list in user activities wasn't working because the query parameters weren't passed to `findFiltered()` that does the request to the server.

Made the `sortIcon` more resilient to "input" by always converting the value to a string and checking against `"true"`.

Moved `cleanNullQueryParams()` inside `findFiltered` so we're always removing `null` query parameters.

Internal ref - t/127068
2024-05-14 14:40:49 +02:00
Régis Hanol
1eec8c3fa6 FEATURE: add HTML replacements
This adds support for Watched Words to allow replacement with HTML content rather than always replacing with text.

Can be useful when automatically replacing with the '<abbr>' tag for example.

Discussion - https://meta.discourse.org/t/replace-text-with-more-than-just-links/305672
2024-05-14 10:41:27 +02:00
Kris
9b70cbf4bb
A11Y: fix topic admin menu button colors for WCAG colors (#27007)
* A11Y: fix topic admin menu button colors for WCAG colors

* do not duplicate attr
2024-05-14 15:03:17 +10:00
Dylan Yang
84d0ac3a12
FIX: show selected topic with above-topic-list-item (#26928) 2024-05-13 16:23:13 -04:00
marstall
6df2f94bbc
DEV add modifiers to message_builder so plugins can customize subject/body/html (#26867) 2024-05-13 14:59:15 -04:00
Roman Rizzi
2cfcb4042e
UX: Use display_name for summary algorithm to display a custom LLM's name (#27006) 2024-05-13 15:54:36 -03:00
Kelv
2df4f38a97
FIX: restore docked body document from glimmer site header (#27003) 2024-05-14 00:12:38 +08:00
David Taylor
48580de30e
FIX: Remove duplicate user menu for old header implementation (#27002)
Some of the old (pre-dag) header logic was accidently re-introduced as part of 9bcbfbba43 (presumably by mistake while resolving a merge conflict). This causes sites on the old header implementation to end up with duplicate user menu icons.
2024-05-13 16:42:55 +01:00
Kris
1c26fe892a
UX: topic admin button should match height of siblings (#26973) 2024-05-13 11:23:00 -04:00
Joffrey JAFFEUX
f840f37a54
FIX: do not auto close on empty identifiers (#27001)
Prior to this fix all menus with empty identifier or groupIdentifier would be considered to be part of the same identifiers/groupIdentifiers and would auto close any existing d-menu with no identifier/groupIdentifier when opened.
2024-05-13 14:43:26 +02:00
Bianca Nenciu
ebc1763aa5
FIX: Change request method for categories/search (#26976)
This commit changes request method for "categories/search" from GET to
POST to make sure that long filters can be passed to the server. For
example, category selectors with many categories are setting the full
list of selected category IDs to ensure these are filtered out from the
list of choices. This can result in a long URL that exceeds the maximum
length.
2024-05-13 14:37:17 +03:00
Vinoth Kannan
262393282d
FIX: set selected duration to relative time picker component (#26997)
When the duration of relative time picker change we should update the input argument too.
2024-05-13 17:48:46 +08:00
dependabot[bot]
334e8c0fcb
Build(deps-dev): Bump glob from 10.3.14 to 10.3.15 (#26986)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.14 to 10.3.15.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.3.14...v10.3.15)

---
updated-dependencies:
- dependency-name: glob
  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-05-13 09:46:36 +02:00
Martin Brennan
9bcbfbba43
FEATURE: Force admin sidebar for all admins in admin_sidebar_enabled_groups and handle legacy "hamburger dropdown" in this mode (#26899)
Some sites are still on the legacy "hamburger dropdown"
navigation_menu setting. In this case to avoid confusion,
we want to show both the sidebar icon and the header dropdown
hamburger when visiting the admin portal. Otherwise, the
hamburger switches sides from right to left for admins
and takes on different behaviour.

The hamburger in this case _only_ shows the main panel, not
other sidebar panels like the admin one.
2024-05-13 14:40:23 +10:00
Kelv
df75923f2b
DEV: add home-logo-contents plugin outlet (#26965) 2024-05-13 12:31:57 +08:00
dependabot[bot]
ebb9611c46
Build(deps): Bump babel-plugin-ember-template-compilation (#26987)
Bumps [babel-plugin-ember-template-compilation](https://github.com/emberjs/babel-plugin-ember-template-compilation) from 2.2.4 to 2.2.5.
- [Release notes](https://github.com/emberjs/babel-plugin-ember-template-compilation/releases)
- [Changelog](https://github.com/emberjs/babel-plugin-ember-template-compilation/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emberjs/babel-plugin-ember-template-compilation/commits)

---
updated-dependencies:
- dependency-name: babel-plugin-ember-template-compilation
  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-05-13 11:06:39 +08:00
dependabot[bot]
3c779bd10c
Build(deps): Bump morphlex from 0.0.15 to 0.0.16 (#26988)
Bumps [morphlex](https://github.com/joeldrapper/morphlex) from 0.0.15 to 0.0.16.
- [Commits](https://github.com/joeldrapper/morphlex/commits)

---
updated-dependencies:
- dependency-name: morphlex
  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-05-13 11:03:31 +08:00
dependabot[bot]
7df062089b
Build(deps-dev): Bump sass from 1.77.0 to 1.77.1 (#26989)
Bumps [sass](https://github.com/sass/dart-sass) from 1.77.0 to 1.77.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.77.0...1.77.1)

---
updated-dependencies:
- dependency-name: sass
  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-05-13 11:03:06 +08:00
Krzysztof Kotlarek
74f24d5973
FIX: bold sidebar header when admin sidebar is disabled (#26993)
Recently a bug was introduced when the admin sidebar section was made bold.

When the admin sidebar is disabled, we display the original sidebar in the admin panel. In that case, an incorrect CSS rule is executed.
```CSS
.admin-area .sidebar-wrapper {
  background-color: var(--d-sidebar-admin-background);
  .sidebar-section-header-text {
    font-weight: bold;
  }
}
```
Bug in this PR: https://github.com/discourse/discourse/pull/26801

To solve it, a custom CSS class with a panel key was added which will allow granular customisations.
2024-05-13 12:36:03 +10:00
Jarek Radosz
fc76622b56
DEV: Add a has truth-helper for use with Set (#26980)
and clean up re-exports
2024-05-12 20:29:45 +02:00
Jarek Radosz
38bd0b3f86
DEV: Remove unused screenNotFull code (#26979) 2024-05-12 20:29:07 +02:00
Jarek Radosz
fcd2293226
DEV: Convert the entire sidebar to gjs (#26978) 2024-05-12 19:43:51 +02:00
Jarek Radosz
2f95628f87
DEV: Check lifetime props in the Presence service (#26975) 2024-05-11 17:44:36 +02:00
Jarek Radosz
4c47f25530
DEV: Simplify sidebar's collapsedSections (#26972) 2024-05-11 11:15:38 +02:00
Bianca Nenciu
3e7601cada
DEV: Embed IDs in serializer for about page (#26679)
It used to embed the objects which could lead to duplicated objects
when the same user or category was used multiple times (user was admin,
moderator and category or category was parent for multiple categories).
2024-05-10 20:11:43 +03:00
Osama Sayegh
3be4924b99
DEV: Move array type custom fields to JSON type in automation (#26939)
The automation plugin has 4 custom field types that are array typed. However, array typed custom fields are deprecated and should be migrated to JSON type.

This commit does a couple of things:

1. Migrate all four custom fields to JSON
2. Fix a couple of small bugs that have been discovered while migrating the custom fields to JSON (see the comments on this commit's PR for details https://github.com/discourse/discourse/pull/26939)
2024-05-10 18:47:12 +03:00
Vinoth Kannan
4e22b505c5
FIX: add missing translations for staff action logs. (#26969)
The watched word group's create, update and delete action logs were missing the translations. This PR will add those strings and will use the group key instead of watched word key where needed.
2024-05-10 23:11:56 +08:00
dependabot[bot]
3f788e4de8
Build(deps-dev): Bump glob from 10.3.12 to 10.3.14 (#26961)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.12 to 10.3.14.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.3.12...v10.3.14)

---
updated-dependencies:
- dependency-name: glob
  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-05-10 15:39:07 +02:00
David Taylor
97847f6cd8
Revert "DEV: @babel/plugin-proposal-decorators -> decorator-transforms (#25290)" (#26971)
This reverts commit 0f4520867b.

This has led to two problems:

1. An incompatibility with Cloudflare's "auto minify" feature. They've deprecated this feature because of incompatibility with modern JS syntax. But unfortunately it will remain enabled on existing properties until 2024-08-05.

2. Discourse fails to boot in Safari 15. This is strange, because Safari does support all the required features in our production JS bundles. Even more strangely, things start working as soon as you open the developer tools. That suggests the cause could be a Safari bug rather than a simple incompatibility.

Reverting while we work out a path forward on both those issues.
2024-05-10 12:48:16 +01:00
Joffrey JAFFEUX
47cabdc6d2
DEV: various improvements to d-menu (#26970)
- adds a `@groupIdentifier` property which will ensure that two menus of the same group are not expanded at the same time
- adds a `@class` property which will be applied to the trigger and the content
- adds a `@triggerClass` property which will be applied to the trigger
- adds a `@contentClass` property which will be applied to the trigger
- removes `extraClassName`
2024-05-10 13:43:37 +02:00
Joffrey JAFFEUX
46371fe9e4
DEV: allows to get a menu by its identifier (#26968)
Usage:

```javascript
this.menu.getByIdentifier("foo");
```
2024-05-10 12:00:58 +02:00
Kelv
38c1312dfb
FIX: restore behaviour of adding docked classname to document body during header updates (#26967) 2024-05-10 16:41:17 +08:00