57725 Commits

Author SHA1 Message Date
Krzysztof Kotlarek
cfcc60f847
FEATURE: new fast_typing_threshold site setting (#30865)
Rename `min_first_post_typing_time` to `fast_typing_threshold` and
provide admin 4 options:
- disabled
- low - 1 second
- standard - 3 seconds
- high - 5 seconds

Related PRs:
- https://github.com/discourse/discourse-zoom/pull/112
2025-01-28 09:53:03 +11:00
dependabot[bot]
b4130a76ad
Build(deps-dev): Bump rubocop-ast from 1.37.0 to 1.38.0 (#31021)
Bumps [rubocop-ast](https://github.com/rubocop/rubocop-ast) from 1.37.0
to 1.38.0.
- [Release notes](https://github.com/rubocop/rubocop-ast/releases)
-
[Changelog](https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop-ast/compare/v1.37.0...v1.38.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 23:34:39 +01:00
dependabot[bot]
ae1fd0fcf3
Build(deps-dev): Bump language_server-protocol from 3.17.0.3 to 3.17.0.4 (#31022)
Bumps
[language_server-protocol](https://github.com/mtsmfm/language_server-protocol-ruby)
from 3.17.0.3 to 3.17.0.4.
-
[Changelog](https://github.com/mtsmfm/language_server-protocol-ruby/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/mtsmfm/language_server-protocol-ruby/compare/v3.17.0.3...v3.17.0.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 23:34:26 +01:00
Kris
edb4be7c0f
A11Y: fix color issue with delete topic button in WCAG palette (#31023)
Reported here:
https://meta.discourse.org/t/wcag-high-contrast-color-palettes-for-low-vision/168795/30

Before: 


![image](https://github.com/user-attachments/assets/01ac2eca-0ccc-4220-bfa4-d0821f25aa84)


After: 


![image](https://github.com/user-attachments/assets/f7ebb673-1eec-4660-bb20-7e3c09e5464b)
2025-01-27 17:33:14 -05:00
dependabot[bot]
f0a8f95204
Build(deps-dev): Bump stylelint from 16.14.0 to 16.14.1 (#31018)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.14.0
to 16.14.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
-
[Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/stylelint/stylelint/compare/16.14.0...16.14.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 23:01:27 +01:00
Renato Atilio
7206a7182b
UX: re-check triggerRule to avoid autocomplete in code (#30961)
Re-checks triggerRule when navigating around with arrow keys and after
continued typing.

ref /t/-/23884
2025-01-27 18:55:24 -03:00
dependabot[bot]
a5f533667d
Build(deps): Bump the babel group with 2 updates (#31001)
Bumps the babel group with 2 updates:
[@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core)
and
[@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/core` from 7.26.0 to 7.26.7
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/babel/babel/commits/v7.26.7/packages/babel-core)

Updates `@babel/standalone` from 7.26.6 to 7.26.7
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/babel/babel/commits/v7.26.7/packages/babel-standalone)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 22:54:03 +01:00
Penar Musaraj
590c250239
A11Y: Show focus when tabbing to user menu items (bottom bar) (#31015) 2025-01-27 15:38:54 -05:00
dependabot[bot]
fa6b35b115
Build(deps): Bump @glimmer/syntax from 0.93.1 to 0.94.1 (#31003)
Bumps
[@glimmer/syntax](https://github.com/glimmerjs/glimmer-vm/tree/HEAD/packages/@glimmer/syntax)
from 0.93.1 to 0.94.1.
- [Release notes](https://github.com/glimmerjs/glimmer-vm/releases)
-
[Changelog](https://github.com/glimmerjs/glimmer-vm/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/glimmerjs/glimmer-vm/commits/HEAD/packages/@glimmer/syntax)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 20:48:34 +01:00
dependabot[bot]
bc051b4d0a
Build(deps-dev): Bump qunit from 2.24.0 to 2.24.1 (#31008)
Bumps [qunit](https://github.com/qunitjs/qunit) from 2.24.0 to 2.24.1.
- [Release notes](https://github.com/qunitjs/qunit/releases)
- [Changelog](https://github.com/qunitjs/qunit/blob/main/History.md)
- [Commits](https://github.com/qunitjs/qunit/compare/2.24.0...2.24.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 20:44:12 +01:00
Penar Musaraj
7303aded24
A11Y: Allow tabbing to members link in chat channel card (#31016) 2025-01-27 14:42:23 -05:00
Kris
85344b4b07
UX: sidebar "more" icon color fix (#31017)
Currently the vertical ellipsis is slightly darker than other sidebar
icons

Before: 

![image](https://github.com/user-attachments/assets/46f58bf0-681b-480a-b290-3ff1062a8c72)


After: 

![image](https://github.com/user-attachments/assets/5f84fa6b-111f-48c5-a501-c8cd2599dac7)
2025-01-27 13:47:45 -05:00
Kris
19aed18d4f
UX: hide user card focus until keyboard navigation begins (#31014)
When the usercard is opened, we manually assign focus to the first link
to capture focus, but this creates an undesirable focus ring for
visitors not relying on focus indicators for navigation.

With this update, the focus is assigned to the container rather than the
first link. This fulfills the goal of capturing focus within the user
card, but hides the focus ring until navigation within the card begins.

`tabindex="-1"` is necessary because this allows us to manually focus
the container (normally unfocusable) while removing it from the tab
order for subsequent navigation.

Before:


![image](https://github.com/user-attachments/assets/1da3a4bb-181b-4cf6-815b-66199757e300)



After:


![image](https://github.com/user-attachments/assets/dda06321-8558-46bf-b16b-dead68e48b92)

then on tab: 


![image](https://github.com/user-attachments/assets/c4cc3d7b-faaf-4bc0-a7c9-d6afef4c6009)

---------

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2025-01-27 12:34:04 -05:00
dependabot[bot]
89d358d811
Build(deps-dev): Bump jsuites from 5.8.5 to 5.9.0 (#31004)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.8.5 to 5.9.0.
- [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)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 16:38:50 +01:00
dependabot[bot]
fc77464751
Build(deps-dev): Bump rubocop-rails from 2.29.0 to 2.29.1 (#31009)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from
2.29.0 to 2.29.1.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
-
[Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop-rails/compare/v2.29.0...v2.29.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 16:38:07 +01:00
dependabot[bot]
fc95144728
Build(deps-dev): Bump @glint/template from 1.5.1 to 1.5.2 (#31007)
Bumps [@glint/template](https://github.com/typed-ember/glint) from 1.5.1
to 1.5.2.
- [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.1...1.5.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 16:36:35 +01:00
dependabot[bot]
a4dbdfd90a
Build(deps-dev): Bump puppeteer-core from 24.1.0 to 24.1.1 (#30966)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.1.0 to 24.1.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
-
[Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v24.1.0...puppeteer-core-v24.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 16:36:15 +01:00
Joffrey JAFFEUX
a52a8f4663
FIX: correctly closes panels in threads (#31013)
The following case was bugged:

- visit a thread in full page chat
- click channel title
- click back button in channel navbar
- 💥 you would have a channel with limited width as if there was
still the thread showing next to it, but it was empty
2025-01-27 16:34:56 +01:00
dependabot[bot]
c20aa5f671
Build(deps-dev): Bump @glint/core from 1.5.1 to 1.5.2 (#31006)
Bumps [@glint/core](https://github.com/typed-ember/glint) from 1.5.1 to
1.5.2.
- [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.1...1.5.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 15:26:07 +01:00
dependabot[bot]
0345ae64c2
Build(deps-dev): Bump eslint from 9.18.0 to 9.19.0 (#31005)
Bumps [eslint](https://github.com/eslint/eslint) from 9.18.0 to 9.19.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.18.0...v9.19.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 15:25:32 +01:00
dependabot[bot]
29c0ca9459
Build(deps-dev): Bump stylelint from 16.13.2 to 16.14.0 (#31002)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.13.2
to 16.14.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
-
[Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/stylelint/stylelint/compare/16.13.2...16.14.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 15:24:26 +01:00
Renato Atilio
0d240308c8
FIX: reset bool site setting not updating checkbox (#30999) 2025-01-27 10:53:27 -03:00
Renato Atilio
5d1c696240
UX: respect user locale when sending chat notices (#30996) 2025-01-27 10:53:13 -03:00
Joffrey JAFFEUX
83a47c36a5
DEV: implements model/afterModel/deactivate in drawer router (#29879)
These changes allow to load model when loading a screen of the drawer,
the underlying idea is to avoid having to rely on the global
`activeChannel`, this essentially makes each screen responsible for it's
data.

This change is also fixing a bug where clicking on a link routing to the
same screen of the drawer you are already on, would display a blank
drawer.
2025-01-27 11:03:15 +01:00
Joffrey JAFFEUX
2f3355695e
FIX: improves reliability of last visit line in chat (#30948)
This commit does several changes:

- it moves the ownership of the last message info to the channel instead
of storing it on the message, it avoids the need to iterate over every
messages
- makes an optimistic update of the last read message id
- adds a spec to confirm this behavior
2025-01-27 10:38:41 +01:00
Ted Johansson
ad8f9465c3
FIX: Minor i18n problems on admin webhooks pages (#31010)
This fixes two minor problems on the admin webhooks page.

- Wrong key used for edit button title in listing.
- Duplicated use of `i18n` leading to "en.Edit" in show page.
2025-01-27 13:46:35 +08:00
Martin Brennan
78a857931c
FEATURE: Improve wizard font selection and set Inter as default font for new sites (#30974)
This commit narrows down the list of fonts we offer
in our setup wizard and simplifies things to only
show a single font dropdown. This selection will then
set the `base_font` and `heading_font` site setting to
the same value.

For existing sites that may have set different values,
we will still show 2 dropdowns when visiting the wizard.

We are also changing our default font to the more modern
selection Inter, replacing Arial. Arial is very dependent
on system installed fonts, whereas Inter we can package
to everyone in Discourse.

Finally, for existing sites that have not changed their default
from Arial, we will keep that value via a migration so we do
not surprise site owners with a completely new font.
2025-01-27 11:29:55 +10:00
Martin Brennan
08ce000647
FIX: NULL IP for similar users caused incorrect message (#30981)
When suspending a user, we check for similar users by
IP address and show a number of and a list of them.
However we were checking this if the current user had a
NULL IP address, which found all other users with a NULL
IP. This doesn't make sense, this commit fixes the issue.
2025-01-27 09:17:30 +10:00
Kris
d2efdf5282
DEV: add missing button classes (#30997)
While updating a couple of themes I noticed some buttons were missing
`.btn-default`, which resulted in some inconsistent button styling
2025-01-24 16:33:06 -05:00
Jeff Wong
4c1c4ba8d4
FIX: enforce second factor with subfolders (#30992)
fix an improper redirect when enforcing second factor under a subfolder
install
2025-01-24 11:50:52 -08:00
Rafael dos Santos Silva
59a6775848
FIX: Don't return the last post we already have when paginating /posts (#30991) 2025-01-24 16:42:22 -03:00
Sam
9cc99ef6db
FIX: double click on tag INPUT breaking expected behavior (#30975)
Double clicking on the INPUT for tag entry
was cause the INPUT to be selected but the
actual tag entry and lookup to be hidden

This adds special case handling
2025-01-24 13:36:35 -05:00
Rafael dos Santos Silva
5a94ceda54
FIX: /posts pagination uses ID not created_at (#30990) 2025-01-24 15:05:47 -03:00
Kelv
85d53b650a
DEV: fix typo in admin.user.exports.started translation string (#30989)
(credit: @moin-Jana for spotting this)

Fixes the english translation string for `admin.user.exports.started`,
had an extra `collecting`.
2025-01-24 23:45:14 +08:00
Joffrey JAFFEUX
7ea2d3efe1
FIX: ensures category is rendered (#30988)
https://github.com/discourse/discourse/pull/30962 lost the rendering of
category in topic-label-content. This commit fixes it and adds a test to
ensure we render category and tags.
2025-01-24 16:28:54 +01:00
Roman Rizzi
a1bbbbda02
DEV: Promote historic post_deploy migrations for core plugins. (#30987)
This commit promotes all post_deploy migrations which existed in
Discourse v3.3.0 (timestamp <= 20240717053710)
2025-01-24 11:47:03 -03:00
Roman Rizzi
42fb6c9822
DEV: Promote historic post_deploy migrations (#30959)
This commit promotes all post_deploy migrations which existed in
Discourse v3.3.0 (timestamp <= 20240717053710)
2025-01-24 10:57:12 -03:00
David Taylor
2f19b17cd7
DEV: Remove DISCOURSE_HOSTNAME from test workflow (#30984)
This could cause assets (e.g. fonts) to try and load from
`www.example.com`, which led to an error. In the case of theme-qunit
tests this actually caused the run to fail. Not entirely sure why...
font failures shouldn't be catastrophic... but this is a good fix
regardless.
2025-01-24 10:35:57 +01:00
Kelv
71a9e9f598
DEV: add migration to remap from deprecated icon names for badges (#30983)
This is a very narrowly scoped migration to update badges.icon for two
deprecated names `smile` and `share-alt`. Following on from this PR that
updated the Badge seed fixture used as part of site creation:
https://github.com/discourse/discourse/pull/30942

The migration logic closely follows that of the [previous DB
migrations](https://github.com/discourse/discourse/pull/30100) that
updated all deprecated FA icon names, just that we reduce the mappings
to only look for `smile` and `share-alt`.
2025-01-24 15:26:39 +08:00
Alan Guo Xiang Tan
62c6ee0de7
FIX: Query syntax error in UserBadge.update_featured_ranks! (#30979)
This commit fixes an SQL syntax error in
`UserBadge.update_featured_ranks!` when
the `user_ids` param is an empty array `[]`.

This was causing the `Jobs::BackfillBadge` job to raise the following
exceptions:

```
Job exception: ERROR:  syntax error at or near ")"
LINE 6:   AND user_id IN ()
```

This commit fixes the same error in
`UserState.update_distinct_badge_count` as well

Follow-up to 3e4eac0fed05daedcdea50d6275e143469d55eda
2025-01-24 14:06:39 +08:00
Kelv
084ed7a457
DEV: refactor components dependent on UsernameValidation to use related tracked properties and native inputs (#30946)
This will update properties that are used by the UsernameValidation
mixin to autotracking and also updates the use of Input component in
these templates to native inputs. This will help the refactor of the
mixin to a helper class that uses the modern Ember reactivity system.
2025-01-24 13:57:16 +08:00
Sam
8be16c997e
FIX: truncate extremely long site name titles (#30977)
This corrects an issue where very long titles on
website would cause the backup not to save
cause filename was too long
2025-01-24 15:47:05 +11:00
Natalie Tay
8d45755a06
FEATURE: Allow setting locale from 'lang' param (#30952)
As we start to translate more pages, we'll need a way for other sites to
link back to our translated topics.

This commit gives us the ability to use the "lang" URL param to define what
language a site should be in.

Related: https://github.com/discourse/discourse-translator/pull/199
2025-01-24 11:53:13 +08:00
Keegan George
5d4bb4b54e
UX: Improvements to posts route (#30968)
This update makes some small improvements to the posts route front-end.
Specifically, it adds a title to the page, and it improves the
positioning of expand/collapse caret.
2025-01-23 19:04:43 -08:00
Renato Atilio
a8c89cbc79
FIX: broken tada emoji on subfolder account activation (#30972) 2025-01-24 00:01:37 -03:00
Alan Guo Xiang Tan
3764c6d809
FIX: Scrub Client-Ip request header in nginx (#30971)
We are scrubbing the `Client-Ip` request header at the nginx proxy
because it is not a request header which we have decided to trust. Our
application should only use the `X-Fowarded-For` request header instead.

This change helps to resolve
`ActionDispatch::RemoteIp::IpSpoofAttackError`
errors from being raised by the `ActionDispatch::RemoteIp` when
the request headers contains both `Client-Ip` and `X-Forwarded-For`.

At the time of writing,
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
also states that "The HTTP X-Forwarded-For (XFF) request header is a
de-facto standard header for identifying the originating IP address of a
client connecting to a web server through a proxy server."
2025-01-24 10:35:39 +08:00
Alan Guo Xiang Tan
3e4eac0fed
PERF: Enqueue Job::BackfillBadge in Jobs::BadgeGrant (#30945)
This commit updates the `Jobs::BadgeGrant` scheduled job to enqueue on
`Job::BackfillBadge` regular job for each enabled badge on the site.

The rationale for this change is that we started seeing the
`Jobs::BadgeGrant` job taking hours on sites with lots of enabled badges
as well as users because the job was backfilling all enabled badges
serially within the job. This is bad as it means that a `mini_scheduler`
thread is tied up
by this job thus reducing the overall capacity of `mini_scheduler` for
hours.
2025-01-24 09:35:01 +08:00
Kelv
b195b1c8a6
DEV: raise error on deprecated icon name caught on JS in system and qunit tests (#30942)
This PR raises an error on any deprecated icon names being converted by
`icon-library.js`, which will result in any deprecated icons introduced
in JS-land to fail qunit/system tests.

We'll do the same for `svg_sprite.rb` once I've resolved pre-existing
deprecated icons in core/plugins that's caught by the same exception
logic.
2025-01-24 09:26:00 +08:00
Gary Pendergast
37d1212865
FIX: Show the correct message when no user export exists. (#30970)
Followup to 7fc8d74f3eed52116add452b5321b41e02e04499

We need to check that the user export data exists before creating a model, since having an empty model will cause the UI to incorrectly think there's a user export to display.

This change shows the correct message, instead.
2025-01-24 11:38:07 +11:00
Kris
aa90ba2992
UX: fix admin dashboard link and style regressions (#30969)
Heading link regression reported here:
https://meta.discourse.org/t/admin-panel-reports-in-the-community-health-section-are-no-longer-clickable/347631

Also noticed some style regressions
2025-01-24 10:23:34 +10:00