20544 Commits

Author SHA1 Message Date
Krzysztof Kotlarek
2763e1726e
FEATURE: display process information on flag modal (#31300)
Information about the process is displayed on top of the flag modal.

In addition `allow_tl0_and_anonymous_users_to_flag_illegal_content` site
setting was renamed to `allow_all_users_to_flag_illegal_content` as it
is more descriptive.

<img width="629" alt="Screenshot 2025-02-12 at 3 58 12 pm"
src="https://github.com/user-attachments/assets/67c74ebc-6771-490d-b2c4-cbec25db8128"
/>
<img width="642" alt="Screenshot 2025-02-12 at 3 58 04 pm"
src="https://github.com/user-attachments/assets/5e4b8c84-601a-40c2-812f-b73d2b88a549"
/>
2025-02-14 11:26:20 +11:00
dependabot[bot]
8c9514b4ba
Build(deps-dev): Bump webpack from 5.97.1 to 5.98.0 (#31336)
Bumps [webpack](https://github.com/webpack/webpack) from 5.97.1 to
5.98.0.
- [Release notes](https://github.com/webpack/webpack/releases)
-
[Commits](https://github.com/webpack/webpack/compare/v5.97.1...v5.98.0)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-02-13 23:53:58 +01:00
dependabot[bot]
d064d5bd4a
Build(deps): Bump terser from 5.38.2 to 5.39.0 (#31338)
Bumps [terser](https://github.com/terser/terser) from 5.38.2 to 5.39.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.38.2...v5.39.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-13 23:28:35 +01:00
dependabot[bot]
f3d98f9e89
Build(deps-dev): Bump @swc/core from 1.10.15 to 1.10.16 (#31337)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.15 to
1.10.16.
- [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.15...v1.10.16)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-13 22:51:31 +01:00
benj
321a220b49
FIX: Post revision respects 'prioritize_full_name_in_ux' setting (#31293)
WIP

Before:
![Screenshot 2025-02-11 at 6 21
19 PM](https://github.com/user-attachments/assets/408b99a0-860a-47a0-a5e6-178583bcf17e)


After:
![Screenshot 2025-02-11 at 6 20
58 PM](https://github.com/user-attachments/assets/e70edb94-b927-43e7-99c4-23041759f47f)
2025-02-13 13:25:27 -06:00
Penar Musaraj
65d7ea2dbc
FIX: Keep user in same context after login (#31314)
This fixes the destination of the auth process in the following
scenarios:

- when landing on a PM or a topic as an anonymous user and then loggin
in
- when landing on a public topic, hitting Reply or Like and then logging
in
2025-02-13 10:35:00 -05:00
David Taylor
8d709aeb9c
DEV: Introduce DecoratedHtml component and use for discourse-banner (#31305)
Eventually, this new component will be used everywhere that we render
'decorated' HTML (e.g. all posts and chat messages). It takes the best
bits from our main widget-based post rendering and re-creates it in a
more ember-native way. For example:

- The HTML is first rendered in a detached DOM, so that requests for
images/iframes/etc. are not triggered until after the decoration

- HTML generation and decoration is done in a helper (i.e. during the
'render' phase of the runloop). I think that's the 'most Ember
compatible' way for us to do this. It means that components added via
`renderGlimmer` will be rendered in the same runloop, and it means that
things like `schedule("afterRender")` will work exactly as expected.

- HTML will be re-rendered and re-decorated whenever the `@html` or
`@decorate` arguments change

- BUT, `untrack` is used to ensure that reactive state accessed inside
the decorate function will not trigger a re-render. This is mostly for
compatibility with existing decorators, and we may want to make
reactivity opt-in in future

- A self-contained `renderGlimmer` system is included. This will allow
`helper.renderGlimmer` to be used for any content in these components.
Implementing it in a self-contained way rather than using the service
means that the component will work ok in unit tests, and that rendered
components will show up in the right place in the Ember inspector.

This commit only introduces the new component in DiscourseBanner.
Followups will introduce it elsewhere.
2025-02-13 12:20:52 +00:00
Joffrey JAFFEUX
3f0e84054b
FIX: ensures fields are correctly unregistered (#31329)
Ember workaround to ensure that a field with the same name is correctly
destroyed/created when changing the params and then correctly calling
registerField/unregisterFIeld.
2025-02-13 11:35:49 +01:00
Jarek Radosz
cbe9a9f33b
DEV: Don't run conditionally skipped tests (#31326)
Those still run `QUnit.testStart`/`QUnit.testDone` callbacks, and doing
so with no actual test body leads to flaky behavior.
2025-02-13 04:27:21 +01:00
Jarek Radosz
97d030e864
DEV: Implement disabled state in Image control (#31324) 2025-02-13 03:56:47 +01:00
Kris
82c7c1dbda
DEV: add missing button classes to topic-footer-mobile-dropdown (#31323)
Adds a couple missing classes to this mobile-specific button: 


![footer-btn](https://github.com/user-attachments/assets/9f6e9fdd-a34b-4c2b-98bd-7e55b698fb50)
2025-02-12 17:51:22 -05:00
Jarek Radosz
310cd513d8
DEV: Convert UppyImageUploader to gjs (#31310) 2025-02-12 23:31:42 +01:00
dependabot[bot]
faf0b6902c
Build(deps): Bump @faker-js/faker from 9.4.0 to 9.5.0 (#31320)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 9.4.0 to
9.5.0.
- [Release notes](https://github.com/faker-js/faker/releases)
- [Changelog](https://github.com/faker-js/faker/blob/next/CHANGELOG.md)
- [Commits](https://github.com/faker-js/faker/compare/v9.4.0...v9.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 23:04:40 +01:00
dependabot[bot]
dbb52e5f57
Build(deps): Bump ace-builds from 1.37.5 to 1.38.0 (#31319)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.37.5 to
1.38.0.
- [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.5...v1.38.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 23:01:52 +01:00
dependabot[bot]
c3588ce725
Build(deps): Bump prosemirror-view from 1.37.2 to 1.38.0 (#31318)
Bumps
[prosemirror-view](https://github.com/prosemirror/prosemirror-view) from
1.37.2 to 1.38.0.
-
[Changelog](https://github.com/ProseMirror/prosemirror-view/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/prosemirror/prosemirror-view/compare/1.37.2...1.38.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 22:58:43 +01:00
Kris
797bb8b8af
DEV: add btn-transparent class to advanced search button (#31316)
Noticed that this advanced search button unintentionally picks up some
unwanted styles in themes:


![image](https://github.com/user-attachments/assets/0bccddcd-3982-4b4d-9a98-efc2f91a9077)

adding the btn-transparent class should help
2025-02-12 16:21:55 -05:00
Sérgio Saquetim
d2a34bed84
DEV: Add post-menu-toggle-like-action transformer (#31295)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2025-02-12 16:29:59 -03:00
Guhyoun Nam
6f5cdfccf5
DEV: Add search result view appEvent trigger (#31287)
This PR adds a trigger for the `search-result-view` appEvents.
2025-02-12 10:39:37 -06:00
Joffrey JAFFEUX
963675c32e
FIX: do not show confirmation modal (#31304)
Currently when using the shortcuts to delete a post the UI would show
you the confirmation modal even if you don't have the right to do it.
This commit fixes the issue at the root in the
`deletePostWithConfirmation` function.
2025-02-12 17:04:08 +01:00
David Taylor
f5c2a4dbbd
DEV: Drop experimental enable_diffhtml_preview setting (#31306)
This was intended to provide a better UX for interactive elements in the
composer preview. However, the morphing strategy has irreconcilable
conflicts with our `decorateCooked` API, and so we have been unable to
enable this by default.

Going forward, we're focussing efforts on the WYSIWYG composer to
provide this kind of smooth UX, so we're dropping the
`enable_diffhtml_preview` approach.
2025-02-12 15:58:30 +00:00
Joffrey JAFFEUX
23e07fb076
DEV: supports pointerover and pointerout (#31302)
This commit adds support these events in widgets.

Usage in a widget:

```javascript
pointerOver(event) {}
pointerOut(event) {}
```
2025-02-12 14:54:17 +01:00
dependabot[bot]
820c8cb119
Build(deps): Bump the babel group with 2 updates (#31245)
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.7 to 7.26.8
- [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.8/packages/babel-core)

Updates `@babel/standalone` from 7.26.7 to 7.26.8
- [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.8/packages/babel-standalone)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-02-12 12:52:10 +01:00
dependabot[bot]
5b8a35c87d
Build(deps): Bump terser from 5.37.0 to 5.38.2 (#31289)
Bumps [terser](https://github.com/terser/terser) from 5.37.0 to 5.38.2.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.37.0...v5.38.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 12:44:15 +01:00
dependabot[bot]
238160b812
Build(deps): Bump prosemirror-view from 1.37.1 to 1.37.2 (#31186)
Bumps
[prosemirror-view](https://github.com/prosemirror/prosemirror-view) from
1.37.1 to 1.37.2.
-
[Changelog](https://github.com/ProseMirror/prosemirror-view/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/prosemirror/prosemirror-view/compare/1.37.1...1.37.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 12:11:46 +01:00
dependabot[bot]
a43d905ec6
Build(deps-dev): Bump ember-cli from 6.1.0 to 6.2.0 (#31229)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 6.1.0 to
6.2.0.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
-
[Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/ember-cli/ember-cli/compare/v6.1.0...v6.2.0)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-02-12 12:11:36 +01:00
dependabot[bot]
e7f56e121f
Build(deps-dev): Bump @swc/core from 1.10.12 to 1.10.15 (#31247)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.12 to
1.10.15.
- [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.12...v1.10.15)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 12:09:44 +01:00
dependabot[bot]
e96f78fcc8
Build(deps-dev): Bump @embroider/compat from 3.8.0 to 3.8.1 in the embroider group (#31246)
Bumps the embroider group with 1 update:
[@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat).


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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-02-12 10:48:05 +01:00
Martin Brennan
8ab57e4266
UX: Add enter key hints for search (#31298)
Adds https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint
to the search inputs.

This hint is used for mobile devices to guide what label
is shown on the onscreen keyboard. By default `return` is
shown, now for search we will see `search`.

Also add `type="search"` to the full page search input for
further guidance.
2025-02-12 15:51:44 +10:00
Ted Johansson
b3a686ca4e
DEV: Move image auto-grid back to experimental (#31296)
This feature was originally experimental. We made it baseline in #29572, however this was met with some pushback, so we have decided to make it experimental again.

The original PR couldn't be reverted, but this one basically does the same by cherry-picking all the changes back.
2025-02-12 11:18:24 +08:00
Ted Johansson
2cafd7e79b
DEV: Separate admins and moderators on about page (#31272)
This PR does some things to the about page:

- Hide the stat if there are 0 admins/moderators.
- Count admins and moderators separately, so a user who is both will add
to both counts.
- A user who is both will still show up as a moderator, even if `admins`
is hidden.
2025-02-12 09:57:53 +08:00
Kelv
441620ce61
DEV: delete nameValidation mixin (#31275)
This mixin is now ready for deletion, all uses of it has been removed
from plugins.
2025-02-12 09:50:13 +08:00
Jarek Radosz
b3b15bc7fc
DEV: Cancel header calculations on destroy (#31294) 2025-02-12 02:03:19 +01:00
Osama Sayegh
d0498c9e1d
FIX: Limit displayed groups in <GroupChooser /> to 100 groups (#31288)
Follow-up to https://github.com/discourse/discourse/pull/31271

In the linked PR, we made `<GroupChooser />` use the site's preloaded
list of groups instead of fetching the list from the servers every time
the component is triggered. However, when a site has thousands of
groups, the performance issue has shifted from the server to the browser
— `<GroupChooser />` takes several seconds to render in the browser for
a site with thousands of groups and the sites becomes completely
unresponsive while the component is rendering.

This PR changes the `<GroupChooser />` so it limits the displayed groups
to 100, with ability to filter the list to show more groups when there
are more than 100 groups.
2025-02-12 03:14:57 +03:00
Kris
4dc47fae44
DEV: use custom trigger for sidebar more section (#31285)
This uses the new `triggerComponent` functionality to implement a button
without the default `DButton` component classes, which helps themes
avoid applying unintentional styling.
2025-02-11 15:46:37 -05:00
Joffrey JAFFEUX
24b2e353a4
FIX: correctly display label (#31282)
A regression introduced in 32c8aa0aad880bcab372ffd75bce3c857060d721
incorrectly passes label to the trigger component, but also passes
translatedLabel instead of label to the menu.

The existing test was checking for the presence of "label", but it was
actually returning true because the test was showing "en.label". The
test has been modified in consequences.
2025-02-11 20:11:04 +01:00
Osama Sayegh
4db3389f3d
FIX: Don't load all groups when rendering <GroupChooser /> (#31271)
In a few places throughout the app, when we render the `<GroupChooser
/>` component, we fetch the full groups list of the site from the
`/groups/search` endpoint. This is wasteful because the full groups list
is already included in the preloaded data that's sent to the client app
on the initial page load, so we can just use this preloaded list for
`<GroupChooser />` and we can avoid making an HTTP request.

Internal topic: t/147297.
2025-02-11 21:32:02 +03:00
Mark VanLandingham
3e056b5127
FIX: JS error when .header-cloak isn't present (#31281)
With some customizations, this element may not be on the page. Instead
of erroring, just continue on without the cloak.
2025-02-11 12:28:49 -06:00
Joffrey JAFFEUX
32c8aa0aad
DEV: supports triggerTag on DMenu (#31278)
This property allows to have a custom component for the DMenu trigger
instead of using a `DButton` which comes with its own css class for
example.

Example:

```gjs
const myComponent = <template><span ...attributes>test</span></template>;
<DMenu @triggerComponent={{myComponent}}>...</DMenu>
```

⚠️ It's important to pass the attributes otherwise your custom
trigger won't work.
2025-02-11 18:19:00 +01:00
Ella E.
32704c42d0
UX: Update banner image field to use help text (#30666)
### What's changed?
- Add support for`@helpText` in the FormKit component.
- Updated the about config page to replace `@description` with
`@helpText` for the banner image field

### Before
<img width="525" alt="image"
src="https://github.com/user-attachments/assets/e8cdcca7-1b46-406f-8b6b-815e65dd5d9c"
/>

### After
<img width="256" alt="image"
src="https://github.com/user-attachments/assets/8656b866-5654-4f67-8515-f58a7b2b14c0"
/>


Internal: /t/138358/2
2025-02-10 19:48:31 -07:00
Martin Brennan
f95464ba81
Revert "UX: Hide inner site settings sidebar if admin sidebar enabled (#31047)" (#31267)
This reverts commit 91e9c1c81343990d5ebbb3a3bb7c68ec4445d610.

After feedback, for now we are reverting this change. This is not
permanent, the settings sidebar will be removed again, after we:

* Visually group the settings the same way as the sidebar does
  on All Settings
* Add more settings pages to the main admin sidebar to cover the ~250
  settings not yet represented there
2025-02-11 12:47:40 +10:00
Kris
08b8439e21
DEV: add transformer for default category view setting (#31264)
This allows us to set custom values here, like "Voting" from the topic
voting plugin:
https://github.com/discourse/discourse-topic-voting/pull/232
2025-02-10 16:48:11 -05:00
Kris
1d8cdfd5e0
UX: fix horizontal group nav on mobile (#31259)
This fixes the "all groups" link on mobile, follow-up to 50136ee

Before 


![image](https://github.com/user-attachments/assets/c6044ee6-3740-47a7-a006-239980bd7605)


After


![image](https://github.com/user-attachments/assets/9d090046-3131-4a9b-a21c-06c6a47c322b)
2025-02-10 11:43:00 -05:00
Amanda Alves Branquinho
e433be9f61
DEV: Add optional callback in notification dropdown action (#31257)
Modify the component UserNotificationDropdown to receive a function that
will be called after an user is ignored.
2025-02-10 13:26:19 -03:00
Kris
50136ee4e6
UX: switch group pages to horizontal nav (#31243)
This gets group pages on the same horizontal nav patterns as the user
profile pages. These pages need some more adjustments in general, but
this is a good start!

Before: 

![image](https://github.com/user-attachments/assets/2eaf5504-030f-4c91-a794-f66808fe0576)

![image](https://github.com/user-attachments/assets/5a726208-56ec-437c-8e53-c6edcd2ce772)


After:

![image](https://github.com/user-attachments/assets/f621c371-ac2c-4ab7-af18-d836bcec4c74)

![image](https://github.com/user-attachments/assets/c9eee57e-3e30-4ccb-82a2-29327dae5404)


Before: 

<img
src="https://github.com/user-attachments/assets/b58f1994-8ef8-4a67-9b37-bfee428c343b"
width="350" />

After:

<img
src="https://github.com/user-attachments/assets/013b1af6-ddb9-4a93-bcfe-37b2a9760d8b"
width="350" />
2025-02-10 10:38:31 -05:00
Ted Johansson
3d11e3ca10
DEV: Require at least one scope for API key granular mode (#31253)
Currently, if creating an API key in "granular" mode, and not selecting any scopes, a globally scoped API key is created. This can be surprising and is not ideal. Having a key with no scopes isn't useful in the first place, so this PR adds client- and server side validations to check that at least one scope is selected if using "granular" mode.
2025-02-10 13:22:08 +08:00
Penar Musaraj
54a52e5691
DEV: Improve checking for selected text (#30967)
After you've selected and deselected text, `selection.rangeCount` will
return `true` on future events. Checking for `selection.toString` is
more robust.

Followup to f1bdd86a8c9bec03b962167c37963b1d11d0e5ea
2025-02-07 12:13:39 -05:00
Isaac Janzen
6595b11e25
DEV: Add composer-service-cannot-submit-post transformer (#30903)
- Add `composer-service-cannot-submit-post` transformer to allow for disabling submit based on custom conditions
- Add tests for transformer
- Add a couple helpful appEvents, that plugins can use add custom error popups to plugin-defined fields.
2025-02-07 10:27:26 -06:00
Jan Cernik
42447770bf
FIX: Automatic auth flow with full page login/signup V3 (#31072)
This adds back the fixes from
https://github.com/discourse/discourse/pull/30928 that were reverted by
https://github.com/discourse/discourse/pull/30960.
2025-02-07 10:40:45 -05:00
David Battersby
891d8fe574
UX: use icon for create topic btn on mobile (#31237)
Updates the create topic button to be icon only (mobile) due to screen
space restrictions. The icon is also updated to make it easier to
understand what the button does, even when there is no text.
2025-02-07 18:20:19 +04:00
David Battersby
dc86ebe97a
UX: omit date in user stream for small action posts (#31236)
This change makes it possible to render the action code from small
action posts (ie. close topic etc) without the relative date. This is
applied in the user stream items to prevent duplication of dates.
2025-02-07 17:31:07 +04:00