Commit Graph

51799 Commits

Author SHA1 Message Date
Keegan George
eab9fbe277
DEV: Adds RRF algorithm and API for adding results to search (#24202) 2023-11-16 11:35:45 -08:00
Daniel Waterworth
e34d2cfde4
DEV: Remove unnecessary fab! blocks (#24419) 2023-11-16 13:22:08 -05:00
Daniel Waterworth
46e2523177
DEV: Remove custom field regexes (#24390)
As far as I can tell, this isn't used
2023-11-16 11:37:10 -06:00
Penar Musaraj
bcfb1a423d
FIX: Regression when enforced 2FA is enabled (#24415) 2023-11-16 11:52:12 -05:00
chapoi
f19fd75af9
UX: small alignment tweaks for chat thread list header (#24410) 2023-11-16 17:30:48 +01:00
David Taylor
849002e90b
DEV: Silence successful db:migrate output in docker.rake (#24417)
Followup to 9449a0e0ed
2023-11-16 16:07:36 +00:00
David Taylor
9449a0e0ed
DEV: Silence successful database migration output in github actions (#24416)
The output of db:migrate for a new database is 20k+ lines. We only need the output when an error occurs.
2023-11-16 15:55:41 +00:00
Isaac Janzen
8db0eb2afd
FIX: Navigate to search result url on click (#24414)
Broken in https://github.com/discourse/discourse/pull/24393
2023-11-16 08:04:49 -07:00
Mark VanLandingham
69464cbbe2
FIX: Add desktop notification translation for watching_category_or_tag (#24276) 2023-11-16 08:34:58 -06:00
David Taylor
e2e720b2b7
UX: Expand enforce_second_factor setting description (#24413) 2023-11-16 13:58:52 +00:00
Penar Musaraj
f08e5c897e
UX: Apply decorators to small action posts (#24397) 2023-11-16 08:52:07 -05:00
Constanza
28f27b2490
DEV: Adding polls, solutions, upload references and other improvements to the Discourse merger script (#23689) 2023-11-16 14:32:53 +01:00
David Taylor
5e272906ae
DEV: Refactor /my/* redirect handling (#24409)
This change means that the `/my` redirects will be handled by the ember 'unknown' route, and will therefore function correctly when using pure-ember transition methods like `router.transitionTo`
2023-11-16 12:16:06 +00:00
Renato Atilio
e9288896e7
DEV: user-card-content-container plugin outlet (#24374) 2023-11-16 09:12:09 -03:00
Alan Guo Xiang Tan
416cef9ed1
DEV: Respect SKIP_TEST_DATABASE when running rake db:create (#24407)
Why this change?

By default the `db:create` Rake task in activerecord creates the
databases for both the development and test environment. This while
seemingly odd is by design from Rails. In order to avoid creating the
test database, Rails supports the `SKIP_TEST_DATABASE` environment
variable which we should respect when creating the multisite test
database.
2023-11-16 20:01:12 +08:00
David Taylor
575c2c8573
DEV: Update homepage URL handling (#24373)
We want / to display one of our discovery routes/controllers, but we don't want to register it as `discovery.index` because that would break themes/plugins which check the route name. Previously, this was handled using a variety of approaches throughout the codebase (in discourse-location, discourse-url and mapping-router). But even then, it didn't work consistently. For example, if you used an Ember method like `router.transitionTo("/")`, an empty `discovery.index` page would be rendered.

This commit switches up the approach. `discovery.index` is now defined as a real route, and redirects to the desired homepage. To preserve the `/` as a 'vanity url', we patch the method on the router responsible for persisting URLs to the Ember Router and the browser. The patch identifies a relevant transition by looking for a magic query parameter.

In an ideal world, we wouldn't be patching the router at all. But at least with this commit, the workaround is all in one place, and works consistently for all navigation methods. The new strategy is also much better tested.
2023-11-16 11:58:04 +00:00
dependabot[bot]
b4ef866914
Build(deps): Bump the embroider group (#24391)
Bumps the embroider group in /app/assets/javascripts with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@embroider/test-setup](https://github.com/embroider-build/embroider/tree/HEAD/packages/test-setup) | `3.0.2` | `3.0.3` |
| [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat) | `3.2.3` | `3.3.1` |
| [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core) | `3.3.0` | `3.4.1` |
| [@embroider/webpack](https://github.com/embroider-build/embroider/tree/HEAD/packages/webpack) | `3.2.0` | `3.2.1` |
| [@embroider/addon-shim](https://github.com/embroider-build/embroider/tree/HEAD/packages/addon-shim) | `1.8.6` | `1.8.7` |


Updates `@embroider/test-setup` from 3.0.2 to 3.0.3
- [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/test-setup)

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

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

Updates `@embroider/webpack` from 3.2.0 to 3.2.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/webpack)

Updates `@embroider/addon-shim` from 1.8.6 to 1.8.7
- [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/addon-shim)

---
updated-dependencies:
- dependency-name: "@embroider/test-setup"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- 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
- dependency-name: "@embroider/webpack"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/addon-shim"
  dependency-type: direct:production
  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>
2023-11-16 12:31:25 +01:00
Martin Brennan
68a912952c
FIX: min/max not passed to NumberField for site settings (#24402)
When we started using NumberField for integer site settings
in e113eff663, we did not end up
passing down a min/max value for the integer to the field, which
meant that for some fields where negative numbers were allowed
we were not accepting that as valid input.

This commit passes down the min/max options from the server for
integer settings then in turn passes them down to NumberField.

c.f. https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162
2023-11-16 12:37:05 +10:00
Alan Guo Xiang Tan
c87f74cef3
DEV: Improve QUnit acceptance assertion for flaky test (#24400)
Why this change?

This test has been flaky on CI: https://github.com/discourse/discourse/actions/runs/6880353258/job/18714366795
However, the way the current assertions are written does not really
allow us to easily figure out what went wrong since we only know that
`#post_4` was not selected. It will be useful to know what was selected
instead of `#post_4` when the test fails.

What does this change do?

This change updates the assertion of the flaky test to reveal which post
was selected should the test fail.
2023-11-16 09:10:33 +08:00
Jarek Radosz
e56005b783
DEV: Remove category-macro (#24395)
This discourse-common decorator was dependent on the core app, hence creating a circular reference that was breaking the embroider upgrade. (see: #24391)
2023-11-16 00:16:19 +01:00
Alan Guo Xiang Tan
6ce55e5347
DEV: Run system tests for official themes (#24378)
Why this change?

As the number of themes which the Discourse team supports officially
grows, we want to ensure that changes made to Discourse core do not
break the plugins. As such, we are adding a step to our Github actions
test job to run the system tests for all official themes.

What does this change do?

This change adds a step to our Github actions test job to run the system
tests for all official plugins. This is achieved by the introduction of
the `themes:install_all_official` Rake task which installs all the
themes that are officially supported by the Discourse team.
2023-11-16 07:11:35 +08:00
Daniel Waterworth
0bc568f66d
FIX: Preload the right fields on categories (#24396) 2023-11-15 16:34:03 -06:00
dependabot[bot]
d454d2f25e
Build(deps): Bump google-protobuf from 3.25.0 to 3.25.1 (#24398)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 3.25.0 to 3.25.1.
- [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/compare/v3.25.0...v3.25.1)

---
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>
2023-11-15 23:19:14 +01:00
Isaac Janzen
a7ff465ca6
FIX: Redirect to highlighted search result on 'Enter` (#24393)
Raised in https://meta.discourse.org/t/keyboard-navigation-messes-up-the-search-menu/285405

We were incorrectly accessing the highlighted search result target's href which caused issues when navigating the topic list (eg /latest) with **j / k** and then immediately after accessing the search menu and navigating to and selecting a search result with the keyboard.  

### Current Behavior
Hitting enter on a search result redirects to the href of the topic in the topic list that was previously highlighted.

### Expected Behavior
Hitting enter on a search result redirects to the href of the highlighted search result.
2023-11-15 11:13:28 -07:00
Kris
e555e6f019
UX: fix reply-where category display (#24389) 2023-11-15 11:48:44 -05:00
Kris
91d5b66a9c
UX: html-safe dialog.message, clarify poll error (#24388) 2023-11-15 11:37:25 -05:00
David Taylor
ed611a63ae
DEV: Reduce Webpack memory use in development (#24387)
The default for webpack is to keep cached values indefinitely. In discourse, this unbound memory usage causes node to raise an OOM error after 50-100 rebuilds in development mode (with source maps enabled). Setting maxGenerations=1 means that the cache will be cleaned up regularly. With this change, I see no discernible increase in memory after 150+ rebuilds.
2023-11-15 16:13:40 +00:00
David Taylor
bb941cc850
DEV: Apply raw-hbs compilation via ember-cli-build.js (#24384)
Previously, the discourse-hbr plugin took the entire app tree as its input, and the result would then be merged into the app. This is wasteful and more likely to cause problems in the build pipeline.

See also https://github.com/discourse/discourse/pull/24376
2023-11-15 15:20:32 +00:00
chapoi
2e520468a8
UX: fix cmd-k position (#24385) 2023-11-15 16:03:58 +01:00
David Taylor
3e45837d78
DEV: Reorder custom ember-cli middleware to restore error page (#24383)
Ember-cli has built-in error pages when there is a build error. Previously these were not being used in Discourse because our custom proxy middleware was too early in the stack. This commit reorders things  so that the "broccoli-watcher" middleware runs before our custom proxy. It also disables the `historySupportMiddleware`, which doesn't make sense in our 'always proxy' setup.
2023-11-15 14:43:01 +00:00
chapoi
02cb262b2e
UX: full width table modal override (#24382) 2023-11-15 12:45:46 +01:00
chapoi
cd183edad1
UX: modal > remove obsolete wrapper class (#24381) 2023-11-15 11:33:23 +00:00
Joffrey JAFFEUX
ee2e1e04a8
UX: shorter copy link confirmation (#24380) 2023-11-15 11:30:27 +01:00
chapoi
f72899401d
UX: refactor .d-modal to use BEM and improve styling (#23967)
This PR refactors the following:
* leaving all the CSS applied to the old `modal-body` classes in their respective files
* made  new clean styling for `.d-modal` and refactored the template to use the new BEM classes
  * `inner-`, `middle-`, `outer-` container classes are gone and replaced with simplified `wrapper` and `container` classes  
  * use standardised max-sizes with modifiers `-large` and `-max`
  * lighter backdrop,
  * min-width to prevent puny modals
  * other styling changes regarding padding, close button,…
* pulled out all modal overrides into a general `modal-overrides` file + cleanup of outdated CSS
* pulled out login and create account modal styling into their own file, cause it's such a big override 
* removed old general login.scss file for mobile & desktop
* only kept some remainders I don't want to touch in `app/assets/stylesheets/common/base/login.scss`
2023-11-15 10:14:47 +00:00
Kris
38e53b5e8e
UX: improve mobile user card button display (#24311) 2023-11-14 17:13:37 -05:00
Kris
e69f93e729
UX: use mention mixin for chat mentions (#24319) 2023-11-14 17:13:15 -05:00
dependabot[bot]
a870361528
Build(deps-dev): Bump rubocop-discourse from 3.4.0 to 3.4.1 (#24375)
* Build(deps-dev): Bump rubocop-discourse from 3.4.0 to 3.4.1

Bumps [rubocop-discourse](https://github.com/discourse/rubocop-discourse) from 3.4.0 to 3.4.1.
- [Commits](https://github.com/discourse/rubocop-discourse/compare/v3.4.0...v3.4.1)

---
updated-dependencies:
- dependency-name: rubocop-discourse
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove the setting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2023-11-14 22:56:30 +01:00
Mark VanLandingham
00f7e58da4
DEV: Add support for condition option when adding toolbar buttons (#24370) 2023-11-14 15:40:34 -06:00
David Taylor
d589c4c47f
DEV: Refactor DiscourseURL redirects (#24372)
Previously this was being handled in two places:

1. As a monkey-patch to the Ember router. This would 'trick' the router into rendering a different route, but would leave the browser URL bar unchanged. Many possible bugs can come from this state

2. In the DiscourseURL.routeTo function. This functioned fine as a redirect, but wouldn't have any effect when the transition is handled by Ember

This commit refactors things so that the DiscourseURL redirects are handled the same as our permalinks. When the Ember 'unknown' route is hit, we check for a possible rewrite and redirect there. This is a supported way of doing things, and should be more robust going forwards.
2023-11-14 20:30:01 +00:00
David Taylor
eda79186ee
FIX: Recompile theme translations when fallback data changes (#24371)
Previously we would only recompile a theme locale when its own data changes. However, the output also includes fallback data from other locales, so we need to invalidate all locales when fallback locale data is changed. Building a list of dependent locales is tricky, so let's just invalidate them all.
2023-11-14 19:53:27 +00:00
David Taylor
69a70f8159
DEV: Refactor user index redirects into single place (#24369)
Previously we had similar logic in two places:

1. A DiscourseURL rewrite, based on a site setting
2. Some logic in the user-index route

This commit moves everything into (2) to make things clearer and more consistent
2023-11-14 19:00:05 +00:00
Penar Musaraj
c6ead3f5c4
FEATURE: Allow users to confirm session with passkeys (#24337)
We ask users to confirm their session if they are making a sensitive
action, such as adding/updating second factors or passkeys. This
commit adds the ability to confirm sessions with passkeys as an option
to the password confirmation.
2023-11-14 11:38:10 -05:00
Discourse Translator Bot
c36ee3bc02
Update translations (#24366) 2023-11-14 14:30:11 +01:00
dependabot[bot]
8ad0ff80f8
Build(deps): Bump loofah from 2.21.4 to 2.22.0 (#24356)
Bumps [loofah](https://github.com/flavorjones/loofah) from 2.21.4 to 2.22.0.
- [Release notes](https://github.com/flavorjones/loofah/releases)
- [Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/loofah/compare/v2.21.4...v2.22.0)

---
updated-dependencies:
- dependency-name: loofah
  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>
2023-11-14 13:07:47 +01:00
dependabot[bot]
eb58758ce3
Build(deps): Bump web-push from 3.0.0 to 3.0.1 (#24355)
Bumps [web-push](https://github.com/pushpad/web-push) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/pushpad/web-push/releases)
- [Commits](https://github.com/pushpad/web-push/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: web-push
  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>
2023-11-14 13:07:29 +01:00
dependabot[bot]
8a03d45621
Build(deps): Bump net-imap from 0.4.4 to 0.4.5 (#24354)
Bumps [net-imap](https://github.com/ruby/net-imap) from 0.4.4 to 0.4.5.
- [Release notes](https://github.com/ruby/net-imap/releases)
- [Commits](https://github.com/ruby/net-imap/compare/v0.4.4...v0.4.5)

---
updated-dependencies:
- dependency-name: net-imap
  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>
2023-11-14 13:07:11 +01:00
dependabot[bot]
c512552b4f
Build(deps): Bump ember-route-template in /app/assets/javascripts (#24353)
Bumps [ember-route-template](https://github.com/discourse/ember-route-template) from 1.0.2 to 1.0.3.
- [Commits](https://github.com/discourse/ember-route-template/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: ember-route-template
  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>
2023-11-14 13:06:53 +01:00
dependabot[bot]
5e2f0f00ab
Build(deps): Bump unf_ext from 0.0.8.2 to 0.0.9 (#24340)
Bumps [unf_ext](https://github.com/knu/ruby-unf_ext) from 0.0.8.2 to 0.0.9.
- [Changelog](https://github.com/knu/ruby-unf_ext/blob/master/CHANGELOG.md)
- [Commits](https://github.com/knu/ruby-unf_ext/compare/v0.0.8.2...v0.0.9)

---
updated-dependencies:
- dependency-name: unf_ext
  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>
2023-11-14 12:38:22 +01:00
Godfrey Chan
3a0cdd2734 DEV: Convert components to gjs
- convert chat/channels-list -> gjs
- convert chat/chat-channel-archive-status -> gjs
- convert chat/chat-channel-card -> gjs
- convert chat/chat-channel-leave-btn -> gjs
- convert chat/chat-channel-metadata -> gjs
- convert chat/chat-channel-preview-card -> gjs
- convert chat/chat-channel-status -> gjs
- convert chat/chat-channel-unread-indicator -> gjs
- convert chat/chat-composer-dropdown -> gjs
- convert chat/chat-composer-message-details -> gjs
- convert chat/chat-composer-upload -> gjs
- convert chat/channel -> gjs
- convert chat/header -> gjs
- convert chat/back-link -> gjs
- convert chat/channel-title -> gjs
- convert chat/close-button -> gjs
- convert chat/full-page-button -> gjs
- convert chat/left-actions -> gjs
- convert chat/right-actions -> gjs
- convert chat/toggle-expand-button -> gjs
- convert chat/index -> gjs
- convert chat/chat-emoji-avatar -> gjs
- convert chat/chat-mention-warnings -> gjs
- convert chat/chat-message-in-reply-to-indicator -> gjs
- convert chat/chat-message-separator-date -> gjs
- convert chat/chat-message-separator-new -> gjs
- convert chat/chat-message-text -> gjs
- convert chat/chat-message-thread-indicator -> gjs
- convert chat/chat-notice -> gjs
- convert chat/chat-notices -> gjs
- convert chat/chat-replying-indicator -> gjs
- convert chat/chat-side-panel-resizer -> gjs
- convert chat/chat-side-panel -> gjs
- convert chat/chat-skeleton -> gjs
- convert chat/chat-upload-drop-zone -> gjs
- convert chat/chat-upload -> gjs
- convert chat/chat-user-display-name -> gjs
- convert chat/export-messages -> gjs
- convert chat/button -> gjs
- convert chat/separator -> gjs
- convert chat/avatar -> gjs
- convert chat/error -> gjs
- convert chat/info -> gjs
- convert chat/left-gutter -> gjs
- convert chat/archive-channel -> gjs
- convert chat/channel-summary -> gjs
- convert chat/delete-channel -> gjs
- convert chat/edit-channel-name -> gjs
- convert chat/move-message-to-channel -> gjs
- convert chat/thread-settings -> gjs
- convert chat/toggle-channel-status -> gjs
- convert chat/mention_without_membership -> gjs
- convert chat/scroll-to-bottom-arrow -> gjs
- convert chat/item -> gjs
- convert chat/unread-indicator -> gjs
- convert chat/user-card-button -> gjs
- convert chat/full-page-chat -> gjs
- convert chat/reviewable-chat-message -> gjs
- convert chat/chat -> gjs
- convert chat/toggle-channel-membership-button -> gjs
- convert chat/chat-preferences -> gjs
2023-11-14 10:53:54 +00:00
Godfrey Chan
e1f74fcb4b DEV: prep for gjs conversion: rename .js -> .gjs
Some of these files are quite small, and if we rename them in the same
commit where we inlined the template, Git may choose to see them as
different files. This commit forces Git to recognize the rename, which
will preserve the lineage of the refactored files.
2023-11-14 10:53:54 +00:00