Commit Graph

57165 Commits

Author SHA1 Message Date
dependabot[bot] d039ed4241
Build(deps-dev): Bump rubocop-rspec from 3.2.0 to 3.3.0 (#30252)
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  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-12-13 02:03:28 +01:00
dependabot[bot] 2960b6938b
Build(deps-dev): Bump rubocop from 1.69.1 to 1.69.2 (#30249)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.69.1 to 1.69.2.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.69.1...v1.69.2)

---
updated-dependencies:
- dependency-name: rubocop
  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-12-13 02:03:20 +01:00
dependabot[bot] 399d008936
Build(deps-dev): Bump lefthook from 1.9.0 to 1.9.2 (#30254)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.9.0 to 1.9.2.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
- [Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evilmartians/lefthook/compare/v1.9.0...v1.9.2)

---
updated-dependencies:
- dependency-name: lefthook
  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-12-13 02:02:34 +01:00
dependabot[bot] f11b56336e
Build(deps-dev): Bump puppeteer-core from 23.10.3 to 23.10.4 (#30253)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 23.10.3 to 23.10.4.
- [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.10.3...puppeteer-core-v23.10.4)

---
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-12-13 02:02:04 +01:00
Amanda Alves Branquinho 462e613c08
FIX: pass correct arg to outlet (#30159)
* Fix:pass correct arg to outlet

* Update app/assets/javascripts/discourse/app/components/small-user-list.gjs

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-12-12 21:49:22 -03:00
Sérgio Saquetim c9247cde29
DEV: Only print console message about the Glimmer post menu once (#30255) 2024-12-12 20:40:52 -03:00
Jan Cernik 96417592a3
FIX: Show validation error on confirmation user fields (#30232)
* FIX: Show validation error on confirmation user fields

* test
2024-12-12 18:45:28 -03:00
Sérgio Saquetim c3e7d97048
DEV: Switch the glimmer post menu to auto and unsilence deprecations (#30161)
This commit starts the rollout of the Glimmer post menu:

- default to `auto`: after the upgrade, it will be enabled on all discourse instances that do not have incompatible customizations

- unsilence the deprecation messages in the console

- removes the setting `glimmer_post_menu_groups` as it's no longer in the test phase
2024-12-12 18:27:02 -03:00
Sérgio Saquetim 6fa52a6499
DEV: Improve tests and fixes small issues in the Glimmer Post Menu (#30234)
This commit improves some tests to using both the glimmer post menu and the widget version.

It also addresses some small issues in the Glimmer Post Menu:

- Deprecated Font Awesome icon in the Edit button
- Set correctly `aria-pressed` in the Like Count when the list of people who liked is visible
- Display the user tip for the Show More button
2024-12-12 15:36:05 -03:00
Mark VanLandingham bbb31b05ca
DEV: add full_move to MovedPost record small_action modifier (#30236)
This commit adds a new column full_move to the moved_posts table. This is useful to look back at history and determine if a whole topic was moved or partial.

This commit also adds an apply_modifier to skip the creation of the moved posts small action.
2024-12-12 11:47:14 -06:00
Régis Hanol 1791abab25
FIX: replace dropdown with button when there's only one option (#30242)
On mobile, in the topic footer buttons, instead of showing all the
buttons, we "merge" some of then into a dropdown.

If the dropdown has only one "option", then it doesn't make sense to
show the "ellipsis" button. Instead, we directly show the button of the
only available option. Saving a click on the way.
2024-12-12 17:56:30 +01:00
Kris 9694dc6cb0
DEV: prioritize new email styles over existing, to make customization easier (#30244) 2024-12-12 11:42:50 -05:00
Arpit Jalan 357189d9e7
DEV: add plugin outlets to accommodate customizations (#30222)
* DEV: add plugin outlets to accommodate customizations

* add the same outlet in glimmer file
2024-12-12 21:27:45 +05:30
Régis Hanol b74007db0a
FIX: restore zero-width space character... (#30243)
... that got **wrongly** (my bad) removed in 6ef0b5d508
2024-12-12 16:10:01 +01:00
chapoi ee567165f1
UX: increase button sizes and timeline size (#30240)
* UX: increase button sizes and timeline size

* UX: bring back tracking btn on topic timeline desktop

* Scope flexing topic-navigation area to mobile + make all buttons same font-size
2024-12-12 16:09:44 +01:00
Loïc Guitaut a589b48f9a DEV: Display better output when inspecting service steps
This patch aims to improve the steps inspector output:
- The service class name is displayed at the top.
- Next to each step is displayed the time it took to run said step.
- Steps that didn’t run are hidden.
- `#inspect` automatically outputs the error when it is present.
2024-12-12 15:21:10 +01:00
dependabot[bot] 3ca7c5e438
Build(deps-dev): Bump @swc/core from 1.10.0 to 1.10.1 (#30187)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.0 to 1.10.1.
- [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.0...v1.10.1)

---
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>
2024-12-12 14:06:57 +01:00
Gerhard Schlager c357e621ef
FIX: Link to group didn't work in locales other than English (#30237)
Group names are translated, so the slug changes depending on the default locale. This could break the link to the staff group.
2024-12-12 13:26:51 +01:00
dependabot[bot] 35ee746a14
Build(deps-dev): Bump puppeteer-core from 23.10.1 to 23.10.3 (#30212)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 23.10.1 to 23.10.3.
- [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.10.1...puppeteer-core-v23.10.3)

---
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-12-12 13:23:33 +01:00
Régis Hanol 44cabc3569
FIX: proper details / summary excerpt (#30229)
It doesn't make much sense to have the content of a `<details>` in an excerpt so I replaced them with "▶ summary" instead.

That way, they can't be (ab)used in user cards for example.

Reference - https://meta.discourse.org/t/335094
2024-12-12 09:09:49 +01:00
Martin Brennan 2cb49ed6a4
Merge branch 'main' into feature/wizard-look-and-feel-improvements 2024-12-12 16:53:48 +10:00
moin-Jana 7c00c52c36
UX: Rename private to personal messages in the interface (#29679)
Rename "private messages" to "personal messages" in the interface
2024-12-12 11:44:19 +11:00
Bianca Nenciu a835fd99bd FIX: Truncate bookmarks.name when remapping
The new name may be too long for the bookmarks.name column and raise an
exception. This changes allows the remapper to truncate the new value to
fit (truncates to 100 characters).
2024-12-11 18:53:17 -05:00
Krzysztof Kotlarek 8bd55c35fb
UX: Hide admin header for edit/new webhook (#30194)
In this PR, we added functionality to hide the admin header for edit/new actions - https://github.com/discourse/discourse/pull/30175

To make it work properly, we have to rename `show` to `edit` which is also a more accurate name.
2024-12-12 10:49:17 +11:00
Martin Brennan 203f93bcaf
FIX: Background color for settings overriden filter (#30221)
This was fixed previously but must have regressed, we
are showing a darker grey background around the
"Only show overridden" checkbox for our Settings tab
in config pages.
2024-12-12 10:27:37 +11:00
Keegan George 9df7d6f9a0
UX: Make radio buttons respect forum's accent color (#30235)
Similar to 601780aadf, this change ensures radio buttons respect the forum's accent color. Visual color change only, as such no tests.
2024-12-11 15:22:00 -08:00
Kris 9f68b037d4
UX: fix PM title editing layout (#30233) 2024-12-12 09:18:52 +11:00
Keegan George 601780aadf
UX: Make checkboxes respect forum's accent color (#30231)
This change ensures checkboxes respect the forum's accent color. Visual color change only, as such no tests.
2024-12-11 12:55:22 -08:00
Keegan George c9119099a9
FIX: Regression allowing async calls to finish before removing uploads (#30230)
This PR fixes a recent regression in e37952c9db that reverted a fix made in 1c4d5dae1c, which allowed for async calls to finish first before removing in progress uploads.
2024-12-11 10:35:46 -08:00
Kris 02eca6e489
UX: add header-categories-wrapper outlet (#30214) 2024-12-11 11:17:43 -05:00
Kris aabf174ac8
UX: fix admin sidebar header width (#30226) 2024-12-11 11:09:27 -05:00
Sérgio Saquetim 1505978586
DEV: Upgrade dependencies to Ember 5.12 (#30131) 2024-12-11 11:09:25 -03:00
Régis Hanol 6ef0b5d508
Cleanup mobile topic footer area (#30132) 2024-12-11 14:59:37 +01:00
Gary Pendergast 28a1463baf
FIX: When moving first posts between topics, ensure only relevant timings are moved (#30217) 2024-12-11 17:03:47 +11:00
Alan Guo Xiang Tan c97d1d7c59
DEV: Remove max compression level for brotli in assets.rake (#30220)
The `max_compress?` logic is totally broken at least when used for
brotli compression because we are only seeing 4 assets subjected to the
max compression level in production. Instead of fixing the broken logic,
we should just drop this unnecessary complexity cause things are easier
to reason about when we only have one compression level to deal with
across all assets.
2024-12-11 14:01:33 +08:00
Alan Guo Xiang Tan 19321a0b86
DEV: Fix `s3:upload_assets` not logging newlines (#30219)
Follow-up to 9a2e31b9af
2024-12-11 12:59:17 +08:00
Alan Guo Xiang Tan 9a2e31b9af
DEV: Use a `Logger` for `s3:upload_assets` (#30218)
Now that we run the `upload` method in different threads, we need to
synchronize writes to `STDOUT` which we can do so by using a `Logger`.

Follow-up to 49e8353959
2024-12-11 11:48:06 +08:00
Alan Guo Xiang Tan 49e8353959
FIX: `s3:upload_assets` was uploaded some source maps twice (#30216)
This is because Sprocket's manifest already contains the source maps.
The easy and safe fix here is to just use a `Set` to prevent
duplications.
2024-12-11 11:19:38 +08:00
Bianca Nenciu b9f8a77d9b
DEV: Upload assets to S3 in parallel (#30210)
In my local setup (with Minio), this uploads the assets to S3 ~40% faster.
2024-12-11 10:51:05 +08:00
Alan Guo Xiang Tan 864b7b6bc8
DEV: Fix flaky test (#30215)
The test was flaky and failing with the following errors:

```
Failure/Error:
  klass
    .connection
    .select_raw(relation.arel) do |result, _|
      result.type_map = DB.type_map
      result.nfields == 1 ? result.column_values(0) : result.values
    end

NoMethodError:
  undefined method `select_raw' for nil

./lib/freedom_patches/fast_pluck.rb:60:in `pluck'
./vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/relation/calculations.rb:354:in `pick'
./app/models/web_crawler_request.rb:27:in `request_id'
./app/models/web_crawler_request.rb:31:in `rescue in request_id'
./app/models/web_crawler_request.rb:26:in `request_id'
./app/models/web_crawler_request.rb:19:in `write_cache!'
./app/models/concerns/cached_counting.rb:135:in `block (3 levels) in flush_to_db'
./vendor/bundle/ruby/3.3.0/gems/rails_multisite-6.1.0/lib/rails_multisite/connection_management/null_instance.rb:49:in `with_connection'
./vendor/bundle/ruby/3.3.0/gems/rails_multisite-6.1.0/lib/rails_multisite/connection_management.rb:21:in `with_connection'
./app/models/concerns/cached_counting.rb:134:in `block (2 levels) in flush_to_db'
./app/models/concerns/cached_counting.rb:124:in `each'
./app/models/concerns/cached_counting.rb:124:in `block in flush_to_db'
./lib/distributed_mutex.rb:53:in `block in synchronize'
./lib/distributed_mutex.rb:49:in `synchronize'
./lib/distributed_mutex.rb:49:in `synchronize'
./lib/distributed_mutex.rb:34:in `synchronize'
./app/models/concerns/cached_counting.rb:120:in `flush_to_db'
./app/models/concerns/cached_counting.rb:187:in `perform_increment!'
./app/models/web_crawler_request.rb:15:in `increment!'
./lib/middleware/request_tracker.rb:74:in `log_request'
./lib/middleware/request_tracker.rb:409:in `block in log_later'
./lib/scheduler/defer.rb:125:in `block in do_work'
./vendor/bundle/ruby/3.3.0/gems/rails_multisite-6.1.0/lib/rails_multisite/connection_management/null_instance.rb:49:in `with_connection'
./vendor/bundle/ruby/3.3.0/gems/rails_multisite-6.1.0/lib/rails_multisite/connection_management.rb:21:in `with_connection'
./lib/scheduler/defer.rb:119:in `do_work'
./lib/scheduler/defer.rb:105:in `block (2 levels) in start_thread'
```

This was due to running the defer thread in an async manner which is
actually no representative of the production environment. It also
revealed a spot in our code base where writes are happening in a GET
request which can cause requests to fail if ActiveRecord is in readonly
mode.
2024-12-11 10:12:58 +08:00
dependabot[bot] 8524430b44
Build(deps): Bump actionpack from 7.2.2 to 7.2.2.1 (#30213)
Bumps [actionpack](https://github.com/rails/rails) from 7.2.2 to 7.2.2.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v8.0.0.1/actionpack/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.2...v7.2.2.1)

---
updated-dependencies:
- dependency-name: actionpack
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-11 08:10:17 +08:00
Discourse Translator Bot c65192a7a2
Update translations (#30202) 2024-12-10 20:16:34 +01:00
David Taylor e2dcb71c11
DEV: Fixup verbose localization method name (#30208)
Followup to e5a2ed596c
2024-12-10 17:30:36 +00:00
Isaac Janzen 00f8d7bb5d
DEV: Remove unused `binding.pry` (#30207) 2024-12-10 11:25:37 -06:00
Blake Erickson ed13ae7787
DEV: Fix specs for directory items controller (#30160)
The directory items controller specs that have a search param were not
matching how things worked in production. In a non-test environment the
UserSearch class depends on the `user_search_data` table being
populated, so the tests I corrected now use this table as well to match
reality.

Also added a new test to match the 20 user limit for search results that
currently exists. This 20 user limit is on the line between a bug and a
feature but it is how it is currently working so we should document
that. We have plans to increase this limit and it has been documented
here: https://meta.discourse.org/t/296485

This PR is a no-op and only changes the tests.

Co-authored-by: brrusselburg <25828824+brrusselburg@users.noreply.github.com>
2024-12-10 08:55:29 -07:00
David Taylor e5a2ed596c
DEV: make verbose localization work without mutating I18n.t (#30205)
We now extensively reference the `{ i18n }` named export of the `discourse-i18n` package, instead of calling `I18n.t` directly. That means that mutations of `I18n.t` no longer have any impact on most of the app.

This commit updates the verbose localisation logic to be switched by a boolean instead of a method mutation.
2024-12-10 15:46:36 +00:00
Penar Musaraj 0affb5c0bc
FIX: Composer position on DiscourseHub iOS (#30204)
Ensures composer does not go out of view after adding an upload.
2024-12-10 09:42:20 -05:00
zogstrip 34152f10b0 DEV: update .gitignore
to ignore any .devenv and .direnv files and directories

More documentations on

- https://devenv.sh
- https://direnv.net
2024-12-10 12:36:36 +01:00
zogstrip aaec80413d FIX: fast edit with a typographic character
When a post containing an apostrophe (') is being cooked, the apostrophe is being converted to the "typographic" version (’) (because we enable markdown-it's **typographer** mode by default in Discourse)

When you select text that contains such apostrophe and then try to save your fast edit, it fails miserably without any error.

That's because when you select text from the DOM, it uses the cooked version which has the typographic apostrophe.

When you save your fast edit, we fetch the raw version of the post, which has the "regular" apostrophe. Thus doing `raw.replace(selectedText, editedText)` doesn't work because `raw` has the regular apostrophe but `selectedText` has the typographic apostrophe.

Since it's somewhat complicated to handle all typographic characters, we would basically have to reverse the process done in `custom-typographer-replacements.js`, we instead bail out and show the composer when we detect such character in the selection.

Internal ref - t/143836
2024-12-10 12:13:10 +01:00
Alan Guo Xiang Tan f35128c6ed
DEV: Fix broken sidekiq logging due to eeb01ea0de (#30199) 2024-12-10 17:01:25 +08:00