Commit Graph

33683 Commits

Author SHA1 Message Date
Guhyoun Nam
f186e3e80b
DEV: Add categories_and_hot Route (#29948)
This PR adds a route to categories_and_hot and methods in categories_controller.
2024-11-27 11:11:33 -06:00
Penar Musaraj
43ae59bb9c
FIX: Do not ignore redirects containing "/login" in the path (#29960) 2024-11-27 11:22:45 -05:00
Keegan George
469374e063
DEV: Add new plugin outlets to edit topic area (#29951)
This PR adds new wrapper plugin outlets in the edit topic area. Adding these wrapper plugin outlets gives us easy access to `__before` and `__after`.
2024-11-27 08:12:16 -08:00
Jarek Radosz
5db0eba0a8
DEV: Autofix (w/ manual follow up) various qunit lints (#29950) 2024-11-27 13:02:55 +01:00
Arkshine
e4bb727d33
DEV: Add emoji-picker-footer plugin outlet (#29900) 2024-11-27 12:55:59 +01:00
Loïc Guitaut
d6bec460a8 DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
Ted Johansson
f4d0a77d5f
DEV: Add "delete user" options to illegal flag review (#29956)
We already add the "delete user" and "delete and block user" options to the drop-down for potential spam, but we should do this for potentially illegal posts as well.

This is entirely based on the implementation for the potential spam one, including caching the status on the reviewable record.

Also note that just as for potential spam, the user must be "deletable" for the option to appear.

I also took the liberty to move the options in the drop-down to what I think is a more intuitive place. (Between delete post and suspend/silence user.)
2024-11-27 17:23:57 +08:00
Ella E.
ea2a0f2c8e
DEV: refactor SCSS structure for admin table styling (#29953) 2024-11-26 22:08:52 -07:00
dependabot[bot]
c129d20322
Build(deps-dev): Bump rubocop from 1.68.0 to 1.69.0 (#29947)
* Build(deps-dev): Bump rubocop from 1.68.0 to 1.69.0

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.68.0 to 1.69.0.
- [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.68.0...v1.69.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* autofix

---------

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 <jradosz@gmail.com>
2024-11-27 01:51:01 +01:00
Martin Brennan
2ef9d6ac47
FEATURE: Allow admins to force refresh "What's new?" (#29911)
Sometimes changes to "What's new?" feed items are made or the feed items are
removed altogether, and the polling interval to check for new features is 1 day.

This is quite long, so this commit introduces a "Check for updates"
button for admins to click on the "What's new?" page which will bust
the cache for the feed and check again at the new features endpoint.
This is limited to 5 times per minute to avoid rapid sending of
requests.
2024-11-27 09:40:55 +10:00
Jarek Radosz
ed73d80cbd
DEV: Updates all assert.equal to qunit-dom or strictEqual (#29945)
There will eventually be lint for this.
2024-11-26 22:41:29 +01:00
Gabriel Grubba
51aa5ac43f
FIX: Solve flaky tests in PostMover (#29943)
* FEATURE: Add `freeze_original` option to `PostMover`

This option will allow the api user to specify if the original topic should be `frozen`(locked and posts not deleted neither moved)

With this option when moving topic posts your posts will be `copied` to the new topic and the original topic will be kept there.

* DEV: update tests to check raw instead of ids

* DEV: Implement `freeze_original` option for `PostMover`

update specs to use `*array` matcher

* DEV: add tests to `MovedPost` model in post mover

* DEV: Update `MovedPost` model rspec

* DEV: add back empty line to `post_mover.rb`

* FIX: Solve flaky tests in `PostMover`
2024-11-26 16:30:25 -03:00
David Taylor
d4d939bd66
PERF: Remove dynamic <template> invocations (#29942)
Using Ember's `<template>` dynamically is not supported. For every invocation, glimmer-vm has to run one-time setup, and will cache the result indefinitely. This leads to significant memory leaks, and eventual OOM errors.

This commit updates a handful of cases. We'll be following up with the more complex ones, and a linting rule to avoid re-introducing the problem in future.
2024-11-26 18:54:26 +00:00
Keegan George
5605bab2c2
FIX: Preserve history when routing to /filter route (#29929) 2024-11-26 13:26:25 -05:00
Kris
fd22dd179a
UX: attempt to reduce jumpy topic scroll in Firefox (#29941) 2024-11-26 13:17:06 -05:00
Gabriel Grubba
1c03a9f078
Revert "FEATURE: Add freeze_original option to PostMover (#29880)" (#29940)
This reverts commit b6ec07c3ef.
2024-11-26 14:47:39 -03:00
Gabriel Grubba
b6ec07c3ef
FEATURE: Add freeze_original option to PostMover (#29880)
* FEATURE: Add `freeze_original` option to `PostMover`

This option will allow the api user to specify if the original topic should be `frozen`(locked and posts not deleted neither moved)

With this option when moving topic posts your posts will be `copied` to the new topic and the original topic will be kept there.

* DEV: update tests to check raw instead of ids

* DEV: Implement `freeze_original` option for `PostMover`

update specs to use `*array` matcher

* DEV: add tests to `MovedPost` model in post mover

* DEV: Update `MovedPost` model rspec

* DEV: add back empty line to `post_mover.rb`
2024-11-26 14:25:55 -03:00
Jordan Vidrine
cddc018959
FIX: remove duplicate id (#29939) 2024-11-26 10:40:55 -06:00
Joffrey JAFFEUX
96b88f34a2
FIX: correctly destroy menu/tooltip when removed from dom
This fix will ensure we correctly play the close/destroy sequence in this situation.
2024-11-26 15:55:35 +01:00
Jan Cernik
93443adf22
DEV: Remove the experimental_ prefix for fullpage login (#29546) 2024-11-26 11:08:27 -03:00
Martin Brennan
c7e471d35a
FIX: Empty post reviewable ignore bundle causing client errors (#29932)
We ran into an edge case where it was possible for a
ReviewableFlaggedPost to end up in a state where it was hidden
and the topic was already deleted. This meant that the Ignore
action bundle for the reviewable ended up empty, with no associated
actions.

This commit fixes the server-side issue where this was ending up
empty. A further commit will aim to make the client more resilient
to these issues by gracefully failing if a reviewable action bundle
is detected with no associated actions.
2024-11-26 16:18:32 +10:00
Ted Johansson
15a61a0c1f
DEV: Change admin emoji delete button from icon to text (#29931)
The Admin UI guidelines states that buttons should have text, not icons. This was an oversight on the admin emoji listing.

Part of this change is also opportunistically removing the CSS file for admin emojis, none of which is used any more since the conversion.
2024-11-26 14:10:14 +08:00
Martin Brennan
e708c99e12
FIX: Hide broken theme about/license URLs (#29930)
At the top of the theme show page we have a link
to the theme About and License, which are supposed
to be URLs. However some themes have left placeholder
text in these metadata fields, which leads to a wonky
experience.

Instead, we can just not serialize these fields if they
are not valid URLs, then they will not show as links
in the UI.
2024-11-26 13:53:10 +10:00
Jarek Radosz
6e1d01802e
DEV: Clean up assertions in transformer-test (#29928) 2024-11-26 00:40:03 +01:00
Jarek Radosz
613dea61a2
DEV: Allow ember hash as a context in applyValueTransformer (#29922)
This unlocks the ability to use that function directly in templates:

```hbs
{{applyValueTransformer
  "foo-bar"
  @defaultValue
  (hash arg1=@arg1 arg2=@arg2)
}}
```
2024-11-25 22:48:00 +01:00
Jan Cernik
a964e62cd8
FIX: Discourse Connect fixes for full page login (#29915) 2024-11-25 18:06:14 -03:00
Bianca Nenciu
5e734516db
DEV: Drop DISCOURSE_LIVE_SLOTS_SIDEKIQ_LIMIT (#29920)
This was used to track jobs that may leak memory, but proved to be too
noisy and not very useful.
2024-11-26 07:21:14 +11:00
Keegan George
1c4d5dae1c
DEV: Allow async calls to finish before removing uploads (#29918)
This PR simply moves the call to remove in progress uploads **after** the async markdown resolvers finish resolving. This is specifically for the case when markdown resolvers are async functions, such as in the case of Discourse AI's image caption feature. This ensures that the in progress upload doesn't get removed causing replace text having nothing to replace once the async call is finished.

No tests as there currently are no tests for this plugin API function, and it's a little tricky to test, especially with in progress uploads being a private property.
2024-11-25 11:10:27 -08:00
Penar Musaraj
e6fdfcdcd2
DEV: Remove experimental_topics_filter setting (#29902) 2024-11-25 10:49:40 -05:00
Jarek Radosz
433543a516
DEV: Refactor gjs topic-list (#29792)
Based on the initial review in #28934
2024-11-25 14:15:34 +01:00
David Taylor
bfe0eccdd9
FIX: Extension-less secure uploads (#29914)
Previously, the secure-upload redirection logic would fail for extension-less files. This commit updates it to work, and adds a spec for the behavior.

Extension-less file uploads are not allowed by default, so this is a very niche situation.
2024-11-25 12:18:21 +00:00
Osama Sayegh
118f7869bb
FEATURE: Add bulk destroy to admin users list (#29744)
This commit introduces a new feature that allows staff to bulk select and delete users directly from the users list at `/admin/users/list`. The main use-case for this feature is make deleting spammers easier when a site is under a large spam attack.

Internal topic: t/140321.
2024-11-25 11:13:35 +03:00
Ted Johansson
fd39753e58
DEV: Ignore normalize_emails when using SSO (#29890)
We recently tried to default the normalize_emails site setting to true to avoid spam. What this does is it considers e-mails the same regardless of plus addressing, e.g. bob+1@mail.com == bob+2@mail.com. This caused some problems for SSO users.

This PR makes it so that DiscourseConnect never normalizes e-mails.
2024-11-25 11:55:27 +08:00
Ted Johansson
88af23e1ca
DEV: Modernize admin user fields (#29843)
This PR modernizes the user fields area of the admin UI. It is largely based on the work on the emoji section.
2024-11-25 11:54:43 +08:00
Joffrey JAFFEUX
66409fa8b4
UX: improved collapsed drawer state/interactions (#29850)
- Clicking the channel title of a collapsed drawer will only open the drawer, and not open settings
- Remove the back button when the drawer is collapsed
- Uses same icon for toggling on chat that composer
- add max-width to minimised drawer + add hover effect
---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2024-11-25 03:39:03 +01:00
dependabot[bot]
1396dfabba
Build(deps-dev): Bump @swc/core from 1.9.2 to 1.9.3 (#29905)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.9.2 to 1.9.3.
- [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.9.2...v1.9.3)

---
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-11-24 22:45:28 +01:00
Juan David Martínez Cubillos
08440b0035
DEV: Add tl3_custom_promotions plugin modifier to tl3_promotions.rb (#29834)
* DEV: Add tl3_custom_promotions plugin modifier to tl3_promotions.rb

* added tests

* added tests for demotions

* changed argument order in test
2024-11-22 15:28:43 -05:00
Gerhard Schlager
0295b4165c
FIX: Permalink.create didn't work as expected anymore (#29895)
This moves the logic of setting the correct permalink values back into the controller. And it replaces the validation with a simpler one, that always works, even when the model is loaded from the DB.

Follow-up to #29634 which broke import scripts and lots of documentation on Meta.
2024-11-22 21:11:26 +01:00
Jordan Vidrine
44fbf1048c
UX: Multiple codeblocks fixes (#29898) 2024-11-22 13:52:23 -06:00
Penar Musaraj
a97ac905d1
Revert "UX: Codeblocks edits (#29893)" (#29896)
This reverts commit 667a09b159.
2024-11-22 12:09:40 -05:00
Joffrey JAFFEUX
f24d2b926f
FIX: makes tags reactive with docked header (#29894)
No test as it's complicated to have a very simple test for this and I don't want to write a system spec for such a very specific thing.
2024-11-22 18:00:11 +01:00
Jordan Vidrine
667a09b159
UX: Codeblocks edits (#29893) 2024-11-22 09:05:48 -06:00
Jarek Radosz
0641d3e4b3
DEV: Improve hbr topic list detection (#29892)
1. `addRawTemplate` is called too early for deprecation handlers to process its deprecation call, so toggle the hbr flag directly
2. move the deprecation handler to an initializer so that other (non-template) calls are always handled
3. move the debug logging to the handler
2024-11-22 14:28:01 +01:00
Jarek Radosz
b9838d6066
DEV: Fix theme name in this deprecation notices (#29888)
A followup to 019ba099c8
2024-11-22 10:24:02 +00:00
Régis Hanol
d71016522e
FIX: hide chat button in user card (#29887)
when the user isn't able to receive DMs (either because they've disabled it or because they're suspended for example).

Internal ref - t/142198
2024-11-22 09:05:58 +01:00
Akshay Birajdar
b138eaf9e5
FEATURE: Add Bulk actions to /filter page (#29420)
- Add bulk actions component on /filter page for both desktop & mobile view.
- Add system specs to assert bulk actions to be available on /filter page.
2024-11-22 11:51:06 +11:00
Bianca Nenciu
250a145361
DEV: Fix undefined variable (#29876)
Follow up to commit 429cf656e7.
2024-11-21 20:23:20 +02:00
Amanda Alves Branquinho
02ad1f9cd5
Dev/add outlet for participant (#29864)
* DEV: add outlet for topic participant

* format topic participant file

* Update app/assets/javascripts/discourse/app/components/topic-map/topic-participant.gjs

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

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-11-21 14:41:03 -03:00
David Taylor
019ba099c8
DEV: Unsilence this-property-fallback deprecation (#29855)
This one has the potential to be very noisy, so a special dedupliation handler is introduced.

https://meta.discourse.org/t/337276
2024-11-21 16:35:05 +00:00
Renato Atilio
6e5d4ee492
DEV: refactor composer references on composer-container/-editor (#29629)
Most of it is removing the ComposerContainer > ComposerEditor indirect references to the composer service, so ComposerEditor now deals with the service directly.

Form template was moved from DEditor to ComposerEditor.
2024-11-21 13:29:12 -03:00