Commit Graph

2510 Commits

Author SHA1 Message Date
Arpit Jalan
e5f3c26d20
FEATURE: add group filter for admin reports (#23381)
FEATURE: add group filter for admin reports

DEV: add plugin outlet for admin dashboard tabs
2023-09-05 11:17:18 +05:30
dependabot[bot]
df3770fcca
Build(deps-dev): Bump the babel group (#23396)
Bumps the babel group in /app/assets/javascripts 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.22.11 to 7.22.15
- [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.22.15/packages/babel-core)

Updates `@babel/standalone` from 7.22.14 to 7.22.15
- [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.22.15/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: babel
- dependency-name: "@babel/standalone"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: babel
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 00:27:27 +02:00
Jarek Radosz
1c87bb7fe9
DEV: Update DButton uses (#23333)
1. Use `this.` instead of `{{action}}` where applicable
2. Use `{{fn}}` instead of `@actionParam` where applicable
3. Use non-`@` versions of class/type/tabindex/aria-controls/aria-expanded
4. Remove `btn` class (it's added automatically to all DButtons)
5. Remove `type="button"` (it's the default)
6. Use `concat-class` helper
2023-08-31 11:49:35 +02:00
Vinoth Kannan
5a810fd6cc
UX: display warning message when uploads are not included in backup. (#23253)
Also, this PR will introduce a new checkbox in the modal window to manage whether the uploads should be included in the backup or not.
2023-08-31 10:21:07 +05:30
Martin Brennan
8ef569cda4
UX: Remove Plugin Settings tab (#23345)
This tab doesn't really provide anything useful, and can be quite
confusing in some cases. Each plugin is already listed below, and
you can navigate to their settings from there. We want to move away
from the catch-all Plugins category for site settings. Core plugins are
not shown in this list as at 97a812f022.
2023-08-31 12:11:39 +10:00
Renato Atilio
58b49bce41
FEATURE: support to initial values for form templates through /new-topic (#23313)
* FEATURE: adds support for initial values through /new-topic to form templates
2023-08-29 18:41:33 -03:00
Meghna
d47a3e053a
UX: settings are misaligned when translations are too long (#23308) 2023-08-29 18:17:12 +05:30
Martin Brennan
5fc93b95cc
FIX: Improve admin plugin list and modernize code (#23256)
This commit contains a few improvements:

* Use LinkTo instead of a button with a weird action referencing the
  controller to navigate to the filtered settings for a plugin
* Add an AdminPlugin model with tracked properties and use that when
  toggling the setting on/off and in the templates
* Make it so the Settings button for a plugin navigates to the correct
  site setting category instead of always just going to the generic
  "plugins" one if possible
2023-08-28 10:48:59 +10:00
Isaac Janzen
34f502f68d
DEV: Convert uploaded-image-list modal to component-based API (#23245)
<img width="660" alt="Screenshot 2023-08-24 at 4 55 01 PM" src="https://github.com/discourse/discourse/assets/50783505/3fb8360d-c8cd-4ff4-acb2-15843eb4f868">
2023-08-25 09:20:14 -05:00
Isaac Janzen
0496199090
FIX: Badge preview not displaying grant count (#23269)
<img width="510" alt="Screenshot 2023-08-25 at 8 19 38 AM" src="https://github.com/discourse/discourse/assets/50783505/9ebf467e-7b3b-49e2-91d9-43e37b838431">
2023-08-25 09:19:01 -05:00
Isaac Janzen
5c652dd7a1
DEV: Convert reseed modal to component-based API (#23232)
<img width="728" alt="Screenshot 2023-08-24 at 1 35 53 PM" src="https://github.com/discourse/discourse/assets/50783505/5532eea4-1238-43dc-b2b7-a511e78d1f97">
2023-08-25 07:21:38 -05:00
Isaac Janzen
c22e2de2d8
DEV: Convert form-template-validation-options modal to component-based API (#23236)
<img width="794" alt="Screenshot 2023-08-25 at 6 38 21 AM" src="https://github.com/discourse/discourse/assets/50783505/f5cf6fa0-7a2f-4e38-93e2-657fb01f6703">
2023-08-25 07:02:54 -05:00
Isaac Janzen
3052779ea6
DEV: Convert staff-action-log-details modal to component-based API (#23240)
<img width="800" alt="Screenshot 2023-08-24 at 3 08 38 PM" src="https://github.com/discourse/discourse/assets/50783505/c498c49c-88ca-4b34-90a0-194f177b5856">
2023-08-25 06:43:52 -05:00
Isaac Janzen
0c26d8b375
DEV: Convert color-scheme-select-base modal to component-based API (#23234)
<img width="560" alt="Screenshot 2023-08-24 at 2 12 38 PM" src="https://github.com/discourse/discourse/assets/50783505/9180f090-2142-4818-bb40-78cf7c25e9fe">
2023-08-25 06:26:39 -05:00
dependabot[bot]
556fc05506
Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#23224)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.10 to 7.22.11.
- [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.22.11/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/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>
2023-08-25 10:51:49 +02:00
Blake Erickson
9238a9cf42
DEV: Display fuzzy site setting search results below direct matches (#23197)
DEV: Display fuzzy site setting search results below direct matches

When searching for site settings, in the results under the ALL category
all the fuzzy search results were showing first followed by any direct
matches. This change adjusts that so that fuzzy searches show below
direct matches.

Fuzzy results are now also sorted based on their gap calculation in
ascending order.
2023-08-24 17:47:40 -06:00
Isaac Janzen
59569a6e64
DEV: Remove unused admin-theme-item modal (#23233) 2023-08-24 14:14:51 -05:00
Blake Erickson
26b3c63c74
DEV: Tighten up fuzzy search site setting results (#23176)
Sometimes the fuzzy search would return too many site setting results
making it hard to find what you are searching for. This change still
allows for fuzzy searching but tightens up the criteria for being a
fuzzy match.

One example is searching for 'cheer', a term associated with a plugin,
previously returned ~55 search results. With this change it will return
~13 (Actual numbers depend on how many plugins your instance has).

Another example is searching for 'digest'. Previously returned ~37
results and now will return ~14.

Follow up to: e63e193a0a

See also: https://meta.discourse.org/t/276013
2023-08-21 19:04:57 -06:00
Isaac Janzen
3eb8046dde
DEV: Update replaceWith on Route (#23153)
# Context
This PR was originally implemented in https://github.com/discourse/discourse/pull/22645 then reverted in https://github.com/discourse/discourse/pull/22693. We protect from aborted transition when _awaiting_ on `replaceWith` by utilizing [followRedirects()](https://api.emberjs.com/ember/5.1/classes/Transition/methods/followRedirects?anchor=followRedirects)

# Description
Per https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods

We are upgrading all `this.replaceWith` calls on routes to directly call the router service (`this.router.replaceWith`)
2023-08-21 16:53:54 -05:00
dependabot[bot]
db40941deb
Build(deps): Bump ember-cli-babel in /app/assets/javascripts (#23157)
Bumps [ember-cli-babel](https://github.com/babel/ember-cli-babel) from 7.26.11 to 8.0.0.
- [Release notes](https://github.com/babel/ember-cli-babel/releases)
- [Changelog](https://github.com/babel/ember-cli-babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/ember-cli-babel/compare/v7.26.11...v8.0.0)

---
updated-dependencies:
- dependency-name: ember-cli-babel
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 11:27:24 +02:00
David Taylor
5a99243629
DEV: Introduce declarative hide-application-footer helper (#23088)
Previously, we had a `showFooter` boolean on the application controller which would be set true/false in various routes by different routes/controllers. A global `routeWillChange` hook would set it `false` before every route transition, and the destination route/controller would have to set it `true` for the footer to show correctly.

This commit replaces that with a new 'declarative' system. Instead of having to set the value true/false manually, UIs which need the footer to be hidden can simply include the `{{hide-application-footer}}` helper in their template when needed. The helper/service will automatically keep track of all the current invocations of that helper, and only show the footer when there are 0 invocations.

This significantly simplifies things, and removes the need for many observers and controller injections, both of which are considered 'code smells' in modern Ember applications.
2023-08-17 12:47:08 +01:00
Mark VanLandingham
51a976eab9
FIX: Display 'shown on X' user field flags (#23109)
In this commit 2.5 years ago, variables for showOnUserCard and showOnProfile were removed, but we still used them in the component. e29605b

This corrects the variable names and adds a test to confirm the text is now shown.
2023-08-15 15:59:04 -05:00
Isaac Janzen
a5542eeab0
DEV: Convert penalize-user modal to component-based API (#22960)
<img width="681" alt="Screenshot 2023-08-03 at 12 55 08 PM" src="https://github.com/discourse/discourse/assets/50783505/79cc045a-523d-45a2-8c33-04b556331358">

<img width="763" alt="Screenshot 2023-08-03 at 12 55 05 PM" src="https://github.com/discourse/discourse/assets/50783505/7196a97f-e4f4-4870-b8ac-77255d604c27">

<img width="711" alt="Screenshot 2023-08-03 at 12 55 11 PM" src="https://github.com/discourse/discourse/assets/50783505/a916a85d-8bdb-41fb-8210-1e0c06cf7cf1">
2023-08-14 13:02:54 -05:00
Isaac Janzen
ba46b34581
DEV: Convert badge-preview modal to component-based API (#22969)
<img width="801" alt="Screenshot 2023-08-03 at 4 00 27 PM" src="https://github.com/discourse/discourse/assets/50783505/f4abc35d-4f3f-47b1-af8d-be36df69fe07">
<img width="486" alt="Screenshot 2023-08-03 at 4 00 15 PM" src="https://github.com/discourse/discourse/assets/50783505/65be7f67-ecfa-4c0c-a1d4-01dfd7452e06">
2023-08-14 12:33:45 -05:00
Isaac Janzen
ac4e854a04
DEV: Convert edit-badge-groupings modal to component-based API (#22984)
<img width="603" alt="Screenshot 2023-08-04 at 4 43 02 PM" src="https://github.com/discourse/discourse/assets/50783505/033192cc-2c5c-4be6-adde-9dd89b6b05c3">
<img width="594" alt="Screenshot 2023-08-04 at 4 42 59 PM" src="https://github.com/discourse/discourse/assets/50783505/efe8d8fe-f06c-4940-9c99-66a2f8fb3532">
2023-08-14 12:03:28 -05:00
Isaac Janzen
c280c1c52b
DEV: Convert site-setting-default-categories modal to component-based API (#22968) 2023-08-10 10:31:34 +01:00
dependabot[bot]
fcc69b497a
Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#23004)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.9 to 7.22.10.
- [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.22.10/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/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>
2023-08-09 11:47:12 +02:00
dependabot[bot]
f90445682e
Build(deps): Bump ember-cli-htmlbars in /app/assets/javascripts (#23021)
Bumps [ember-cli-htmlbars](https://github.com/ember-cli/ember-cli-htmlbars) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/ember-cli/ember-cli-htmlbars/releases)
- [Changelog](https://github.com/ember-cli/ember-cli-htmlbars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli-htmlbars/compare/v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: ember-cli-htmlbars
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-09 11:26:42 +02:00
Isaac Janzen
d2502c9a79
DEV: Convert theme-change modal to component-based API (#22964)
# Before
<img width="575" alt="Screenshot 2023-08-03 at 1 35 47 PM" src="https://github.com/discourse/discourse/assets/50783505/b4ae1487-bef8-40d4-8949-902e36303d43">

# After
<img width="897" alt="Screenshot 2023-08-03 at 1 41 21 PM" src="https://github.com/discourse/discourse/assets/50783505/a37c5fe1-eee5-4e0a-8b0a-66aebbaf2342">

This modal could still use some design love. I will raise this internally.
2023-08-03 15:01:40 -05:00
Isaac Janzen
a820be117c
DEV: Convert install-theme modal to component-based API (#22939) 2023-08-03 10:52:04 -05:00
David Taylor
45ae9d9bab
UX: Introduce toggle-switch UI for plugins (#22910)
This commit makes some visual tweaks to the admin panel plugin list, and introduces functional 'toggle switches' for admins to enable/disable plugins more easily.

Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
2023-08-03 15:19:33 +01:00
Jarek Radosz
c5c786b4ac
DEV: Fix array-related linting issues in templates (#22935)
and remove more linting exemptions
2023-08-02 19:43:37 +02:00
Isaac Janzen
ecd9e6d4b7
DEV: Convert watched-word-test modal to component-based API (#22911) 2023-08-01 16:08:56 -05:00
Isaac Janzen
7c8b0b9869
DEV: Convert delete-user-posts-progress modal to component-based API (#22916)
https://github.com/discourse/discourse/assets/50783505/414ffcc5-06e9-470f-b160-83b4c12bbb96
2023-08-01 15:49:26 -05:00
Isaac Janzen
da6ddb638f
DEV: Convert api-key-urls modal to component-based API (#22913)
<img width="474" alt="Screenshot 2023-08-01 at 1 29 26 PM" src="https://github.com/discourse/discourse/assets/50783505/1a46901f-8231-46fb-8c36-cb441b7fd883">
2023-08-01 14:51:18 -05:00
Isaac Janzen
ed000be722
DEV: Convert merge-users modals to component-based API (#22727) 2023-08-01 10:35:36 -05:00
Isaac Janzen
6c8af90f5d
DEV: Convert start-backup modal to component-based API (#22812) 2023-08-01 08:40:25 -05:00
Gerhard Schlager
1af33fdb71 REFACTOR: Use pluralized string for js.badges.awarded 2023-07-31 13:28:42 +02:00
Kelv
5f0bc4557f
FEATURE: Count only approved flagged posts in user pages (#22799)
FEATURE: Only approved flags for post counters

* Why was this change necessary?
The counters for flagged posts in the user's profile and user index from
the admin view include flags that were rejected, ignored or pending
review. This introduces unnecessary noise. Also the flagged posts
counter in the user's profile includes custom flags which add further
noise to this signal.

* How does it address the problem?

* Modifying User#flags_received_count to return posts with only approved
  standard flags
* Refactoring User#number_of_flagged_posts to alias to
  User#flags_received_count
* Updating the flagged post staff counter hyperlink to navigate to a
  filtered view of that user's approved flagged posts to maintain
  consistency with the counter
* Adding system tests for the profile page to cover the flagged posts
  staff counter
2023-07-31 13:33:10 +08:00
marstall
80f5018924
FEATURE: JSON editor for theme settings (#21647)
provide the ability to edit theme settings in the json editor, and also copy them as a text file so they can be pasted into another instance.

Reference: /t/65023
2023-07-27 13:48:59 -04:00
Jarek Radosz
a44378a1b6
FIX: Toggling overridden settings broke in #21572 (#22831) 2023-07-27 19:41:42 +02:00
Isaac Janzen
f3b7351ff6
DEV: Convert theme-upload modal to component-based API (#22699) 2023-07-26 12:46:02 -05:00
Isaac Janzen
0db03b684d
DEV: Convert delete-posts-confirmation modal to component-based API (#22700) 2023-07-25 16:11:32 -05:00
David Taylor
21dad02503
FIX: Correct router service call from some admin controllers (#22757)
72edb727 updated these to point to the router service, but the method name also needed to be changed from replaceRoute -> replaceWith
2023-07-24 12:32:17 +01:00
Isaac Janzen
37942cb8bb
DEV: Convert admin-incoming-email modal to component-based API (#22701)
- Convert `admin-incoming-email` modal to component-based API
- Testing that the modal was working in local development was extremely challenging due to the need for `rejected` and `bounced` emails. Something that is not easy to stub in a local dev environment. To make this process more smooth for future developers I have added a new rake task:

```
desc "Creates sample email logs"
task "email_logs:populate" => ["db:load_config"] do |_, args|
  DiscourseDev::EmailLog.populate!
end
```

That will generate fully functional email logs in development to be toyed with.

<img width="787" alt="Screenshot 2023-07-20 at 3 27 04 PM" src="https://github.com/discourse/discourse/assets/50783505/47b3fe34-cd7e-49a5-8fe6-768c0fbd1aa2">
2023-07-20 16:31:20 -05:00
David Taylor
eb94ec16da
DEV: introduce Ember <template> tag support (.gjs) (#22719)
The gjs/gts formats are a new pattern for authoring Ember components. This commit introduces support for these patterns to our build pipeline for core/plugins, and converts a handful of components to use the new format. It also introduces relevant updates to our linting config, and to our sample vscode configuration.

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>
2023-07-20 21:01:12 +01:00
Jarek Radosz
9bbd5efbec
DEV: Convert helpers into plain functions (#22385)
Since 0fa92529ed, helpers can now be implemented as plain JS functions. This makes them much easier to write/read, and also makes them usable in `<template>` gjs files.
2023-07-20 19:45:40 +01:00
Isaac Janzen
1561e51a13
DEV: Revert "DEV: Update replaceWith on Route (#22645)" (#22693)
This reverts commit 33db93c9b2.
2023-07-19 10:47:31 -05:00
Ted Johansson
341acacba8
DEV: Add endpoint for dismissing outdated translations (#22509)
Recently we started giving admins a notice in the advice panel when their translations have become outdated due to changes in core. However, we didn't include any additional information.

This PR adds more information about the outdated translation inside the site text edit page, together with an option to dismiss the warning.
2023-07-19 23:06:13 +08:00
David Taylor
125903f682
FIX: Staff action log could not be accessed via link (#22688)
011ba5b9 slightly changed the way the staff-action-log route is activated. It's now possible for `deserializeQueryParam` to be called with a null value, so we need to deal with that case.

This route is currently untested - we'll follow-up with another commit to add some.
2023-07-19 11:40:48 +01:00