Commit Graph

57473 Commits

Author SHA1 Message Date
dependabot[bot]
06c90614f7
Build(deps): Bump ace-builds from 1.37.3 to 1.37.4 (#30679)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.37.3 to 1.37.4.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.37.3...v1.37.4)

---
updated-dependencies:
- dependency-name: ace-builds
  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>
2025-01-09 23:14:23 +01:00
dependabot[bot]
28c5761d87
Build(deps): Bump google-protobuf from 4.29.2 to 4.29.3 (#30678)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 4.29.2 to 4.29.3.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

---
updated-dependencies:
- dependency-name: google-protobuf
  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>
2025-01-09 22:41:17 +01:00
dependabot[bot]
5c4be8fc1c
Build(deps-dev): Bump parallel_tests from 4.8.0 to 4.9.0 (#30677)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 4.8.0 to 4.9.0.
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/grosser/parallel_tests/compare/v4.8.0...v4.9.0)

---
updated-dependencies:
- dependency-name: parallel_tests
  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>
2025-01-09 22:40:41 +01:00
Joffrey JAFFEUX
d91c48cece
FIX: correct emoji picker size in modal (#30675)
Following a change in b1e40d04b9 the width of the picker has been reduced in modals when it should have been reduced only when NOT in a modal.
2025-01-09 21:53:49 +01:00
Kris
d9c992bfdd
UX: follow-up sidebar variable fixes for c398933 (#30676) 2025-01-09 15:53:29 -05:00
Angus McLeod
427ea5301b
Apply the same url normalisation to embed_urls inserted in the PostCreator (#30641) 2025-01-09 14:59:08 -05:00
Régis Hanol
773857848b
FIX: lockup when navigating with j/k (#30674)
If, for some reasons, navigating between posts using j/k keyboard
shortcuts does not select any posts, there could be an infinite loop
due to setting the `direction` to `0` and then using it do "iterate"
over the arrays of available "articles".

Despite many attemps, I wasn't able to reproduce the issue reported in
https://dev.discourse.org/t/145565 so this is somewhat of a shot in the
dark.
2025-01-09 20:38:44 +01:00
Kris
c39893364b
DEV: fix and improve sidebar CSS variables (#30673) 2025-01-09 14:18:05 -05:00
dependabot[bot]
fa8e2b4af8
Build(deps-dev): Bump typescript from 5.7.2 to 5.7.3 (#30652)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)

---
updated-dependencies:
- dependency-name: typescript
  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>
2025-01-09 18:31:10 +01:00
Guhyoun Nam
989064841c
DEV: Add outletArgs for search filters PluginOutlet (#30671)
This PR adds an OutletArgs on search filters PluginOutlet.
2025-01-09 10:47:22 -06:00
Osama Sayegh
2c48c9aea7
DEV: Populate all subtypes of ReviewableQueuedPost (#30663)
Follow-up to 5a55c9062a

There are many scenarios that can result in creating a `ReviewableQueuedPost` record, however in the original commit we only added once scenario to the populate rake task. This commit adds the remaining scenarios to the rake task.
2025-01-09 17:41:11 +03:00
Joffrey JAFFEUX
b1e40d04b9
FIX: emoji picker followups (#30670)
This pull request is doing the following changes:

prevents clicking on a section to scroll the document body
do not show favorites section if empty
do not close the user-status modal on emoji selection
giving its own context for user-status picker, that way if you frequently use same emojis for the picker they will always be in favorites
2025-01-09 14:27:48 +01:00
Alan Guo Xiang Tan
8d3c86d984
DEV: Run linting workflow on our self hosted runners (#30661)
In 15a7a84d84, I changed the `linting`
workflow to run on `ubuntu-latest` because it is free and helps to free
up our self hosted runners for more important workflow jobs. However,
some devs rely on the `linting` workflow for feedback so we want to
provide this feedback as soon as we can. Therefore, we are putting the
`linting` workflow back on our faster self hosted runners.
2025-01-09 18:22:57 +08:00
David Taylor
69ec6d29d7
DEV: Resolve this-property-fallback deprecation in chat test (#30669) 2025-01-09 10:17:18 +00:00
David Taylor
adb4715109
DEV: Ensure consistency in PostCreator hook order (#30668)
Previously we would enqueue sidekiq jobs like `PostProcessCooked` **before** triggering the `topic_created` and `post_created` DiscourseEvents. That means that, depending on the speed/availability of Sidekiq, PostProcessCooked might start running on another host before the DiscourseEvents have been executed.

This commit moves the event triggers before enqueue_jobs, so that ordering is guaranteed to be consistent, regardless of Sidekiq performance.
2025-01-09 09:52:13 +00:00
Gary Pendergast
138b02448b
FIX: Improve the user badge alignment on mobile devices. (#30665)
Due to more explicit CSS flex arrangement on mobile devices, user badges were being shoved out of alignment. This change nudges them back into line.
2025-01-09 17:26:45 +11:00
Gary Pendergast
ec30b6f6c6
FIX: Inline oneboxes should obey the locale. (#30664)
Following on from f369db5ae9, we need to apply a similar fix to inline oneboxes, since they use a different code path to retrieve the onebox provider data.

This change ensures the Accept-Language header is sent by inline onebox requests, too.
2025-01-09 17:22:22 +11:00
Gary Pendergast
f53c734ba6
FEATURE: Add a onebox_locale site setting. (#30655)
Following on from f369db5ae9, this change adds the ability to choose a custom locale to send to onebox providers.

If this setting is left blank, it will fall back to using default_locale.
2025-01-09 14:11:37 +11:00
Ted Johansson
590b3e11fb
DEV: Convert admin API keys to conform to UI guidelines (#30660)
Re-opening of #30096. It was reverted because it was missing a sidebar link to Webhooks in the admin panel.
2025-01-09 10:57:40 +08:00
Krzysztof Kotlarek
9bf31add6a
FIX: do not memoize score types (#30657)
Score types are dynamic because of custom flags. Therefore we cannot memorize them on class level as it is not multisite safe.
2025-01-09 13:20:59 +11:00
Kelv
f8a4c983d1
DEV: replace nameValidation mixin with helper class (#30615)
This PR moves the logic from the nameValidation mixin to a helper class. I've opted to maintain the interface of the previous classes through native getters in combination with dependentKeyCompat so that we limit the amount of changes here (these are referenced in the string form and across classes/templates), and avoid introducing more computed properties from the old reactivity system (alias, readOnly etc.).

We now return a POJO for nameValidation since returning an EmberObject makes no difference here.

Deprecation warning added to the nameValidation mixin as it's still used in a plugin.
2025-01-09 08:20:21 +08:00
dependabot[bot]
f599f7155e
Build(deps-dev): Bump @glint/template from 1.5.0 to 1.5.1 (#30651)
Bumps [@glint/template](https://github.com/typed-ember/glint) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/typed-ember/glint/releases)
- [Changelog](https://github.com/typed-ember/glint/blob/main/.release-it.yml)
- [Commits](https://github.com/typed-ember/glint/compare/1.5.0...1.5.1)

---
updated-dependencies:
- dependency-name: "@glint/template"
  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>
2025-01-09 01:16:05 +01:00
dependabot[bot]
a25be3d2fc
Build(deps-dev): Bump lint-to-the-future from 2.6.1 to 2.6.2 (#30650)
Bumps [lint-to-the-future](https://github.com/mansona/lint-to-the-future) from 2.6.1 to 2.6.2.
- [Release notes](https://github.com/mansona/lint-to-the-future/releases)
- [Changelog](https://github.com/mansona/lint-to-the-future/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mansona/lint-to-the-future/commits)

---
updated-dependencies:
- dependency-name: lint-to-the-future
  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>
2025-01-08 23:58:30 +01:00
dependabot[bot]
65bb5c3791
Build(deps-dev): Bump @glint/core from 1.5.0 to 1.5.1 (#30649)
Bumps [@glint/core](https://github.com/typed-ember/glint) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/typed-ember/glint/releases)
- [Changelog](https://github.com/typed-ember/glint/blob/main/.release-it.yml)
- [Commits](https://github.com/typed-ember/glint/compare/1.5.0...1.5.1)

---
updated-dependencies:
- dependency-name: "@glint/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>
2025-01-08 23:58:23 +01:00
Gary Pendergast
8fea8e846f
UX: Use FontSelector for displaying font-related settings. (#30636)
3135f472e2 added a nifty new FontSelector component, which creates a dropdown where each item is styled in the font that it corresponds to.

This change uses the new component to style the base_font and heading_font site setting selectors, too.
2025-01-09 09:57:38 +11:00
David Taylor
88a4a7f4f0
DEV: Silence "glimmer topic list" success message in tests (#30654) 2025-01-09 09:37:37 +11:00
Sérgio Saquetim
e5d6ca0451
DEV: Fix triple click selection in WebKit derived browsers (#30628)
On WebKit-based browsers, triple clicking on the last paragraph of a post won't stop at the end of the paragraph, leaking the selection into the following nodes until it finds a non-empty node.

This commit introduces a workaround to fix this behavior.
2025-01-08 19:14:15 -03:00
Gary Pendergast
f369db5ae9
FIX: Ensure Onebox requests ask for the correct language. (#30637)
Onebox embeds currently default to accepting any language response from the destination, which can have some surprising behaviour. For example the `curl` equivalent of what Onebox does:

```
% curl -si -H "Accept-Language: *" 'https://developer.android.com/studio' | grep location:
location: /studio?hl=hi
```

This PR uses the value of `SiteSetting.default_locale` to populate the `Accept-Language` header, falling back to English if that isn't available, then finally accepting whatever language the destination makes available.
2025-01-09 09:08:27 +11:00
Mark VanLandingham
a29b964329
DEV: Add behavior transformer for full page search loadMore (#30648) 2025-01-08 15:44:58 -06:00
Joffrey JAFFEUX
40f7941f2b
FIX: emoji-picker minor improvements (#30645)
- uses emojiSearch to ensure we have the same result than autocomplete when filtering emojis (for example search aliases were not working correctly because of this)
- reset the visible sections when clearing filter to ensure we are not attempting to display all the emojis at once which would be slow
- prevents flashing of the full emoji list before showing filtered results
- correctly reset recent favorites and only show them when used
2025-01-08 22:10:50 +01:00
Blake Erickson
6811296b24
DEV: Make silence_reason and can_be_deleted optional (#30647)
In the api docs note that `silence_reason` and `can_be_deleted` are
optional responses for the admin user api response.

Follow up to: 9cf78ba195

> TODO @blake / @sam - this is not passing cause "silence_reason" is a conditional attribute
> (also can_be_deleted is) - we need to figure out how to not include it in the schema - it is not included
> in the admin response by design
2025-01-08 12:43:39 -07:00
Kris
55914bf9a3
UX: use font with more glyphs for discobot certificates (#30646) 2025-01-08 13:44:09 -05:00
Mark VanLandingham
4da7904ffd
REVERT: "DEV: Convert admin API keys to conform to UI guidelines"
This reverts commit d9ddc25808.

I noticed that Webhook admin UI is now inaccessible through the subheader
2025-01-08 11:03:40 -06:00
David Taylor
2ff511a4e4
DEV: Gracefully handle missing localstorage in dev-tools initializer (#30643)
I'm not sure if this is a real-world consideration... but our `test/smoke-test.mjs` script runs chrome with `--disable-local-storage`, so it needs to work.
2025-01-08 16:11:17 +00:00
David Taylor
498481e5be
DEV: Introduce 'dev tools' toolbar and plugin-outlet debugger (#30624)
This commit introduces a new 'dev tools' feature for core, theme and plugin developers. This is enabled by default in development environments, and can be enabled in production by running `enableDevTools()` in the browser console. 

When enabled, it will load a separate dev-tools JS/CSS bundle, and show a new toolbar on the left of the page. Dev Tools will remain enabled until the 'x' button is clicked, or `disableDevTools()` is run in the console.

The toolbar currently has three buttons:

- "Toggle safe mode" provides an easy way to toggle all themes/plugins on/off

- "Toggle verbose localization" is a toggle for our existing locale debugging feature

- "Debug plugin outlets" is inspired by the popular 'plugin outlet locations' theme component. It hooks into core's plugin outlet system, and renders a button into every single outlet. Those buttons have a tooltip which shows more information about the outlet, including all of the outletArg values. To inspect the value further, buttons allow the values to be saved to globals and logged to the console.

All of this is implemented under `/static`, and is only async-import()-d when the dev tools are enabled. Therefore, we can continue to add more tools, with zero performance cost to ordinary users of Discourse.
2025-01-08 15:26:18 +00:00
Natalie Tay
6dd306be55
DEV: Update a defensive test which case is no longer possible (#30640)
Introduced in https://github.com/discourse/discourse/pull/30263, it is also causing flaky tests.
2025-01-08 21:06:04 +08:00
Jordan Vidrine
9779cc9d5e
UX: Conditionally render permalinks filter (#30633) 2025-01-08 06:18:01 -06:00
David Taylor
6330e6ceae
DEV: Set glimmer-topic-list to 'auto' by default (#30582)
This will cause the glimmer topic-list to be enabled for sites with compatible customizations. Incompatible customizations will print a deprecation message to the console, along with a link to more information.

Also cleans up a handful of specs/behaviour which were revealed by switching the default.

More details at https://meta.discourse.org/t/343404
2025-01-08 12:00:56 +00:00
Ella E.
3f729b23bc
UX: Align silence reason header text with content alignment (#30639) 2025-01-08 04:42:42 -07:00
David Taylor
61450b0947
DEV: Drop deprecated decorateTopicTitle API (#30626) 2025-01-08 11:01:27 +00:00
Joffrey JAFFEUX
21c8376679
DEV: removes non needed special case (#30638)
Now that we correctly await for the modal to close, we dont need to special case and disable focusTrigger, the flow will now be:

- click an element of the menu
- wait for modal to close
- focus trigger
- trigger action, which will eventually open a modal and attempt to focus the first item
2025-01-08 11:59:16 +01:00
Joffrey JAFFEUX
6740a340ca
DEV: unifies emoji picker (#28277)
The chat emoji picker is renamed emoji-picker, and the old emoji-picker is removed.

This commit doesn't attempt to fully rework a new emoji-picker but instead tries to migrate everything to one picker (the chat one) and add small changes.

Other notable changes:
- all the favorite emojis code has been mixed into one service which is able to store one state per context, favorites emojis will be stored for all topics, and for each chat channel. Meaning that if you always use a specific emoji in a channel, it will only show as favorite emoji in this channel.
- a lot of static code has been removed which should improve initial load perf of discourse. Initially this code was around to improve the performance of the emoji picker rendering.
- the emojis are now stored, once the full list has been loaded, if you close and reopen the picker it won't have to load them again.

List of components:

- `<EmojiPicker />` will render a button which will open a dropdown
- `<EmojiPickerContent />` represents the content of the dropdown alone, it's useful when you want to render a picker from an action which is not the default picker button
- `<EmojiPickerDetached />` just a simple wrapper over `<EmojiPickerContent />` to make it easier to use it with `this.menu.show(...)`

---------

Co-authored-by: Renato Atilio <renatoat@gmail.com>
2025-01-08 11:41:36 +01:00
Ted Johansson
d9ddc25808
DEV: Convert admin API keys to conform to UI guidelines (#30096)
This PR updates the admin API keys page to follow the Admin UI Guidelines. In addition it modernizes all the JavaScript involved in this admin area.
2025-01-08 18:11:38 +08:00
Sam
9cf78ba195
FEATURE: show silence reason when viewing silenced users (#30635)
This adds the Silence Reason column to silenced user lists.

This feature helps combat large spam attacks cause you can quickly see
why a user was silenced and then bulk act on all the silenced users
2025-01-08 16:04:19 +11:00
Ella E.
a88c86beef
FIX: Cleaned up horizontal nav scrolling so arrows show/hide properly (#30621) 2025-01-07 18:07:44 -07:00
Osama Sayegh
4f9359d056
FIX: Name field should appear in the signup form for login-required sites (#30634)
Meta topic: https://meta.discourse.org/t/full-name-at-sign-up-went-missing/345662/17?u=osama

The preloaded `site` object for anons on login-required sites is a stripped down version of the full object with just a specific set of attributes and doesn't use the site serializer. This results in the `full_name_required_for_signup` and `full_name_visible_in_signup` attributes not making it to the client app when a login-required site is accessed by an anon, causing the name field in the signup form to not be rendered, even when it's required.

This commit includes those attributes in the stripped down version of the `site` object that's used for anons on login-required sites.
2025-01-08 03:49:34 +03:00
dependabot[bot]
a08d6e8f37
Build(deps-dev): Bump the embroider group with 2 updates (#30629)
Bumps the embroider group with 2 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat) and [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core).


Updates `@embroider/compat` from 3.7.1 to 3.8.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/compat)

Updates `@embroider/core` from 3.4.20 to 3.5.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/core)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: embroider
- dependency-name: "@embroider/core"
  dependency-type: direct:development
  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>
2025-01-08 01:14:49 +01:00
dependabot[bot]
a2739df96b
Build(deps): Bump ace-builds from 1.37.2 to 1.37.3 (#30630)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.37.2 to 1.37.3.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.37.2...v1.37.3)

---
updated-dependencies:
- dependency-name: ace-builds
  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>
2025-01-08 00:14:34 +01:00
dependabot[bot]
3bf20c6b33
Build(deps-dev): Bump @swc/core from 1.10.4 to 1.10.6 (#30632)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.4 to 1.10.6.
- [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.10.4...v1.10.6)

---
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>
2025-01-08 00:13:52 +01:00
dependabot[bot]
8f31211495
Build(deps): Bump connection_pool from 2.4.1 to 2.5.0 (#30627)
Bumps [connection_pool](https://github.com/mperham/connection_pool) from 2.4.1 to 2.5.0.
- [Changelog](https://github.com/mperham/connection_pool/blob/main/Changes.md)
- [Commits](https://github.com/mperham/connection_pool/compare/v2.4.1...v2.5.0)

---
updated-dependencies:
- dependency-name: connection_pool
  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>
2025-01-08 00:13:41 +01:00