58016 Commits

Author SHA1 Message Date
Osama Sayegh
05685d430f
FIX: Make permalink search work even when there're 100+ permalinks (#31354)
Permalink search regressed in
https://github.com/discourse/discourse/pull/30633 where the search
implementation was changed from server side to client side. Prior to
that change, we included a `filter` param in the request to make the
server find permalinks that matched the given filter and return the
results limited to 100 records. However, with that change, we stopped
sending the `filter` param with the request, which made the server
always return the same 100 records which would then be filtered on the
client side. That means if a site has more than 100 records, any records
that don't make it in the first 100 will never be found using search.

Meta topic:
https://meta.discourse.org/t/permalinks-no-longer-has-a-way-to-search-or-show-all-permalinks/351922?u=osama
2025-02-16 00:19:16 +03:00
Penar Musaraj
aeb3d717dc
FIX: Don't show   in date to button (#31352) 2025-02-14 16:53:38 -05:00
Keegan George
878514af6e
DEV: Add ability to set disabled option on report filters (#31351)
This update adds the ability to conditionally control the `disabled`
property of the input on report filters.
2025-02-14 12:13:33 -08:00
Keegan George
f76d88063d
FIX: Missing link to deleted post in /my/deleted-posts (#31342)
## 🔍 Overview
A regression in https://github.com/discourse/discourse/pull/30604,
resulted in the title/link for deleted posts not being shown. This fix
ensures that the title is once again shown.

## 📸 Screenshots

### ← Before
![Screenshot 2025-02-13 at 14 14
08](https://github.com/user-attachments/assets/17da8119-e476-4458-bc19-3f55efac91b2)

### → After
![Screenshot 2025-02-13 at 14 13
42](https://github.com/user-attachments/assets/ba2389ba-6cad-4641-a2cb-d2a13c10c233)
2025-02-14 09:50:42 -08:00
Penar Musaraj
b01d4b1951
DEV: More targeted cleanup in plugin registry specs (#31333)
When running core specs with `LOAD_PLUGINS=1`,
`DiscoursePluginRegistry.reset!` throws a warning. Using specific
cleanup ensures that doesn't happen.
2025-02-14 10:28:29 -05:00
Kris
e5eeb642b9
DEV: include expandPinned in topic-list-main-link-bottom outlet (#31334)
Requested on Meta, seems reasonable:
https://meta.discourse.org/t/modify-topicexcerpt-template/352136
2025-02-14 09:37:07 -05:00
David Taylor
a0f681b256
DEV: Refactor chat HTML decorating (#31309)
Uses the new `<DecoratedHtml` component, which takes care of the full
decorate/render lifecycle. That means we can drop all the custom
modifiers/debouncing which chat was doing. It also naturally adds
support for `helper.renderGlimmer` in chat decorations.

This should resolve a number of subtle bugs related to chat message
decorations.
2025-02-14 11:34:39 +00:00
David Taylor
b2b9657a0b
FIX: Image uploads in site-settings and profile (#31350)
Followup to 310cd513d88e3670c7008682ae4b35414084a17d. The `uploadDone`
callback returns the whole upload object, so we need to extract the URL
from it in these cases.
2025-02-14 11:02:10 +00:00
Joffrey JAFFEUX
7779cf1e90
FIX: prevents double set in the same computation (#31348)
The current code was doing:
- initial value for `showPreview`
- setting another default value in `_setupPreview`

The fix is to move all the computation in one initial step when
initializing the property.
2025-02-14 11:52:55 +01:00
David Battersby
04531f1443
FIX: relative date format consistency (#31349)
This changes makes relative date formats consistent for both tiny and
medium formats.

Previously we were removing 12 hours from the date for medium format
when it was more than 2520 minutes (42 hours) but not for tiny date
formats.
2025-02-14 14:17:48 +04:00
David Taylor
54b1e3195c
DEV: Refactor composer preview rendering (#31308)
- Switch to use new `<DecoratedHtml` component (including
`renderGlimmer` support)

- Updates click handling to use `{{on` modifier instead of manual event
listener setup/teardown
2025-02-14 09:50:02 +00:00
David Taylor
35084d3089
DEV: Refactor PostList cooked HTML rendering (#31307)
- Remove JQuery

- Move decoration into `components/post-item`, instead of managing it
from the top-level user-stream component

- Use new `DecoratedHtml` component
2025-02-14 09:46:32 +00:00
Martin Brennan
b471e3d5ba
FEATURE: Allow showing only experiments on "What's new?" (#31347)
This commit allows admins to filter the list of feature
feed items on the "What's new?" page to _only_ show experiments.

This is useful to both find existing experiments they may have
enabled, and to get a better overview of new ones they would
like to try.

This will eventually not be required when we build a dedicated
config page for experiments.
2025-02-14 13:30:37 +10:00
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
Kris
fa8945fee2
UX: remove old menu border hack (#31344)
We used to hide the bottom border of the header buttons when menu panels
were open (so they'd appear connected), but this is no longer
necessary... so all this vestigial CSS does is sometimes create a stray
line like this:


![image](https://github.com/user-attachments/assets/12357bf3-2bc7-4604-8b76-7e54460a4175)
2025-02-13 18:04:47 -05:00
Jarek Radosz
be513ed9a3
DEV: Fix all mixed-decls sass deprecations (#31343)
```
WARNING: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.

More info: https://sass-lang.com/d/mixed-decls
```
2025-02-13 23:58:19 +01: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]
96e0a44dcf
Build(deps-dev): Bump diff-lcs from 1.5.1 to 1.6.0 (#31340)
Bumps [diff-lcs](https://github.com/halostatue/diff-lcs) from 1.5.1 to
1.6.0.
-
[Changelog](https://github.com/halostatue/diff-lcs/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/halostatue/diff-lcs/compare/v1.5.1...v1.6.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:15 +01:00
dependabot[bot]
c6e0d4dea0
Build(deps): Bump logger from 1.6.5 to 1.6.6 (#31341)
Bumps [logger](https://github.com/ruby/logger) from 1.6.5 to 1.6.6.
- [Release notes](https://github.com/ruby/logger/releases)
- [Commits](https://github.com/ruby/logger/compare/v1.6.5...v1.6.6)

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:10 +01:00
dependabot[bot]
741d471cd1
Build(deps): Bump aws-eventstream from 1.3.0 to 1.3.1 (#31339)
Bumps [aws-eventstream](https://github.com/aws/aws-sdk-ruby) from 1.3.0
to 1.3.1.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
-
[Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-eventstream/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.3.0...1.3.1)

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:02 +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
Kris
d8b45be25a
UX: prevent long category names from overflowing on mobile topic list (#31335)
Before:

<img
src="https://github.com/user-attachments/assets/a66dcbcd-3363-404b-bd12-422b536bad2c"
width="300" />

After: 

<img
src="https://github.com/user-attachments/assets/511a6545-c1f4-47bb-90f7-02e723ac08f7"
width="300" />
2025-02-13 16:26:22 -05: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
Bianca Nenciu
87a1d161c1
FIX: Minimum username length should be validated (#31332)
`@min_length_violation` was not defined and that made the range of
values error message to never be displayed.
2025-02-13 21:05:31 +02:00
Natalie Tay
5f00ae2ca9
DEV: Introduce plugin modifiers for post.cooked and topic.fancy_titles (#31261)
Related:
40fd82e2d1

This PR introduces three new plugin modifiers attached to 
- `basic_post_serializer.cooked`
- `basic_topic_serializer.fancy_title`
- `topic_view_serializer.fancy_title`

Implementation note: I had wanted to add them in the `Post` and `Topic`
models themselves, but they do not directly provide access to the
request's scope which is needed for the use case.
2025-02-14 00:19:50 +08: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
Bianca Nenciu
2b996a9d39
DEV: Rescue from each step of EnsureDbConsistency (#31313)
A failure early in the job would prevent the rest of the ensure
consistency methods to run.
2025-02-13 12:07:04 +02: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
c3109f2ddd
DEV: Fix dark-mode qunit "skipped" test color (#31327) 2025-02-13 04:27:12 +01:00
Jarek Radosz
97d030e864
DEV: Implement disabled state in Image control (#31324) 2025-02-13 03:56:47 +01:00
Penar Musaraj
e320a375d3
DEV: Remove redundant system spec (#31317)
This is covered by the two specs above it:

"automatically redirects when going to /signup" and "automatically
redirects when skipping the signup form"

(Plus, it doesn't do what it says on the label.)
2025-02-12 21:28:44 -05:00
Kelv
013bf88019
DEV: convert icon name earlier for plugins in test env (#31196)
This makes the backtrace for a deprecated icon name error clearer in
terms of pointing out which plugin the icon is being registered from.
The error will only be raised in the test environment.

This PR also extracts out to a separate module the hashmaps & logic for
converting FA4 era icons to discourse FA6 compatible icons. This
isolates that logic for reuse in DiscoursePluginRegistry - otherwise
pulling in the whole SvgSprite resulted in errors.
2025-02-13 07:20:23 +08: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
Ruben Oussoren
a585fc5a24
FIX: Calculate reaction_users_count in the bulk import script (#30964)
`reaction_users_count` should be calculated in the import script instead
of the converter.
2025-02-12 17:29:10 -05:00
Jarek Radosz
6c70825d3d
DEV: Fix pnpm dedupe workflow branch matching (#31322)
It was missing branches for updated namespaced packages
2025-02-12 23:22:26 +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]
b45044c6b8
Build(deps): Bump rack from 2.2.10 to 2.2.11 (#31321)
Bumps [rack](https://github.com/rack/rack) from 2.2.10 to 2.2.11.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.10...v2.2.11)

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:06 +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
e7c2c92961
DEV: Change the default value of glimmer_post_menu_mode to enabled (#31297) 2025-02-12 17:05:39 -03: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
Régis Hanol
2e10fe98a3
FIX: automatically redirect logged in users to topic when... (#31301)
...loading an invite link that points to a topic they already have
access to.

This "feature" was removed in 07ef1a80a1461123d602c57e366974aed265a91e
as part of the security fix.

Internal ref - t/145628
2025-02-12 17:48:59 +01: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