Commit Graph

19635 Commits

Author SHA1 Message Date
Jarek Radosz
62d00722e1
DEV: Convert highlighted-code to glimmer/gjs (#28914)
the radical change in the implementation doesn't stem from the glimmer migration, but rather the fact that previously the component was single-use – changing any of its args didn't (and couldn't) be reflected because hljs was replacing the nodes so all the ember bookkeeping was gone.

Co-authored-by: David Taylor <david@taylorhq.com>
2024-09-17 13:49:35 +02:00
Jarek Radosz
7b8343d482
FIX: Support getters in hbr #each context (#28941)
There is a risk of overriding and then deleting a prop of the context in case of a naming clash between localName and that prop, e.g.

```js
class Test {
  item = "foo";
  items = [1, 2];
}

const template = `
  {{#each items as |item|}}
    {{item}}
  {{/each}}
`;
const compiledTemplate = compile(template);

const object = new Test();
// object.item === "foo"
const output = compiledTemplate(object, RUNTIME_OPTIONS);
// object.item === undefined
```

…but I think we can accept this risk and just be careful.`#each` isn't widely used in hbr anyway (as proven by the other long-standing and recently fixed bug) and hbr is on its way out anyway.
2024-09-17 12:07:07 +02:00
Ted Johansson
be33363f13
FEATURE: Add ability to dismiss admin notices (#28916)
his is a new feature that lets admins dismiss notices from the dashboard. This helps with self-service in cases where a notice is "stuck", while we work on provisions to prevent "sticking" in the first place.
2024-09-17 14:43:34 +08:00
dependabot[bot]
0a6ecc04d2
Build(deps): Bump ember-auto-import from 2.7.4 to 2.8.0 (#28933)
Bumps [ember-auto-import](https://github.com/embroider-build/ember-auto-import/tree/HEAD/packages/ember-auto-import) from 2.7.4 to 2.8.0.
- [Release notes](https://github.com/embroider-build/ember-auto-import/releases)
- [Changelog](https://github.com/embroider-build/ember-auto-import/blob/main/packages/ember-auto-import/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/ember-auto-import/commits/HEAD/packages/ember-auto-import)

---
updated-dependencies:
- dependency-name: ember-auto-import
  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>
2024-09-17 01:23:58 +02:00
dependabot[bot]
47b4ceeec8
Build(deps): Bump ember-resolver from 13.0.0 to 13.0.1 (#28932)
Bumps [ember-resolver](https://github.com/ember-cli/ember-resolver) from 13.0.0 to 13.0.1.
- [Release notes](https://github.com/ember-cli/ember-resolver/releases)
- [Changelog](https://github.com/ember-cli/ember-resolver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-resolver/compare/v13.0.0...v13.0.1)

---
updated-dependencies:
- dependency-name: ember-resolver
  dependency-type: direct:production
  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-09-17 01:22:45 +02:00
Penar Musaraj
501f07ab1f
FIX: Retry updating webview background color (#28912)
In some very rare cases, the header element doesn't yet have the bg
when this code is run. This PR adds a simple retry mechanism.

No tests because this relies on specific load timing from the browser.
2024-09-16 11:58:36 -04:00
Amanda Alves Branquinho
7f55e8b2be
DEV: Add outlet wrapper to categories only component (#28669) 2024-09-16 12:48:32 -03:00
Amanda Alves Branquinho
ad0ffab79f
DEV: add outlet wrapper for category name field (#28858) 2024-09-16 12:48:24 -03:00
Amanda Alves Branquinho
c459d4b76c
DEV: add outlet wrapper for categories boxes (#28860)
* DEV: add outlet wrapper for category boxes

* Put plugin outlet after categories boxes
2024-09-16 12:46:21 -03:00
Jarek Radosz
8a57e50664
DEV: Fix some js deprecations (#28915)
1. `MediaQueryList.addListener` is deprecated in favor of `addEventListener`
2. `HTMLStyleElement.type` is deprecated with no replacement
2024-09-16 13:56:54 +02:00
dependabot[bot]
38c286ac40
Build(deps-dev): Bump @floating-ui/dom from 1.6.10 to 1.6.11 (#28918)
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.10 to 1.6.11.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.6.11/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  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-09-16 15:40:30 +08:00
dependabot[bot]
afe581ae5c
Build(deps-dev): Bump jsuites from 5.6.0 to 5.6.1 (#28920)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.6.0 to 5.6.1.
- [Release notes](https://github.com/jsuites/jsuites/releases)
- [Changelog](https://github.com/jsuites/jsuites/blob/master/changelog.md)
- [Commits](https://github.com/jsuites/jsuites/commits)

---
updated-dependencies:
- dependency-name: jsuites
  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-09-16 15:39:34 +08:00
dependabot[bot]
4f0a23e06f
Build(deps): Bump @faker-js/faker from 9.0.0 to 9.0.1 (#28922)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 9.0.0 to 9.0.1.
- [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.0.0...v9.0.1)

---
updated-dependencies:
- dependency-name: "@faker-js/faker"
  dependency-type: direct:production
  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-09-16 15:39:22 +08:00
dependabot[bot]
0ab0066b41
Build(deps-dev): Bump sinon from 19.0.1 to 19.0.2 (#28919)
Bumps [sinon](https://github.com/sinonjs/sinon) from 19.0.1 to 19.0.2.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v19.0.1...v19.0.2)

---
updated-dependencies:
- dependency-name: sinon
  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-09-16 09:02:04 +10:00
Ted Johansson
edd221fbf9
DEV: Convert DashboardProblems component to GJS (#28917)
Working on some new functionality around admin notices. This is a preparatory refactoring that converts the DashboardProblems component to GJS.
2024-09-15 17:16:01 +08:00
Jan Cernik
0c019b2e45
FIX: Error when moving the group default notification state (#28910) 2024-09-13 16:01:20 -03:00
David Taylor
e7e9c99568
DEV: Drop ScrollTracker component (#28911)
Restoring scroll position is now handled by the route-scroll-manager service, so this is unneeded
2024-09-13 19:19:40 +01:00
Kris
a914d3230b
DEV: remap all core icons for fontawesome 6 upgrade (#28715)
Followup to 7d8974d02f

Co-authored-by: David Taylor <david@taylorhq.com>
2024-09-13 16:50:52 +01:00
dependabot[bot]
9afc9a6e28
Build(deps): Bump @glimmer/syntax from 0.92.0 to 0.92.3 (#28906) 2024-09-13 15:47:25 +02:00
dependabot[bot]
ef9ba294e9
Build(deps-dev): Bump sinon from 18.0.1 to 19.0.1 (#28905) 2024-09-13 14:12:37 +02:00
Penar Musaraj
18dacfdeec
DEV: Add plugin outlet wrapper around footer nav (#28863) 2024-09-13 07:57:46 -04:00
Jarek Radosz
896f116443
DEV: Fix random typos (#28891) 2024-09-12 23:25:34 +02:00
dependabot[bot]
b49280871d
Build(deps-dev): Bump express from 4.20.0 to 4.21.0 (#28886)
Bumps [express](https://github.com/expressjs/express) from 4.20.0 to 4.21.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.20.0...4.21.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:development
  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>
2024-09-12 21:21:46 +02:00
Ella E.
fa83e7b07d
FIX: Regression in short description in admin badges page (#28884) 2024-09-12 12:21:42 -06:00
Keegan George
9dadf43e83
FEATURE: Toolbar API supports custom action for keyboard shortcuts (#28883)
Previously shortcuts added to toolbar buttons will automatically use the same action assigned to the button when clicked. This PR adds an additional optional key that can be passed when creating a new toolbar button: shortcutAction which allows for passing a custom action for the keyboard shortcut. This way a button can have a specific action when a keyboard shortcut is pressed that's different from when the button is clicked.
2024-09-12 11:12:01 -07:00
Kris
06b9e58542
UX: tell 1Password to ignore the link name input (#28559) 2024-09-12 11:13:43 -04:00
David Taylor
a7cd220704
PERF: Use insertText more efficiently in replaceText (#28880)
Followup to e25578d702

Using execCommand to replace the entire contents of the textarea is very slow for larger posts (it seems the browser does a reflow after every 'virtual keypress'.

This commit updates the `replaceText` function to be more surgical with its `insertAt` calls. Now it only selects & replaces the characters which are actually being replaced.
2024-09-12 16:11:39 +01:00
Jarek Radosz
00ae6cc430
DEV: Update ember-resolver to 13.0.0 (#28876)
See: https://github.com/ember-cli/ember-resolver/releases/tag/v13.0.0
2024-09-12 12:09:11 +02:00
Martin Brennan
d9af873f0d
UX: Fix confusing "claim reviewable" positioning (#28870)
Previously for reviewables that could be claimed, we positioned
the "you can claim / you must claim" message and button underneath
the "Is there something wrong with this post?" message but _before_
the reviewable action buttons like Yes/No/Ignore. This was a confusing
flow.

This commit fixes the issue, and also makes it so if claiming is
required and the reviewable has not been claimed, we don't show
the "Is there something wrong with this post?" which was showing
with no buttons.
2024-09-12 16:44:12 +10:00
chapoi
bca82e9dec
UX: fix double li-element in mobile list control (#28840) 2024-09-12 02:22:32 +02:00
Jarek Radosz
18fca966c5
FIX: Incorrect titles in two components (#28865) 2024-09-11 22:45:41 +02:00
Blake Erickson
2bc31bc45a
DEV: Add plugin api for customizing api key and webhook pages (#28835)
Adding these plugin outlets so that the admin pages for api keys and
webhooks can be customized.
2024-09-11 11:24:40 -04:00
dependabot[bot]
8b343b9603
Build(deps-dev): Bump jsuites from 5.5.2 to 5.6.0 (#28855)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.5.2 to 5.6.0.
- [Release notes](https://github.com/jsuites/jsuites/releases)
- [Changelog](https://github.com/jsuites/jsuites/blob/master/changelog.md)
- [Commits](https://github.com/jsuites/jsuites/commits)

---
updated-dependencies:
- dependency-name: jsuites
  dependency-type: direct:development
  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>
2024-09-11 16:55:52 +02:00
Jarek Radosz
2c80203ab9
DEV: Avoid extra after-test cleanup (#28846) 2024-09-11 13:43:19 +02:00
dependabot[bot]
691d872c4b
Build(deps-dev): Bump testem from 3.10.1 to 3.15.2 (#28844)
Bumps [testem](https://github.com/testem/testem) from 3.10.1 to 3.15.2.
- [Release notes](https://github.com/testem/testem/releases)
- [Commits](https://github.com/testem/testem/compare/v3.10.1...v3.15.2)

---
updated-dependencies:
- dependency-name: testem
  dependency-type: direct:development
  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>
2024-09-11 12:54:01 +02:00
dependabot[bot]
c33d75c2d5
Build(deps-dev): Bump @swc/core from 1.7.24 to 1.7.26 (#28845)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.24 to 1.7.26.
- [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.7.24...v1.7.26)

---
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-09-11 12:52:00 +02:00
Krzysztof Kotlarek
1f1709d249
FIX: use a custom prefix for custom flags (#28839)
Currently, when the custom flag has the same name as the system flag (which is disabled) then it is not displayed. To fix the problem, `custom_` prefix as `name_key` is used to distinguish between the system and the custom flag.

I considered writing a migration to fix existing custom flags name key. However, at the end of migration I would need to run rails code to reset cache `Flag.reset_flag_settings!`. I decided to skip that step as it is a very edge case. If someone has the same flag name as the system flag, then all they have to do is edit the flag and click save.

In addition, I made 2 small fixes:
- edit flag title was missing translation;
- flag form UI was not showing that description is the required field.
2024-09-11 15:30:20 +10:00
Martin Brennan
894f146b3a
DEV: Add component tests for admin page header components (#28837)
These components will be used in many places and are quite
independent, adding component tests is sensible.
2024-09-11 13:27:58 +10:00
dependabot[bot]
9b465e1914
Build(deps-dev): Bump sinon from 18.0.0 to 18.0.1 (#28833)
Bumps [sinon](https://github.com/sinonjs/sinon) from 18.0.0 to 18.0.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v18.0.0...v18.0.1)

---
updated-dependencies:
- dependency-name: sinon
  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-09-11 02:04:21 +02:00
dependabot[bot]
be682767d1
Build(deps-dev): Bump express from 4.19.2 to 4.20.0 (#28832)
Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.20.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.20.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:development
  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>
2024-09-11 02:02:58 +02:00
Jarek Radosz
917621ed80
FIX: Errors may be null-ish (#28826) 2024-09-10 20:42:02 +02:00
Ella E.
995931b6ec
UX: Update banner to handle responsive images with aspect ratio scaling (#28825) 2024-09-10 12:19:40 -06:00
dependabot[bot]
e34aca0368
Build(deps): Bump a11y-dialog from 8.1.0 to 8.1.1 (#28813)
Bumps [a11y-dialog](https://github.com/KittyGiraudel/a11y-dialog) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/KittyGiraudel/a11y-dialog/releases)
- [Commits](https://github.com/KittyGiraudel/a11y-dialog/compare/8.1.0...8.1.1)

---
updated-dependencies:
- dependency-name: a11y-dialog
  dependency-type: direct:production
  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-09-10 09:46:38 +02:00
dependabot[bot]
468eb009fb
Build(deps): Bump babel-plugin-ember-template-compilation (#28812)
Bumps [babel-plugin-ember-template-compilation](https://github.com/emberjs/babel-plugin-ember-template-compilation) from 2.2.5 to 2.3.0.
- [Release notes](https://github.com/emberjs/babel-plugin-ember-template-compilation/releases)
- [Changelog](https://github.com/emberjs/babel-plugin-ember-template-compilation/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emberjs/babel-plugin-ember-template-compilation/commits)

---
updated-dependencies:
- dependency-name: babel-plugin-ember-template-compilation
  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>
2024-09-10 09:45:56 +02:00
moin-Jana
cd7aa53521
FIX: add "in:first" to user summary category search (#28688)
* FIX: add "in:first" to user summary category search

The "in:first" parameter was added to the search parameters for the topic count in the user summary category search.

This ensures that the search results focus specifically on the first posts in each topic, so only topics are returned.
Meta topic: https://meta.discourse.org/t/summary-page-by-category-topic-links/215848

* add tests

Provided by @natsw
2024-09-10 15:55:32 +10:00
Martin Brennan
61c1d35f17
FEATURE: Convert chat plugin UI to new show plugin and admin UI guidelines (#28632)
This commit converts the current chat plugin UI into the
new "show plugin" UI already followed by AI and Gamification.

In the process, I also:

* Made a dedicated /new route to create new webhooks
* Converted the webhook form to FormKit
* Made some fixes and improvements to the `AdminPluginConfigPage`, `AdminPageHeader`,
   and `AdminPageSubheader` generic components, so more plugins can
   adopt the UI guidelines too. This includes adding a header outlet so plugins
   can add action buttons to the plugin show page header.
* Fixes the submit button loading state for FormKit (by Joffrey)

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-09-10 15:16:16 +10:00
Martin Brennan
56877e9acf
UX: Hide 'other' and 'crawler' site traffic on report page (#28817)
Followup 14b436923c

On the standalone Site Traffic report page, we also need
to hide the 'other' and 'crawler' pageviews by default
like we do on the admin dashboard.
2024-09-10 14:31:51 +10:00
Martin Brennan
428fb793b7
UX: Add learn more URL for admin flags page (#28816)
Docs are published now at https://meta.discourse.org/t/moderation-flags/325589
2024-09-10 13:48:43 +10:00
Ella E.
19ba7c944b
UX: Add a description on the about config area (#28790)
* UX: Add a description on the about config area

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-09-09 20:31:13 -06:00
Martin Brennan
14b436923c
FEATURE: Switch to new methods of pageview measurement and reporting (#28729)
### UI changes

All of the UI changes described are gated behind the `use_legacy_pageviews`
site setting.

This commit changes the admin dashboard pageviews report to
use the "Consolidated Pageviews with Browser Detection" report
introduced in 2f2da72747 with
the following changes:

* The report name is changed to "Site traffic"
* The pageview count on the dashboard is counting only using the new method
* The old "Consolidated Pageviews" report is renamed as "Consolidated Legacy Pageviews"
* By default "known crawlers" and "other" sources of pageviews are hidden on the report

When `use_legacy_pageviews` is `true`, we do not show or allow running
the "Site traffic" report for admins. When `use_legacy_pageviews` is `false`,
we do not show or allow running the following legacy reports:

* consolidated_page_views
* consolidated_page_views_browser_detection
* page_view_anon_reqs
* page_view_logged_in_reqs

### Historical data changes

Also part of this change is that, since we introduced our new "Consolidated
Pageviews with Browser Detection" report, some admins are confused at either:

* The lack of data before a certain date , which didn’t exist before
  we started collecting it
* Comparing this and the current "Consolidated Pageviews" report data,
  which rolls up "Other Pageviews" into "Anonymous Browser" and so it
  appears inaccurate

All pageview data in the new report before the date where the _first_
anon or logged in browser pageview was recorded is now hidden.
2024-09-10 09:51:49 +10:00