Commit Graph

54166 Commits

Author SHA1 Message Date
Isaac Janzen
b8333d7aa2
DEV: Add after-header-panel plugin outlet (#26835) 2024-05-01 12:41:25 -05:00
Daniel Waterworth
b2fe8510e4
FIX: Order categories in SQL for Categories#search (#26810)
Otherwise, the results don't make sense if the number of categories is
more than the limit provided.
2024-05-01 12:21:10 -05:00
David Battersby
c1f6ec5f62
FIX: add excerpt fallback for chat message replies (#26834) 2024-05-01 16:39:47 +02:00
dependabot[bot]
acdaa3b579
Build(deps): Bump multi_xml from 0.6.0 to 0.7.0 (#26831)
Bumps [multi_xml](https://github.com/sferik/multi_xml) from 0.6.0 to 0.7.0.
- [Changelog](https://github.com/sferik/multi_xml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sferik/multi_xml/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: multi_xml
  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-05-01 12:30:13 +02:00
dependabot[bot]
2b6f4f4a7f
Build(deps-dev): Bump the embroider group with 3 updates (#26832)
Bumps the embroider group with 3 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) and [@embroider/macros](https://github.com/embroider-build/embroider/tree/HEAD/packages/macros).


Updates `@embroider/compat` from 3.4.8 to 3.4.9
- [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.8 to 3.4.9
- [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.0 to 1.16.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/macros)

---
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
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-01 12:29:27 +02:00
dependabot[bot]
51cd244bf8
Build(deps-dev): Bump sass from 1.75.0 to 1.76.0 (#26833)
Bumps [sass](https://github.com/sass/dart-sass) from 1.75.0 to 1.76.0.
- [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.75.0...1.76.0)

---
updated-dependencies:
- dependency-name: sass
  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-05-01 12:24:45 +02:00
Jarek Radosz
c97d58f377
DEV: Add placement: center option to float-kit (#26830)
Implements this custom placement strategy: https://floating-ui.com/docs/offset#creating-custom-placements
2024-05-01 12:12:00 +02:00
Jarek Radosz
b39736a167
DEV: Add autofocus option to d-menu (#26829)
(to be used by the glimmer replacement of topic-entrance component)
2024-05-01 12:11:11 +02:00
Aida Syoko
3a69824ffb
DEV: remove repetitive words (#26684) 2024-05-01 17:58:02 +10:00
Osama Sayegh
8ed684312f
FIX: Prevent race condition in recurring automations (#26828)
Recurring automations are triggered by a scheduled job that runs every minute and checks for due automations, runs them and then marks as them as completed (by deleting the `PendingAutomation` record). However, the job is currently subject to a race condition where a recurring automation can be executed more than once at its due date if it takes more than a minute to finish.

This commit adds a mutex around the code that triggers the recurring automation so that no concurrent executions can happen for a single automation.

Meta topic: https://meta.discourse.org/t/daily-summary-9pm-utc/291850/119?u=osama.
2024-05-01 09:01:58 +03:00
Discourse Translator Bot
d1f008a2fc
Update translations (#26821) 2024-04-30 21:57:28 +02:00
Joffrey JAFFEUX
038236fcca
FIX: prevents long URL to overflow thread title (#26827) 2024-04-30 21:44:35 +02:00
Régis Hanol
7a7a214c11
FIX: Watched Words (+ Groups) with missing action (#26826)
This defaults the action to

- Censor if there are no "replacement"
- Replace if there's a "replacement"

It also fixes the `WatchedWordGroups` action to the action of one of their `WatchedWords`
2024-04-30 15:36:02 -04:00
Jan Cernik
ddf7bbfa97
FIX: Do not show empty list in the topic admin menu (#26825) 2024-04-30 14:31:39 -03:00
Régis Hanol
f4acb43ee7 DEV: add watched words system spec 2024-04-30 19:16:47 +02:00
Régis Hanol
e7d0083dbe FIX: creating watched words...
... wasn't working because it wasn't storing the proper "action" value.

Issue was that we were using the "action" parameter which is being used by Rails to determine which controller action to call.

We need to use the "action_key" parameter instead.
2024-04-30 19:16:47 +02:00
Osama Sayegh
0e44072b2b
FIX: Prevent infinite loop of automations triggering each other (#26814)
It's currently possible to setup multiple automation rules that trigger each other resulting in an infinite loop. To prevent that, this commit adds a global "circuit breaker" that prevents all automations from triggering while an automation rule is executing.

Internal topic: t/124365.
2024-04-30 20:13:29 +03:00
Jan Cernik
ff8e1f4ed6
FIX: Do not show topic admin menu button to regular users (#26820) 2024-04-30 13:47:36 -03:00
Jarek Radosz
3930064fd1
DEV: Convert various components to gjs (#26782)
Those were all low hanging fruits - all were already glimmer components, so this was mostly merging js and hbs files and adding imports.

(occasionally also adds/fixes class names)
2024-04-30 16:44:49 +02:00
Carson Chang
5d1f38a592
Update icon-avatar.gjs (#26819) 2024-04-30 21:46:37 +08:00
Alan Guo Xiang Tan
a6624af66e
DEV: Add isValidUrl helper function to theme migrations (#26817)
This commit adds a `isValidUrl` helper function to the context in
which theme migrations are ran in. This helper function is to make it
easier for theme developers to check if a string is a valid URL or path
when writing theme migrations. This can be helpful in cases when
migrating a string based setting to `type: objects` which contain `type:
string` properties with URL validations enabled.

This commit also introduces the `UrlHelper.is_valid_url?` method
which actually checks that the URL string is of the valid format instead of
only checking if the URL string is parseable which is what `UrlHelper.relaxed_parse` does
and is not sufficient for our needs.
2024-04-30 16:45:07 +08:00
Régis Hanol
bfc0f3f4cd FIX: prevent duplicate attachments in incoming emails - take 2
This is a follow up of 5fcb7c262d

It was missing the case where secure uploads is enabled, which creates a copy of the upload no matter what.

So this checks for the original_sha1 of the uploads as well when checking for duplicates.
2024-04-30 08:15:07 +02:00
Krzysztof Kotlarek
8704499b5a
FEATURE: additional links for moderator's sidebar (#26815)
In this PR we introduced an admin sidebar for moderators - https://github.com/discourse/discourse/pull/26795

`What's new` and `all reports` links were missing as moderators have access to those pages.
2024-04-30 10:34:12 +10:00
dependabot[bot]
267b26c8d6
Build(deps): Bump the babel group with 2 updates (#26811) 2024-04-30 01:38:48 +02:00
dependabot[bot]
336a92ba44
Build(deps): Bump terser from 5.30.4 to 5.31.0 (#26812) 2024-04-30 01:38:00 +02:00
dependabot[bot]
e1c133a7a0
Build(deps-dev): Bump rubocop-ast from 1.31.2 to 1.31.3 (#26813) 2024-04-30 01:37:27 +02:00
Krzysztof Kotlarek
0842ca7f9e
UX: admin sidebar headings are bold (#26801)
Make admin sidebar headings bold.
2024-04-30 09:31:53 +10:00
Jarek Radosz
0548f24208
DEV: Convert topic-title to glimmer/gjs (#26808)
This reverts commit 5d568d0bab. (reland of #26775)

Now with removed unnecessary `?.` operators to workaround a terser/babel/??? issue.
2024-04-29 23:06:50 +02:00
Régis Hanol
19b7b22627 DEV: fix the fix for flakey test 😓
We should not be clearing **all** the advanced search filters and orders, because some are required by the application.
2024-04-29 21:43:38 +02:00
Gerhard Schlager
967e49af59
DEV: Import script should use case-insensitive lookup for tags (#26780) 2024-04-29 19:54:27 +02:00
Gerhard Schlager
e3882a0c48
DEV: Add support for user_associated_accounts to import script (#26779) 2024-04-29 19:48:32 +02:00
Gerhard Schlager
a538e2f153
DEV: Import script should use case-insensitive check for tag names (#26699) 2024-04-29 19:27:28 +02:00
Jan Cernik
8dd883d4e5
DEV: Refactor topic admin menu to use <DMenu> (#26678)
* DEV: Refactor topic admin menu to use `<DMenu>`

This PR also introduces a new plugin API to add buttons to the topic admin menu

```javascript
api.addTopicAdminMenuButton((topic) => {
  return {
    action: () => {
      alert('Sunrise!');
    },
    icon: 'sun',
    className: 'sunrise-button',
    label: 'actions.rise',
  };
});
```

The plugins that needed to be updated are:

- [discourse-zoom](https://github.com/discourse/discourse-zoom/pull/73)
- [discourse-salesforce](https://github.com/discourse/discourse-salesforce/pull/74)
- [discourse-topic-noindex](https://github.com/discourse/discourse-topic-noindex/pull/11)
2024-04-29 12:44:38 -03:00
Jan Cernik
9fb888923d
FIX: Do not show hidden posts in search results (#26800) 2024-04-29 12:32:02 -03:00
Régis Hanol
f7a1272fa4 DEV: cleanup custom filters to prevent leaks
Ensures we clean up any custom filters added in the specs to prevent any leaks when running the specs.

Follow up to https://github.com/discourse/discourse/pull/26770#discussion_r1582464760
2024-04-29 16:11:12 +02:00
Joffrey JAFFEUX
271ca2c968
FIX: correctly check the user id of the original message (#26805)
Followup: write a test for this
2024-04-29 13:34:49 +02:00
Vinoth Kannan
143f06f2c6
FEATURE: Allow watched words to be created as a group (#26632)
At the moment, there is no way to create a group of related watched words together.  If a user needed a set of words to be created together, they'll have to create them individually one at a time.

This change attempts to allow related watched words to be created as a group. The idea here is to have a list of words be tied together via a common `WatchedWordGroup` record.  Given a list of words, a `WatchedWordGroup` record is created and assigned to each `WatchedWord` record. The existing WatchedWord creation behaviour remains largely unchanged.

Co-authored-by: Selase Krakani <skrakani@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2024-04-29 15:50:55 +05:30
David Battersby
0c8f531909
FEATURE: encourage users to set chat thread titles (#26617)
This change encourages users to title their threads to make it easier for other users to join in on conversations that matter to them.

The creator of the chat thread will receive a toast notification prompting them to add a thread title when on mobile and the thread has at least 5 sent replies.
2024-04-29 17:20:01 +08:00
David Taylor
620f76cec1
DEV: Log original exception/backtrace for RequestTracker errors (#26802) 2024-04-29 09:05:32 +01:00
Joffrey JAFFEUX
1510c6d004
FIX: correctly enable/disable body scroll on modal (#26784) 2024-04-29 08:45:48 +02:00
Joffrey JAFFEUX
c1c823144b
FIX: correctly rename scroller everywhere (#26783) 2024-04-29 08:45:37 +02:00
Martin Brennan
94fe31e5b3
UX: Fix report color duplication (#26799)
In the "Consolidated Pageviews with Browser Detection (Experimental)"
report we used the same color for "Known Crawler" and "Other pageviews"
which makes the report confusing to look at, this commit makes them
different.
2024-04-29 15:12:47 +10:00
Martin Brennan
79cccaf61f
DEV: Try fix flaky sidebar filter spec (#26797)
We were getting this error causing it to flake when
creating users:

```
ActiveRecord::StatementInvalid:
  PG::ReadOnlySqlTransaction: ERROR:  cannot execute INSERT in a read-only transaction
```
2024-04-29 15:01:33 +10:00
Krzysztof Kotlarek
0bfa37eb2d
DEV: fix flaky admin_customize_themes spec (#26798)
Because spec is searching for "5", we need to be sure that "Cool theme 5" is created.
2024-04-29 11:39:14 +08:00
Krzysztof Kotlarek
da329d54af
FEATURE: new admin sidebar for moderators (#26795)
Enable a new sidebar for moderators with limited links.
2024-04-29 11:32:47 +10:00
Charley Sheets
6c9f04a56c
DEV: Fix confusing comment (#26781) 2024-04-29 09:16:20 +08:00
Jarek Radosz
5d568d0bab
Revert "DEV: Convert topic-title to glimmer/gjs (#26775)" (#26794)
This reverts commit 261ef8404e.
2024-04-29 09:15:35 +08:00
Martin Brennan
edec941a87
FIX: Better tracking of topic visibility changes (#26709)
This commit introduces a few changes as a result of
customer issues with finding why a topic was relisted.
In one case, if a user edited the OP of a topic that was
unlisted and hidden because of too many flags, the topic
would get relisted by directly changing topic.visible,
instead of going via TopicStatusUpdater.

To improve tracking we:

* Introduce a visibility_reason_id to topic which functions
  in a similar way to hidden_reason_id on post, this column is
  set from the various places we change topic visibility
* Fix Post#unhide! which was directly modifying topic.visible,
  instead we use TopicStatusUpdater which sets visibility_reason_id
  and also makes a small action post
* Show the reason topic visibility changed when hovering the
  unlisted icon in topic status on topic titles
2024-04-29 10:34:46 +10:00
Martin Brennan
acc5b01e21
DEV: Add pry-stack_explorer again (#26763)
This was reverted in 26a387c9c6
because the other pry gem changes there broke prod -- it
should be safe to just add this dev/test dependency
2024-04-29 10:34:28 +10:00
dependabot[bot]
674cc2d1b5
Build(deps-dev): Bump selenium-webdriver from 4.20.0 to 4.20.1 (#26793) 2024-04-29 02:21:05 +02:00