Commit Graph

55949 Commits

Author SHA1 Message Date
Jarek Radosz 3f705d0253
Merge branch 'main' into 0-a-dl 2024-09-18 13:40:58 +02:00
Jarek Radosz c6c4e09ba3
FIX: .badge-posts alignment on mobile glimmer topic list (#28959)
Regressed in 3eada7b572
2024-09-18 13:02:52 +02:00
Joffrey JAFFEUX e4e2bc7add
DEV: replaces subtitle by description (#28881)
Description should be above the field and that makes subtitle useless.

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2024-09-18 11:14:59 +02:00
Bianca Nenciu dd5502f166
PERF: Cache serialized voters at topic view level (#28894)
This commit introduces a way to fetch the "serialized voters" for
multiple polls.

* Use a single query to fetch voters for all types of polls

* Refactor to introduce all_serialized_voters

* Cache serialized voters
2024-09-18 12:01:40 +03:00
Alan Guo Xiang Tan 02380af75c
PERF: Update migration to drop index concurrently. (#28955)
This avoids locking the index's table
2024-09-18 10:20:24 +08:00
Alan Guo Xiang Tan 9a2e6fc890
DEV: Cache minio binaries cause downloading them is slow (#28956) 2024-09-18 10:20:10 +08:00
Ted Johansson e60876ce49
FIX: Appropriately handle uninstalled problem checks (#28771)
When running checks, we look to the existing problem check trackers and try to grab their ProblemCheck classes.

In some cases this is no longer in the problem check repository, e.g. when the check was part of a plugin that has been uninstalled.

In the case where the check was scheduled, this would lead to an error in one of the jobs
2024-09-18 10:11:52 +08:00
chapoi 9b383e3729
UX: chat composer style tweaks (#28938) 2024-09-18 02:45:44 +02:00
Hugh Lashbrooke 5f9111a1b5
Updating documentation links in admin quick start guide (#28935) 2024-09-18 09:52:12 +10:00
dependabot[bot] b3bf9e2ef1
Build(deps): Bump memory_profiler from 1.0.2 to 1.1.0 (#28954)
Bumps [memory_profiler](https://github.com/SamSaffron/memory_profiler) from 1.0.2 to 1.1.0.
- [Changelog](https://github.com/SamSaffron/memory_profiler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/SamSaffron/memory_profiler/compare/v1.0.2...v1.1.0)

---
updated-dependencies:
- dependency-name: memory_profiler
  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-09-18 01:38:56 +02:00
dependabot[bot] 2fb0a3bc0c
Build(deps-dev): Bump rouge from 4.3.0 to 4.4.0 (#28953)
Bumps [rouge](https://github.com/rouge-ruby/rouge) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/rouge-ruby/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rouge-ruby/rouge/compare/v4.3.0...v4.4.0)

---
updated-dependencies:
- dependency-name: rouge
  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-09-18 01:38:42 +02:00
dependabot[bot] f1e213e86a
Build(deps-dev): Bump jsuites from 5.6.1 to 5.6.2 (#28952)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.6.1 to 5.6.2.
- [Release notes](https://github.com/jsuites/jsuites/releases)
- [Changelog](https://github.com/jsuites/jsuites/blob/master/changelog.md)
- [Commits](https://github.com/jsuites/jsuites/commits)

---
updated-dependencies:
- dependency-name: jsuites
  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-09-18 01:21:05 +02:00
dependabot[bot] 0a6ee30817
Build(deps): Bump terser from 5.32.0 to 5.33.0 (#28950)
Bumps [terser](https://github.com/terser/terser) from 5.32.0 to 5.33.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.32.0...v5.33.0)

---
updated-dependencies:
- dependency-name: terser
  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-09-18 00:44:52 +02:00
Sam 68e017c324
DEV: attempt another upgrade on mini_racer (#28951)
This time the compile disables strict aliasing to see if it resolves the issue
2024-09-18 08:44:26 +10:00
Joffrey JAFFEUX 2aca41914a
FEATURE: supports mark tag in chat messages (#28949)
This brings feature parity with posts where you can use this tag.
2024-09-17 20:52:34 +02:00
Amanda Alves Branquinho c93235f4f5
DEV: Add aditional args to plugin outlet (#28948) 2024-09-17 15:46:36 -03:00
Jarek Radosz 4668314483
no need for the arg anymore 2024-09-17 20:31:04 +02:00
Jarek Radosz a5babe3a87
consistency and tracking 2024-09-17 20:30:23 +02:00
Jarek Radosz a6203a829e
missing injections 2024-09-17 20:23:41 +02:00
Jarek Radosz 9b10ba5132
Merge branch 'main' into 0-a-dl
# Conflicts:
#	app/assets/javascripts/discourse/app/components/topic-list/topic-cell.gjs
#	app/assets/javascripts/discourse/app/components/topic-list/topic-list-item.gjs
2024-09-17 20:06:31 +02:00
Jarek Radosz d1feb67f35
DEV: Extract TopicCell component (#28947) 2024-09-17 20:03:51 +02:00
Gabriel Grubba e926a07c83
FEATURE: increasing name length in automation (#28945)
Updates from 30 to 100 the maximum length of the name of an automation.

Adds tests for validating the maximum length of the name of an automation.
2024-09-17 13:16:44 -03:00
Jarek Radosz 563418771e
Merge branch 'main' into 0-a-dl
# Conflicts:
#	app/assets/javascripts/discourse/app/components/topic-list/activity-column.gjs
2024-09-17 18:00:36 +02:00
Jarek Radosz 140d9aadfe
DEV: Remove unused code from glimmer topic list (#28946) 2024-09-17 17:39:24 +02:00
jbrw 0a4ae392d9
FIX: Show topic admin menu if can_split_merge_topic (#28937)
Show the topic admin button is the `can_split_merge_topic` permission is present, without the user needing full `can_manage_topic` permissions.
2024-09-17 10:39:51 -04:00
Amanda Alves Branquinho 68a258ae7b
DEV: Add outlet wrapper for badges template (#28928)
* DEV: Add outlet wrapper for badges template

* Apply suggestions from code review

Co-authored-by: Sérgio Saquetim <1108771+megothss@users.noreply.github.com>

---------

Co-authored-by: Sérgio Saquetim <1108771+megothss@users.noreply.github.com>
2024-09-17 11:24:32 -03:00
Joffrey JAFFEUX 7ae116a389
FIX: prevents user status selection in mentions (#28944)
Prior to this fix copy/pasting a text with mentions containing user status would paste the emoji name.
2024-09-17 15:36:15 +02:00
Jarek Radosz 3eada7b572
DEV: Remove topic-entrance from the glimmer topic list (#28942)
the (anecdotal) low usage of this component might no longer justify the continued maintenance (and perf impact)
2024-09-17 14:15:54 +02:00
Jarek Radosz 62d00722e1
DEV: Convert highlighted-code to glimmer/gjs (#28914)
the radical change in the implementation doesn't stem from the glimmer migration, but rather the fact that previously the component was single-use – changing any of its args didn't (and couldn't) be reflected because hljs was replacing the nodes so all the ember bookkeeping was gone.

Co-authored-by: David Taylor <david@taylorhq.com>
2024-09-17 13:49:35 +02:00
Jarek Radosz 7b8343d482
FIX: Support getters in hbr `#each` context (#28941)
There is a risk of overriding and then deleting a prop of the context in case of a naming clash between localName and that prop, e.g.

```js
class Test {
  item = "foo";
  items = [1, 2];
}

const template = `
  {{#each items as |item|}}
    {{item}}
  {{/each}}
`;
const compiledTemplate = compile(template);

const object = new Test();
// object.item === "foo"
const output = compiledTemplate(object, RUNTIME_OPTIONS);
// object.item === undefined
```

…but I think we can accept this risk and just be careful.`#each` isn't widely used in hbr anyway (as proven by the other long-standing and recently fixed bug) and hbr is on its way out anyway.
2024-09-17 12:07:07 +02:00
Loïc Guitaut bee8214399 DEV: Drop unused column `translation_overrides.compiled_js` 2024-09-17 09:58:10 +02:00
Ted Johansson be33363f13
FEATURE: Add ability to dismiss admin notices (#28916)
his is a new feature that lets admins dismiss notices from the dashboard. This helps with self-service in cases where a notice is "stuck", while we work on provisions to prevent "sticking" in the first place.
2024-09-17 14:43:34 +08:00
Alan Guo Xiang Tan d7a46e1702
DEV: Remove unused lines (#28940)
We don't support puma at all
2024-09-17 15:46:01 +10:00
chapoi 0923f5e3a7
UX: small colour change to chat composer insert button (#28904) 2024-09-17 03:31:55 +02:00
Jarek Radosz 90bc49935e
`#each` fix 2024-09-17 03:13:17 +02:00
Jarek Radosz 1bb6319fcf
push 2024-09-17 02:11:28 +02:00
Alan Guo Xiang Tan 54cf00ba78
DEV: Reduce number of parallel processes for frontend tests (#28936)
Seeing errors like the following which is normally due to us running
too many processes.

```
not ok 292 Firefox - [undefined ms] - error
    ---
        message: >
            Error: Browser timeout exceeded: 10s
            Error while executing test: Acceptance: Uppy Composer Attachment - Multiple Upload Errors: should show a consolidated message for multiple failed uploads
            Stderr:
             *** You are running in headless mode.

            Stdout:
             [GFX1-]: glxtest: libpci missing
            [GFX1-]: glxtest: Unable to open a connection to the X server
            [GFX1-]: No GPUs detected via PCI

            [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
```
2024-09-17 08:01:40 +08:00
dependabot[bot] 130d08f9af
Build(deps-dev): Bump puppeteer-core from 23.3.0 to 23.3.1 (#28931)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 23.3.0 to 23.3.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.3.0...puppeteer-core-v23.3.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-09-17 01:48:46 +02:00
Jarek Radosz 19df4cba55
DAG for hbr topic-list-item 2024-09-17 01:40:35 +02:00
dependabot[bot] 0a6ecc04d2
Build(deps): Bump ember-auto-import from 2.7.4 to 2.8.0 (#28933)
Bumps [ember-auto-import](https://github.com/embroider-build/ember-auto-import/tree/HEAD/packages/ember-auto-import) from 2.7.4 to 2.8.0.
- [Release notes](https://github.com/embroider-build/ember-auto-import/releases)
- [Changelog](https://github.com/embroider-build/ember-auto-import/blob/main/packages/ember-auto-import/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/ember-auto-import/commits/HEAD/packages/ember-auto-import)

---
updated-dependencies:
- dependency-name: ember-auto-import
  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-09-17 01:23:58 +02:00
dependabot[bot] 49d7a2750a
Build(deps): Bump i18n from 1.14.5 to 1.14.6 (#28929)
Bumps [i18n](https://github.com/ruby-i18n/i18n) from 1.14.5 to 1.14.6.
- [Release notes](https://github.com/ruby-i18n/i18n/releases)
- [Changelog](https://github.com/ruby-i18n/i18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ruby-i18n/i18n/compare/v1.14.5...v1.14.6)

---
updated-dependencies:
- dependency-name: i18n
  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-09-17 01:23:04 +02:00
dependabot[bot] 47b4ceeec8
Build(deps): Bump ember-resolver from 13.0.0 to 13.0.1 (#28932)
Bumps [ember-resolver](https://github.com/ember-cli/ember-resolver) from 13.0.0 to 13.0.1.
- [Release notes](https://github.com/ember-cli/ember-resolver/releases)
- [Changelog](https://github.com/ember-cli/ember-resolver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-resolver/compare/v13.0.0...v13.0.1)

---
updated-dependencies:
- dependency-name: ember-resolver
  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-09-17 01:22:45 +02:00
Jarek Radosz f71ccf37a7
unused import 2024-09-16 21:36:32 +02:00
Jarek Radosz d4fa3c91e1
golf 2024-09-16 21:36:09 +02:00
Jarek Radosz b2f3657ec2
Merge branch 'main' into 0-a-dl 2024-09-16 21:28:34 +02:00
Penar Musaraj 501f07ab1f
FIX: Retry updating webview background color (#28912)
In some very rare cases, the header element doesn't yet have the bg
when this code is run. This PR adds a simple retry mechanism.

No tests because this relies on specific load timing from the browser.
2024-09-16 11:58:36 -04:00
Amanda Alves Branquinho 7f55e8b2be
DEV: Add outlet wrapper to categories only component (#28669) 2024-09-16 12:48:32 -03:00
Amanda Alves Branquinho ad0ffab79f
DEV: add outlet wrapper for category name field (#28858) 2024-09-16 12:48:24 -03:00
Amanda Alves Branquinho c459d4b76c
DEV: add outlet wrapper for categories boxes (#28860)
* DEV: add outlet wrapper for category boxes

* Put plugin outlet after categories boxes
2024-09-16 12:46:21 -03:00
Osama Sayegh 4406bbb020
FIX: Prevent recurring automations from getting stalled under specific conditions (#28913)
Under certain conditions, a recurring automation can end up in a state with no pending automation records, causing it to not execute again until manually triggered.

We use the `RRule` gem to calculate the next execution date and time for recurring automations. The gem takes the interval, frequency, start date, and a time range, and returns all dates/times within this range that meet the recurrence rule. For example:

```ruby
RRule::Rule
  .new("FREQ=DAILY;INTERVAL=1", dtstart: Time.parse("2023-01-01 07:30:00 UTC"))
  .between(Time.zone.now, Time.zone.now + 2.days)
# => [Sat, 14 Sep 2024 07:30:00.000000000 UTC +00:00, Sun, 15 Sep 2024 07:30:00.000000000 UTC +00:00]
```

However, if the time component of the first point provided to `.between()` is slightly ahead of the start date (e.g., `dtstart`), the first date/time returned by `RRule` can fall outside the specified range by the same subsecond amount. For instance:

```ruby
RRule::Rule
  .new("FREQ=DAILY;INTERVAL=1", dtstart: Time.parse("2023-01-01 07:30:00 UTC"))
  .between(Time.parse("2023-01-01 07:30:00.999 UTC"), Time.parse("2023-01-03 07:30:00 UTC"))
  .first
# => Sun, 01 Jan 2023 07:30:00.000000000 UTC +00:00
```

Here, the start date/time given to `.between()` is 999 milliseconds after 07:30:00, but the first date returned is exactly 07:30:00 without the 999 milliseconds. This causes the next recurring date to fall into the past if the automation executes within a subsecond of the start time, leading to the automation stalling.

I'm not sure why `RRule` does this, but it seems intentional judging by the source of the `.between()` method:

b9911b7147/lib/rrule/rule.rb (L28-L32)

This commit fixes the issue by selecting the first date ahead of the current time from the list returned by `RRule`, rather than the first date directly.

Internal topic: t/138045.
2024-09-16 18:23:26 +03:00