Commit Graph

55754 Commits

Author SHA1 Message Date
deb751dfe3 UX: remove btn-default class from chat thread tracking dropdown (#28789) 2024-09-06 15:14:29 -05:00
348abeecb1 DEV: Use icon-rendering API for local-dates (#28788)
This makes local-dates compatible with the fa6 upgrade in https://github.com/discourse/discourse/pull/28778
2024-09-06 20:51:57 +01:00
24caa36eef DEV: add below-sidebar-sections to sidebar dropdown mode (#28780) 2024-09-06 12:49:18 -04:00
f8e3a90ab9 DEV: Forces custom search filter matchers to be case insensitive (#28785) 2024-09-06 12:30:51 -03:00
02f8396cfc DEV: Remove register_color_scheme api (#28777)
This was added 10 years ago, but currently there's not a single use in our public and private plugins and no reference in third-party plugins on github
2024-09-06 17:26:53 +02:00
498212bb5e DEV: Try to make admin email-preview test resilent (#28782) 2024-09-06 17:26:13 +02:00
ad7d5426d8 FIX: supports groups field in post_created_edited (#28783)
⚠️ This commit is a revert of a revert due to a migration which was causing `{}` metadata to be transformed into `{"value": [null]}`. The new migration shouldn't cause this and will also clean the existing errors, there shouldn't  be any data loss given the affected fields where not containing actual data. We might want to stop storing these empty fields in the future.

To achieve it, this commit does the following:
- create a new `groups field`, ideally we would have reused the existing group field, but many automations now have the expectation that this field will return a group id and not an array of group ids, which makes it a dangerous change
- alter the code in `post_created_edited` to use this new groups field and change the logic to use an array
- migrate the existing group fields post_created_edited automations to change name from `restricted_group` to `restricted_groups`, the component from `group` to `groups` and the metadata from `{"value": integer}` to `{"value": [integer]}`

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2024-09-06 17:22:42 +02:00
2a5e1aa8e6 FEATURE: only play chat sound when chat badge icon is shown (#28387)
Every time a desktop chat sound plays, there should be some visual cue as to why the sound was played in the first place.

This change follows the chat indicator preference:

- All New Messages - a blue dot is shown for all messages, so we attempt to play a sound every time
- Direct Messages, Mentions and Watched Threads - a green dot is shown for all urgent messages, so we attempt to play a sound for urgent chat notifications
- Only Mentions - only play chat sounds when user is mentioned
- Never - we never play chat sounds, as user wouldn’t know why the sound was played
2024-09-06 18:25:25 +04:00
a98d3d40f2 FEATURE: Add user to topic_tags_changed event (#28714)
* FEATURE: Add user to topic_tags_changed event

Add user to topic_tags_changed event context
Update automation plugin with new arguments in event
Update tests for new arguments

relates to https://github.com/discourse/discourse-chat-integration/pull/214

* DEV: change variable name for better readability

changed `tags` to be payload and used `values_at` to get the values of the keys
2024-09-06 11:23:30 -03:00
5f5680dbaf Revert "FIX: supports groups field in post_created_edited (#28773)" (#28781)
This reverts commit eb3a1c72179c179af358daf41b167e337cc7b454.
2024-09-06 16:10:53 +02:00
eb3a1c7217 FIX: supports groups field in post_created_edited (#28773)
To achieve this this commit does the following:
- create a new `groups field, ideally we would have reused the existing group field, but many automations now have the expectation that this field will return a group id and not an array of group ids, which makes it a dangerous change
- alter the code in `post_created_edited` to use this new groups field and change the logic to use an array
- migrate the existing group fields post_created_edited automations to change name from `restricted_group` to `restricted_groups`, the component from `group` to `groups` and the metadata from `{"value": integer}` to `{"value": [integer]}`
2024-09-06 15:04:19 +02:00
d642020b0f FIX: Add traffic info footer to the new /about page (#28779)
This commit adds the traffic info footer that currently exists on the old /about page to the new one.
2024-09-06 15:05:46 +03:00
4cefbf8704 Build(deps): Bump ruby-readability from 0.7.1 to 0.7.2 (#28653)
Bumps [ruby-readability](https://github.com/iterationlabs/ruby-readability) from 0.7.1 to 0.7.2.
- [Commits](https://github.com/iterationlabs/ruby-readability/commits)

---
updated-dependencies:
- dependency-name: ruby-readability
  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-06 13:36:23 +02:00
526a21730a DEV: Remove unsafe_eval from test/theme-test CSP (#28774)
not needed anymore
2024-09-06 13:28:33 +02:00
d8009fd0ec DEV: Remove unneeded dependencies
Now that we’re using Rails 7.1, we don’t need to have the `mutex_m` and
`drb` gems explicitly listed in our Gemfile.
2024-09-06 13:14:22 +02:00
4792468c88 DEV: Drop qunit timeout args (#28775)
whatever was using that value is long gone
2024-09-06 13:08:42 +02:00
722c008adb FEATURE: Add 'Edit this page' link at the top of the new /about page (#28766)
This commit adds a link to the top of the new /about page, shown to admins only, to allow them to easily navigate to `/admin/config/about` where they can edit the /about page.

Internal topic: t/137546.
2024-09-06 13:35:30 +03:00
6ab65ec9dc Build(deps): Bump tzinfo-data from 1.2024.1 to 1.2024.2 (#28764) 2024-09-06 11:26:45 +02:00
776b4ec8e2 DEV: Remove old problem check system - Part 1 (#28772)
We're now using the new, database-backed problem check system. This PR removes parts of the old, Redis-backed system that is now defunct.
2024-09-06 17:00:25 +08:00
Sam
dfab7d1eca Revert "DEV: another attempt upgrading mini_racer (#28763)" (#28769)
This reverts commit 5c0c053b111c55207dad954afd312a26ff67e176.

This still segfaults, but not as frequently as before, we will keep this
for a few more hours and then revert
2024-09-06 16:23:57 +10:00
cde4db1c6a UX: Apply the admin page header component (#28767)
* DEV: Apply the admin page header component

* DEV: remove unused i18n import
2024-09-05 22:46:41 -06:00
4a8d6f83bd Build(deps): Bump reline from 0.5.9 to 0.5.10 (#28765) 2024-09-06 00:50:55 +02:00
Sam
5c0c053b11 DEV: another attempt upgrading mini_racer (#28763)
New version disable concurrent GC sweeping in V8 it was a culprit for
segfaults we saw in production
2024-09-06 08:12:58 +10:00
22b4ba99f5 UX: Change organization alert type from error to info (#28762) 2024-09-05 14:42:06 -06:00
e7d80cf762 UX: Add links to getting started check list (#28761)
* UX: Add links to getting started check list

* edit links
2024-09-05 14:44:15 -05:00
a193bf4360 UX: update chat channel sorting (#28760)
Reverts chat channel sorting changes made in #28731 due to desktop sidebar.
2024-09-05 20:58:15 +04:00
9b630c8cca DEV: adds post_created_edited suport to chat (#28757) 2024-09-05 17:17:18 +02:00
b7cfd4e146 FIX: toggle chat drawer on channel thread list (#28759)
Chat toggle relies on using a height: auto to collapse drawer, however in channel threads we should be only displaying threads when drawer is expanded. Displaying threads conditionally based on drawer toggle status fixes this.
2024-09-05 19:01:12 +04:00
6bb8ac54cb DEV: Include a basic oauth faraday formatter in core for usage in managed authenticators (#28758)
We currently have some occurrences of ____FaradayFormatter for OAuth logs. This commit creates a generic formatter so that any new authenticators can use it.
2024-09-05 22:29:29 +08:00
d5670069f5 UX: fix spacing of emoji in chat channel title (#28756)
Fixes a small spacing bug with emoji in channel titles
2024-09-05 16:43:06 +04:00
81c5f1d75f DEV: send_chat_message supports topic_tags_changed (#28755)
This will allow admins to use this script and trigger together.
2024-09-05 13:05:19 +02:00
e991574389 UX: chat drawer increase unread channel visibility (#28731)
This change increases the visibility of unread channels to make them stand out more in drawer mode (desktop).

When a channel is unread:

- it floats to the top;
- when multiple channels are unread, they are sorted alphabetically (equal to how it’s done on mobile)
- the unread indicator blue dot moves to directly right of the channel name
2024-09-05 13:36:50 +04:00
67ce50c141 FIX: creating an automation without script should error (#28752)
This commit ensure we are properly showing an error to the end user and not just a vague 500.
2024-09-05 11:18:38 +02:00
1a96269be0 DEV: adds topic_url/topic_title placeholders (#28754)
`topic_tags_changed` trigger now fills the {{topic_url}} and {{topic_title}} placeholders. `topic_url` is the relative URL.
2024-09-05 11:18:26 +02:00
dc1afeac89 FIX: ensures message field is rendering placeholders (#28753)
A previous commit had broken this codepath, this commit ensures it's fixed and is adding a test. It's not testing the copy/paste behavior as fairly complex to test.
2024-09-05 11:18:21 +02:00
b7beab5531 Build(deps-dev): Bump puppeteer-core from 23.2.2 to 23.3.0 (#28743)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 23.2.2 to 23.3.0.
- [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.2.2...puppeteer-core-v23.3.0)

---
updated-dependencies:
- dependency-name: puppeteer-core
  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-09-05 11:03:13 +02:00
105da5deea Build(deps): Bump @faker-js/faker from 8.4.1 to 9.0.0 (#28744)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 8.4.1 to 9.0.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/v8.4.1...v9.0.0)

---
updated-dependencies:
- dependency-name: "@faker-js/faker"
  dependency-type: direct:production
  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-09-05 10:50:47 +02:00
448cb840af Build(deps-dev): Bump @ember/test-helpers from 4.0.3 to 4.0.4 (#28742)
Bumps [@ember/test-helpers](https://github.com/emberjs/ember-test-helpers) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/emberjs/ember-test-helpers/releases)
- [Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/commits)

---
updated-dependencies:
- dependency-name: "@ember/test-helpers"
  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-05 10:46:28 +02:00
e94707acdf DEV: Drop WithServiceHelper
This patch removes the `with_service` helper from the code base.
Instead, we can pass a block with actions directly to the `.call` method
of a service.

This simplifies how to use services:
- use `.call` without a block to run the service and get its result
  object.
- use `.call` with a block of actions to run the service and execute
  arbitrary code depending on the service outcome.

It also means a service is now “self-contained” and can be used anywhere
without having to include a helper or whatever.
2024-09-05 09:58:20 +02:00
c76ff5c994 FIX: Don't let static pages overflow on some devices (#28751)
Static pages such as /about, /faqs, /tos etc. currently overflow horizontally on some Android devices (reproducible on Samsung Galaxy A11). It seems like the `width: 100%` property on `.body-page` is what causing the problem, and removing it doesn't seem to break anything on the various devices that I've tested (desktop, iOS, Android).
2024-09-05 10:29:32 +03:00
Sam
340d51e4e0 Revert "DEV: update mini_racer to latest version (#28747)" (#28750)
This reverts commit 22e89157646fcd7716bdd7e6f1f1cd4ae5b3e4e7.

Sadly we are STILL seeing segfaults
2024-09-05 17:08:35 +10:00
f273e84c26 DEV: Change recommended banner dimensions to 1100x300 (#28749)
This makes the recommended width match the actual page width.
2024-09-05 08:55:08 +03:00
ff6e11df57 DEV: Introduce legacy pageviews flag (#28748)
This hidden setting will allow us to roll out changes
to pageview UIs and reporting in a controlled way.
2024-09-05 14:17:11 +10:00
Sam
22e8915764 DEV: update mini_racer to latest version (#28747)
This upgrades to node 22.7 version of V8 from 18.19

It corrects some multithreaded issues we saw in previous upgrades.
2024-09-05 14:11:06 +10:00
be5c37a6d4 UX: Apply admin UI to Badges (#28724)
* UX: Add a description about badges

* WIP: Apply admin UI guidelines

* FIX: Add routeModels to dbutton

Allows routeModels to be passed to a DButton along
with route, so we can use them as a LinkTo replacement
in more places.

Also fix up badges admin page header.

* UX: Reorder action buttons

* UX: Change header hierarchy to better align page's content structure

* UX: Update copy and remove unnecessary UI elements

* UX: Adjust header's icon spacing

* UX: Fix the header action buttons on mobile

* Apply prettier

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2024-09-04 20:18:23 -06:00
06d749eadd Build(deps-dev): Bump rubocop from 1.66.0 to 1.66.1 (#28738) 2024-09-05 00:36:13 +02:00
7109776ef2 Build(deps-dev): Bump rubocop-ast from 1.32.1 to 1.32.3 (#28734) 2024-09-05 00:35:26 +02:00
d3585dee0d Build(deps): Bump net-imap from 0.4.15 to 0.4.16 (#28735) 2024-09-05 00:35:11 +02:00
615f9a61bf Build(deps-dev): Bump yard from 0.9.36 to 0.9.37 (#28739) 2024-09-05 00:34:55 +02:00
c0e3dc7633 Build(deps): Bump rexml from 3.3.6 to 3.3.7 (#28741) 2024-09-05 00:34:44 +02:00