Commit Graph

340 Commits

Author SHA1 Message Date
Keegan George
c74c90bae5
DEV: Show form templates in the composer (#21190) 2023-05-29 14:47:18 -07:00
Sam
e63e193a0a
FEATURE: Fuzzy search in site settings and raise limit to 100 matches (#21572)
We have been struggling lately finding site settings due to 30 setting limit

This was introduced for performance reasons a while back but is no longer as
needed given that ember is faster.

Additionally searching is hard, so allow people to use fuzzy search against
setting name.
2023-05-16 18:23:05 +10:00
Daniel Waterworth
0a96579cef
DEV: Allow site setting errors to be displayed as html if they are safe (#21342)
This is only useful for plugins currently

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2023-05-04 15:01:19 -05:00
Jarek Radosz
584a3a4237
DEV: Remove unneeded optional chaining operators (#21019)
(and fix a typo, and remove an unnecessary `this.element` check)
2023-04-07 14:10:49 +02:00
Daniel Waterworth
355b44472b
DEV: Allow HTML errors whenever a popup is generated (#20989)
Follow-up-to: 6bbf832400
2023-04-06 10:00:54 -05:00
Daniel Waterworth
79c87b5003
FIX: Show better default error when failing to delete all user posts (#20985) 2023-04-05 14:26:00 -05:00
Ted Johansson
392cea5852
DEV: Only show plugin tab for admin (#20841)
As part of another regression, we realized that the plugins tab is visible to moderators, but they cannot interact with anything inside without triggering authorization errors.

This change hides the plugin tab for non-admin users.
2023-03-27 16:08:16 +08:00
Andrei Prigorshnev
19b0dbe59d
UX: Show titles on site settings navigation menu items (#20794)
In some languages, labels on the site settings navigation menu 
get truncated. This adds titles to menu items, so users can see 
untruncated labels on hover.
2023-03-24 20:46:10 +04:00
Régis Hanol
37609897e8
FEATURE: log manual bounce reset (#20758)
DEV: rename the route "/admin/users/:id/reset_bounce_score" to use dashes instead of underscores
2023-03-21 15:26:26 +01:00
David Taylor
d5c7b9f8df
FIX: Badge granting recursion error (#20750)
Moving the `grantBadge` action out of the actions hash caused it to clash with a method of the same name from the GrantBadgeController mixin. This commit renames the action.
2023-03-20 21:07:21 +00:00
David Taylor
faf2a8ada2
FIX: Error for admin-panel incoming email logs (#20738)
Followup to 64557c4076
2023-03-20 10:49:01 +00:00
David Taylor
74349e17c9
DEV: Migrate remaining admin classes to native syntax (#20717)
This commit was generated using the ember-native-class-codemod along with a handful of manual updates
2023-03-17 12:25:05 +00:00
David Taylor
64557c4076
DEV: Update admin models to native class syntax (#20704)
This commit was generated using the ember-native-class-codemod along with a handful of manual updates
2023-03-17 10:18:42 +00:00
David Taylor
9d1423b5aa
DEV: Drop impossible conditional from admin-logs-staff-action-logs (#20687)
`Object.keys(filters)` will never return 0
2023-03-16 12:27:27 +00:00
David Taylor
c190994046
DEV: Update admin modal controllers to native class syntax (#20685)
This commit was generated using the ember-native-class-codemod along with a handful of manual updates
2023-03-15 17:39:33 +00:00
David Taylor
e700f0af93
DEV: Update admin routes to native class syntax (#20686) 2023-03-15 13:17:51 +00:00
David Taylor
be354e7950
DEV: Update admin controllers to native class syntax (#20674)
This commit was generated using the ember-native-class-codemod along with a handful of manual updates
2023-03-15 09:42:12 +00:00
Kris
22a7818399
FIX: update LoadMore selector for user tables (#20676) 2023-03-14 11:10:51 -04:00
Kris
03e3fd742e
UX: some admin theme list style adjustments (#20625) 2023-03-10 15:15:31 -05:00
Kris
d28390054e
UX: style improvements to new user tables (#20530) 2023-03-06 09:30:48 -05:00
David Taylor
e08a0b509d
DEV: Support @debounce decorator in native class syntax (#20521)
The implementation previously generated a descriptor with an `initializer()`, and bound the function to the `this` context of the initializer. In native class syntax, the initializer of a descriptor is only called once, with a `this` context of the constructor, not the instance.

This commit updates the implementation so that it generates the bound function on-demand using a getter. This is the same strategy employed by ember's built-in `@action` decorator.

Unfortunately, this use of a getter means that the `@observes` decorator does not support being directly chained to `@debounce`. It throws the error "`observer must be provided a function or an observer definition`". The workaround is to put the observer on its own function, which then calls the debounced function. Given that we're aiming to reduce our usage of `@observes`, we've accepted the need for this workaround rather than spending the time to patch the implementation of `@observes`.
2023-03-03 11:48:58 +00:00
Kris
fac78413c8
REFACTOR: user directories without <table>, second attempt (#20515) 2023-03-02 15:10:19 -05:00
Kris
654ba44723
Revert "REFACTOR: user directories without <table> (#20316)" (#20513)
This reverts commit e206bd8907.
2023-03-02 12:52:02 -05:00
Kris
e206bd8907
REFACTOR: user directories without <table> (#20316) 2023-03-02 09:20:38 -05:00
Keegan George
bb0ef4c7b4
DEV: Show active categories in form templates customize table (#20498) 2023-03-01 12:37:14 -08:00
Keegan George
666b4a7e6b
DEV: Define form template field inputs (#20430) 2023-03-01 11:07:13 -08:00
Jarek Radosz
007cce62e6
DEV: Clean up settings component (#20485)
Async, modern syntax, no `on()` component hooks, const extraction, sorted props, template tweaks, and a small filtering bugfix (filtering could throw errors after saving a category-selection setting)
2023-03-01 10:12:39 +01:00
Arpit Jalan
0fbe26c15f
Add a plugin outlet admin-users-list-show-before (#20477) 2023-02-28 19:16:40 +05:30
Bianca Nenciu
ccb345bd88
FEATURE: Update topic/comment embedding parameters (#20181)
This commit implements many changes to topic and comments embedding. It
deprecates the class_name field from EmbeddableHost and suggests using
the className parameter. discourse_username parameter has been
deprecated and it will fetch it from embedded site from the author or
discourse-username meta.

See the updated code sample from Admin > Customize > Embedding page.

* FEATURE: Add className parameter for Discourse embed

* DEV: Hide class_name from EmbeddableHost

* DEV: Deprecate class_name field of EmbeddableHost

* FEATURE: Use either author or discourse-username meta tag

* DEV: Deprecate discourse_username parameter

* DEV: Improve embed code sample
2023-02-28 14:31:59 +02:00
Jarek Radosz
5a384e60ac
DEV: Clean up showModal() calls (#20442) 2023-02-24 15:53:04 +01:00
Jarek Radosz
04659b0e41
DEV: Fix decorator deprecations (#20438)
…and correctly fix the decorateCookedElement id arg
2023-02-24 10:50:52 +01:00
David Taylor
1dca7b8b0a
FIX: Correct issues in admin-embeddable-host (#20439)
Classic Component arguments are not available in the constructor. Switch back to using `init()` for this component

Followup to a433b30650
2023-02-24 09:44:50 +00:00
David Taylor
4cadad9a53
FIX: Correct issues in admin-styles-editor (#20435) (#20437)
The save action clashed with the save component argument

Followup to a433b30650
2023-02-24 09:34:56 +00:00
David Taylor
ad0fd9919b
FIX: Correct issues in admin-theme-editor (#20435)
Followup to a433b30650

- `discourseComputed` -> `computed` on a getter (human error)
- `this.model` -> `this.theme` (human error)
- missing `setField` target param (human error)
- `onlyOverriddenChanged` and `save` action method name clashes (native-class-codemod error)
2023-02-23 23:03:27 +00:00
David Taylor
a433b30650
DEV: Convert admin component definitions to native class syntax (#20311)
This conversion was achieved using the ember-native-class-codemod, plus a handful of manual fixes/tweaks
2023-02-23 15:32:53 +00:00
chapoi
ab46a05d77
UX: User badges tweaks (#20408)
* UX: fix standalone badge padding

* UX: badge number formatting

* UX: copy

* DEV: Add LinkTo for the admin-badges/show count text

* UX: user badge awarded style update

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2023-02-23 03:21:26 +01:00
David Taylor
8d2fa1c184 DEV: Add native class shims for on/observes decorators 2023-02-22 09:32:48 +00:00
Keegan George
c43cb0c571
DEV: Apply optimistic update pattern to badge toggle (#20399) 2023-02-21 15:27:59 -08:00
Kris
d67ed8468f
UX: move vertical admin plugin nav to horizontal overflow nav (#20319) 2023-02-17 10:21:30 -05:00
Penar Musaraj
afdb4a084a
FIX: Reset admin theme controller on modal cancel event (#20289)
When installing themes using the "Install this theme component" button
on meta.discourse.org, we pass the repo name and URL via query params.

However, these stick. So if a user cancels the installation, on the
next navigation to the same route, they'll see the modal again.

This PR clears the query params  of the controller when dismissing the
modal.
2023-02-14 14:23:07 -05:00
David Taylor
6595374e49
DEV: Correct location of color-input template (#20278)
The JS component definition is in the admin bundle, but the template was in the main bundle. This was identified while attempting to colocate component templates in the discourse/app directory
2023-02-14 11:02:27 +00:00
Jarek Radosz
2d99e508c6
DEV: Add a plugin outlet for admin upgrade-header (#20274) 2023-02-14 00:03:46 +01:00
David Taylor
b718e3fffc DEV: Remove layoutName references to site-settings component template 2023-02-13 11:42:38 +00:00
David Taylor
076af132a1 DEV: Colocate all admin component templates 2023-02-13 11:42:38 +00:00
Keegan George
6338287e89
UX: Easily toggle badges in admin badge list (#20225) 2023-02-09 11:36:27 -08:00
Keegan George
871607a420
DEV: Create form templates (#20189) 2023-02-08 11:21:39 -08:00
Penar Musaraj
a86112fc25
FEATURE: Allow embedded view to include a header (#20150)
This commits adds the ability to add a header to the embedded comments
view. One use case for this is to allow `postMessage` communication
between the comments iframe and the parent frame, for example, when
toggling the theme of the parent webpage.
2023-02-06 11:10:50 -05:00
Penar Musaraj
6bbf832400
DEV: Allow HTML in grant admin dialog (#20133)
In a private plugin, we need to show an error message containing HTML
when the Grant Admin action fails. This change introduces a new flag
(`html_message: true`) that when used will allow the dialog to render
the HTML tags in the error message correctly.
2023-02-02 09:09:25 -05:00
David Taylor
fa30ab4ed7 DEV: Correct hbs prettier violations 2023-02-02 13:03:11 +00:00
David Taylor
9e440dca33 DEV: Rename all uses of PluginOutlet @args in core
The `args` argument is now deprecated. This commit uses a codemod (https://github.com/discourse/discourse-ember-codemods/tree/main/transforms/rename-plugin-outlet-args) to automatically rename all uses to `@outletArgs`.
2023-01-31 13:51:25 +00:00