Commit Graph

58603 Commits

Author SHA1 Message Date
2c54cd914b Build(deps-dev): Bump extralite-bundle from 2.10 to 2.12 (#32029)
Bumps [extralite-bundle](https://github.com/digital-fabric/extralite)
from 2.10 to 2.12.
-
[Changelog](https://github.com/digital-fabric/extralite/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digital-fabric/extralite/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 08:18:10 +01:00
3935cd7e0f Build(deps): Bump google-protobuf from 4.30.1 to 4.30.2 (#32028)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf)
from 4.30.1 to 4.30.2.
- [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/v4.30.1...v4.30.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 08:17:43 +01:00
e7c2846efc Build(deps-dev): Bump parser from 3.3.7.2 to 3.3.7.3 (#32027)
Bumps [parser](https://github.com/whitequark/parser) from 3.3.7.2 to
3.3.7.3.
-
[Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/whitequark/parser/compare/v3.3.7.2...v3.3.7.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 08:17:03 +01:00
c7abae2741 DEV: Disable site setting save/discard buttons while saving (#32030)
This change disables the save and undo buttons for site settings while the setting is being saved. This gives some visual indication that saving is underway, and prevents unnecessarily sending more than one request (which will be no-ops anyway.)
2025-03-27 09:43:10 +08:00
c671cfff84 DEV: Upgrade the post widgets to Glimmer components (#31375)
Co-authored-by: David Taylor <david@taylorhq.com>
2025-03-26 18:53:46 -03:00
4e918e1d3d DEV: Add value transformer to post-text-selection (#32023)
This update adds a new value transformer to the `PostTextSelection`
component. This allows for dynamically setting a `preventClose`
property. This is useful to prevent the `onSelectionChange` listener
from firing a toolbar close. In particular, we want to use this in
Discourse AI to prevent the selection change from closing the toolbar
when selecting new text inside the explain popup
(https://github.com/discourse/discourse-ai/pull/1221)
2025-03-26 11:28:31 -07:00
a6394f7f57 UX: change focus to focus-visible (#32021) 2025-03-26 18:51:39 +01:00
f277e0bce5 FIX: Reapply 94ee3554 (#32020)
This was accidentally reverted as part of the rebasing/merging of the
gjs conversions in b29e0b6e1b6001890ce92f96448258550f80132b

Co-authored-by: Robert <35533304+merefield@users.noreply.github.com>
2025-03-26 16:31:42 +00:00
45029c28ce UX: improve hashtag emoji alignment (#32019)
Improves alignment of emojis within hashtags.
2025-03-26 19:36:08 +04:00
7decb88ce0 UX: only check for toolbar-visible class in mobileView (#32018)
Follow-up to bbea7c3b11054b8e7faeee85a0336ecc45b84890

This behavior should only be applied to mobile view, otherwise there are
some scenarios (Android tablets) where the composer toolbar will become
inaccessible.
2025-03-26 10:43:59 -04:00
feb30c2382 Build(deps-dev): Bump sinon from 19.0.4 to 20.0.0 (#31981)
Bumps [sinon](https://github.com/sinonjs/sinon) from 19.0.4 to 20.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
-
[Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v19.0.4...v20.0.0)

---------

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 <jarek@cvx.dev>
2025-03-26 15:11:20 +01:00
ac26a52c6d DEV: Improve PageObjects::Pages::UserPreferencesSecurity#visit_second_factor (#32017)
This commit improves said method to ensure that user is redirected to
the right page before returning.

### Reviewer notes

Example of test flakiness:
https://github.com/discourse/discourse/actions/runs/14081653020/job/39435797236

```
Failure/Error: raise capybara_timeout_error

CapybaraTimeoutExtension::CapybaraTimedOut:
  This spec passed, but capybara waited for the full wait duration (10s) at least once. This will slow down the test suite. Beware of negating the result of selenium's RSpec matchers.

[Screenshot Image]: /__w/discourse/discourse/tmp/capybara/failures_r_spec_example_groups_user_resetting_password_when_desktop_when_user_has_multi_factor_authentication_configured_when_user_has_security_key_and_backup_codes_configured_should_allow_a_user_to_reset_pass_261.png

~~~~~~~ JS LOGS ~~~~~~~
~~~~~ END JS LOGS ~~~~~

Shared Example Group: "forgot password scenarios" called from ./spec/system/forgot_password_spec.rb:213

./spec/rails_helper.rb:426:in `block (3 levels) in <top (required)>'
./spec/rails_helper.rb:619:in `block (3 levels) in <top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/benchmark-0.4.0/lib/benchmark.rb:304:in `measure'
./spec/rails_helper.rb:619:in `block (2 levels) in <top (required)>'
./spec/rails_helper.rb:580:in `block (3 levels) in <top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/timeout-0.4.3/lib/timeout.rb:185:in `block in timeout'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/timeout-0.4.3/lib/timeout.rb:192:in `timeout'
./spec/rails_helper.rb:570:in `block (2 levels) in <top (required)>'
./spec/rails_helper.rb:527:in `block (2 levels) in <top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
```
2025-03-26 22:11:03 +08:00
adea877a45 Build(deps): Bump ace-builds from 1.39.0 to 1.39.1 (#31943)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.39.0 to
1.39.1.
- [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.39.0...v1.39.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-26 15:00:26 +01:00
5754368586 Build(deps-dev): Bump ember-cli-deprecation-workflow from 3.2.0 to 3.3.0 (#31963)
Bumps
[ember-cli-deprecation-workflow](https://github.com/ember-cli/ember-cli-deprecation-workflow)
from 3.2.0 to 3.3.0.
- [Release
notes](https://github.com/ember-cli/ember-cli-deprecation-workflow/releases)
-
[Changelog](https://github.com/ember-cli/ember-cli-deprecation-workflow/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/ember-cli/ember-cli-deprecation-workflow/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-26 14:41:34 +01:00
16857060df Build(deps-dev): Bump rubocop-ast from 1.41.0 to 1.43.0 (#32004)
Bumps [rubocop-ast](https://github.com/rubocop/rubocop-ast) from 1.41.0
to 1.43.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.41.0...v1.43.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-26 14:21:55 +01:00
f13ff5088c FIX: update chat icon position on mobile (#32016)
The chat icon was repositioned in #31951 but we should also account for
mobile, where it should appear before the hamburger icon.
2025-03-26 17:03:47 +04:00
75dd327c75 Build(deps-dev): Bump html-entities from 2.5.2 to 2.5.3 (#31964) 2025-03-26 13:09:05 +01:00
df69f1a628 Build(deps): Bump rdoc from 6.12.0 to 6.13.0 (#31966) 2025-03-26 13:08:22 +01:00
2441a54e33 Build(deps-dev): Bump @swc/core from 1.11.9 to 1.11.13 (#31984) 2025-03-26 13:07:00 +01:00
0ec5816f05 Build(deps-dev): Bump diff-lcs from 1.6.0 to 1.6.1 (#32003) 2025-03-26 13:03:58 +01:00
c3bd2f8629 Build(deps): Bump @babel/standalone from 7.26.10 to 7.27.0 in the babel group (#31980) 2025-03-26 13:02:58 +01:00
a302320791 Build(deps-dev): Bump lefthook from 1.11.4 to 1.11.5 (#32006) 2025-03-26 13:02:37 +01:00
b0780a482c Build(deps): Bump stringio from 3.1.5 to 3.1.6 (#32005) 2025-03-26 13:02:08 +01:00
042c480049 FIX: Do not @import .css assets for plugins (#32014)
b1924c35 switched our compiler to use `@import` internally for scss
entrypoints. This logic also applied to `.css` files, but unfortunately
sass doesn't do anything with `@import` of CSS files, so they'll be left
intact all the way to the browser. Continue using the old concatenation
approach for them in the compiler.

Followup to b1924c352487ab2c85ae50af45c5b3e098589014
2025-03-26 11:01:24 +00:00
b1924c3524 DEV: Allow stylesheet entrypoints to use @use (#31905)
Previously we would prepend extra content to developer-authored files,
which means adding `@use` in some files would throw an error because
`@use` must be at the top of any compiled file.

Instead, we can ensure any developer-authored files are on the load
path, and then `@import` them into the synthetic entrypoint.

Plugin color_definitions stylesheets are an edge case here, and will
need to be handled separately (or... wait until we move to native css
relative-color syntax, then we can drop color-definition stylesheets
altogether)
2025-03-26 09:15:32 +00:00
c8ccd4da31 DEV: Move setting deprecation check to SiteSetting::Update service (#31993)
This PR moves the logic that checks if a site setting we're trying to update has been deprecated from one of the controllers into a policy of the SiteSetting::Update service.

It also gives us the opportunity to shift the error message into a locale file.
2025-03-26 15:56:18 +08:00
525406ad20 UX: reposition chat header icon (#31951)
With header search we toggle the search icon when scrolling on topics,
which can feel visually jarring when the search icon is in the middle.

Switching the position of the chat icon in the header reduces the impact
of this.
2025-03-26 10:59:01 +04:00
d06c60ca7c FEATURE: add icons and emojis to category (#31795)
This feature allow admins to personalize their communities by
associating emojis or icons with their site categories.

There are now 3 style types for categories:
- Square (the default)
- Emoji
- Icon

### How it looks 🎨 

Adding an icon:

<img width="502" alt="Category with an icon"
src="https://github.com/user-attachments/assets/8f711340-166e-4781-a7b7-7267469dbabd"
/>

Adding an emoji:

<img width="651" alt="Category with an emoji"
src="https://github.com/user-attachments/assets/588c38ce-c719-4ed5-83f9-f1e1cb52c929"
/>

Sidebar:

<img width="248" alt="Sidebar with emojis"
src="https://github.com/user-attachments/assets/cd03d591-6170-4515-998c-0cec20118568"
/>

Category menus:

<img width="621" alt="Screenshot 2025-03-13 at 10 32 30 AM"
src="https://github.com/user-attachments/assets/7d89797a-f69f-45e5-bf64-a92d4cff8753"
/>

Within posts/topics:

<img width="382" alt="Screenshot 2025-03-13 at 10 33 41 AM"
src="https://github.com/user-attachments/assets/b7b1a951-44c6-4a4f-82ad-8ee31ddd6061"
/>

Chat messages:

<img width="392" alt="Screenshot 2025-03-13 at 10 30 20 AM"
src="https://github.com/user-attachments/assets/126f8076-0ea3-4f19-8452-1041fd2af29f"
/>

Autocomplete:

<img width="390" alt="Screenshot 2025-03-13 at 10 29 53 AM"
src="https://github.com/user-attachments/assets/cad75669-225f-4b8e-a7b5-ae5aa8f1bcad"
/>

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-03-26 09:46:17 +04:00
1fd553ccb0 UX: Add loading state to button when confirming password (#32012)
This commit adds a loading state to the confirm button in
`confirm-session` dialog.

This also unskips the flaky system tests in
`spec/system/forgot_password_spec.rb` as this change will allow us to
gather more information about why the test is flaky. The screenshots
which we have gathered when the test flakes does not allow us to know if
the button has been clicked or not before the test times out.
2025-03-26 12:58:47 +08:00
c91d0d7790 Bump version to v3.5.0.beta3-dev 2025-03-26 10:17:59 +08:00
7c61dbaf0d Bump version to v3.5.0.beta2 v3.5.0.beta2 2025-03-26 10:17:58 +08:00
bae4cd165f SECURITY: mutex around adding users to a group DM
Whenever you are about to reach the limit of users in a group DM, if you
send requests to add new users in parallel, they might all go through
ignoring the limit due to a race condition.

Internal - t/145895
2025-03-26 09:26:41 +08:00
58819d0f69 SECURITY: respect allow private messages prefernce for DMs 2025-03-26 09:26:36 +08:00
2452c3b529 DEV: Fix flaky search system tests (#32007)
After clicking on the search icon, we should ensure that the
`.search-container` has been rendered before moving on. Also update
assertions to properly rely on Capybara's autowait.

### Reviewer Notes

Example of flaky tests:
https://github.com/discourse/discourse/actions/runs/14057379759/job/39359791607
2025-03-26 09:11:08 +08:00
bbea7c3b11 REFACTOR: move desktop and mobile composer stylesheets into common (#31936)
This moves CSS from mobile/compose.scss and desktop/compose.css into
common/compose.scss and removes some old unused CSS in the process.

In addition:

* Prevents the grippie div from rendering on mobile, rather than hiding
the div with CSS
* Prevents the composer education messages from rendering on mobile,
rather than hiding them with CSS
* Wraps the `#draft-status` container with a condition instead of its
children, preventing the empty div from rendering when it's not used
* Adds a missing `btn-transparent` class to the mobile controls toggle
2025-03-25 16:09:09 -04:00
aa8a5ebd1e DEV: remove list-controls wrapper on tags index (#32002)
This `.list-controls` wrapper on the tags index has no specific styles
applied, and can easily pick up styles of the actual `.list-controls`
container on topic lists when the class is used in themes... so it's
more harmful than helpful (it's also not a list?).

Before:

![image](https://github.com/user-attachments/assets/ac32d4b2-e0be-422e-90f4-d4066304eb00)

![image](https://github.com/user-attachments/assets/4157d7d8-b4f1-4bde-acde-f08f544a23ea)


After (no visual changes):

![image](https://github.com/user-attachments/assets/7cbc9ce3-82b7-46c7-9c47-3b4086f84bae)

![image](https://github.com/user-attachments/assets/ec040df8-8b99-4c6b-95ff-01319c194931)
2025-03-25 15:54:10 -04:00
6aaddcf381 FEATURE: enable full page login by default (#31771)
This switches the signup/login UI to the full page experience by
default. This has been in use by many sites for multiple months and we
have ironed out many fixes in the meantime.

The `full_page_login` setting is also marked for removal in about
1.5mths, by the end of April 2025.
2025-03-25 13:43:51 -04:00
8fc2b74bf0 DEV: exposes parentName and name in onSet (#32000)
This allows more flexibility for custom behaviours.

Example usage:

```gjs
@action
onSet(value, { set, name }) {
  set(name + ".0.baz", value * 2)
}

<form.Object @name="something" as |object|>
  <object.Field @name="foo" @title="Foo" @onSet={{onSet}} as |field|>
    <field.Input />
  </object.Field>
</form.Object>
```
2025-03-25 18:20:36 +01:00
f01a658101 DEV: [gjs-codemod] add codemod commit to git-blame-ignore-revs 2025-03-25 16:59:45 +00:00
b29e0b6e1b DEV: [gjs-codemod] convert admin files to gjs
Updated using `@embroider/template-tag-codemod`, plus some manual fixups.
2025-03-25 16:59:21 +00:00
b203954060 DEV: [gjs-codemod] merge js and hbs 2025-03-25 16:59:13 +00:00
9f9282e070 DEV: [gjs-codemod] renamed js to gjs 2025-03-25 16:59:06 +00:00
596db5966c DEV: [gjs-codemod] renamed hbs to gjs 2025-03-25 16:58:57 +00:00
94ee3554da DEV: add plugin outlet to desktop & mobile Topic List Item after badges (#31998)
There is no current plugin outlet on the Topic List which allows one to
attach additional UI after the title without messing up the badge
display.

We can’t use `topic-list-after-title` because that will render before
the badge which looks untidy:



![](b29d5add40.png)

... and we can’t use`topic-list-before-category` because that’s not
always rendered when we drill into a Category.

The solution is a new plugin outlet located after the badge is rendered.
This needs to be on both the desktop and mobile flavours.

See discussion here:
https://meta.discourse.org/t/locations-plugin/69742/1144?u=merefield
2025-03-25 16:45:36 +00:00
37e72e9ad7 Update translations (#31994) 2025-03-25 17:22:59 +01:00
fe19a0aa0c DEV: Make styling bookmarks easier (#31979) 2025-03-25 11:02:11 -05:00
df412608c8 DEV: Split 2fa logic from account activation (#31974)
- This change separates the logic that handles 2fa flow, from the one
that deals with the user after it is authenticated.
2025-03-25 10:56:40 -03:00
3cf9f81552 DEV: Unksip flaky changing email system tests (#31991)
This commit unskips 3 flaky system tests and gives up on asserting that
redirecting is done correctly. This is because we have invested
considerable effort into this and cannot figure it out. The redirect is
tested by the client side anyway so there is still some test coverage.
2025-03-25 09:09:50 -04:00
0dd8358c3b Build(deps-dev): Bump lefthook from 1.11.3 to 1.11.4 (#31983)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.11.3
to 1.11.4.
- [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.11.3...v1.11.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 18:30:04 +08:00
52de68cb3a Build(deps): Bump nokogiri from 1.18.5 to 1.18.6 (#31985)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.18.5
to 1.18.6.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
-
[Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/sparklemotion/nokogiri/compare/v1.18.5...v1.18.6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 18:29:46 +08:00