Commit Graph

19878 Commits

Author SHA1 Message Date
Kris
24caa36eef
DEV: add below-sidebar-sections to sidebar dropdown mode (#28780) 2024-09-06 12:49:18 -04:00
Jarek Radosz
498212bb5e
DEV: Try to make admin email-preview test resilent (#28782) 2024-09-06 17:26:13 +02:00
Osama Sayegh
d642020b0f
FIX: Add traffic info footer to the new /about page (#28779)
This commit adds the traffic info footer that currently exists on the old /about page to the new one.
2024-09-06 15:05:46 +03:00
Osama Sayegh
722c008adb
FEATURE: Add 'Edit this page' link at the top of the new /about page (#28766)
This commit adds a link to the top of the new /about page, shown to admins only, to allow them to easily navigate to `/admin/config/about` where they can edit the /about page.

Internal topic: t/137546.
2024-09-06 13:35:30 +03:00
Ella E.
cde4db1c6a
UX: Apply the admin page header component (#28767)
* DEV: Apply the admin page header component

* DEV: remove unused i18n import
2024-09-05 22:46:41 -06:00
Ella E.
22b4ba99f5
UX: Change organization alert type from error to info (#28762) 2024-09-05 14:42:06 -06:00
dependabot[bot]
105da5deea
Build(deps): Bump @faker-js/faker from 8.4.1 to 9.0.0 (#28744)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 8.4.1 to 9.0.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/v8.4.1...v9.0.0)

---
updated-dependencies:
- dependency-name: "@faker-js/faker"
  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>
2024-09-05 10:50:47 +02:00
dependabot[bot]
448cb840af
Build(deps-dev): Bump @ember/test-helpers from 4.0.3 to 4.0.4 (#28742)
Bumps [@ember/test-helpers](https://github.com/emberjs/ember-test-helpers) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/emberjs/ember-test-helpers/releases)
- [Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/commits)

---
updated-dependencies:
- dependency-name: "@ember/test-helpers"
  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-05 10:46:28 +02:00
Ella E.
be5c37a6d4
UX: Apply admin UI to Badges (#28724)
* UX: Add a description about badges

* WIP: Apply admin UI guidelines

* FIX: Add routeModels to dbutton

Allows routeModels to be passed to a DButton along
with route, so we can use them as a LinkTo replacement
in more places.

Also fix up badges admin page header.

* UX: Reorder action buttons

* UX: Change header hierarchy to better align page's content structure

* UX: Update copy and remove unnecessary UI elements

* UX: Adjust header's icon spacing

* UX: Fix the header action buttons on mobile

* Apply prettier

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2024-09-04 20:18:23 -06:00
Jarek Radosz
f0d3a7c0f3
DEV: Reformat package.json files (#28733) 2024-09-04 21:14:13 +02:00
Sérgio Saquetim
7c3ad27de6
DEV: Remove the old header widgets code (#28390)
Remove the header widget code.

More info can be found in https://meta.discourse.org/t/upcoming-header-changes-preparing-themes-and-plugins/296544
2024-09-04 14:50:53 -03:00
Osama Sayegh
a23773f83d
DEV: Deprecate show_in_ui argument of the register_stat API (#28727)
We need to start printing deprecation notices when the `show_in_ui` argument is used because it works only for the old about page which will be removed soon. For the new about page, we've introduced a new API `addAboutPageActivity` which is more flexible than a true/false argument on the server side.

Internal topic: t/136551.
2024-09-04 19:58:14 +03:00
David Taylor
e6edd52047
DEV: Remove widget wrapper from poll plugin (#28666)
- Uses `helper.renderGlimmer` with GJS to render the `<Poll` component without any widgets

- Moves some logic into component, so that only `@post`, `@poll` and `@titleHTML` need to be passed into the component (no more 'attrs')

- Updates `modifyClass` calls to modern syntax

- Replaces observer in `Post` model with a native setter & tracked property

- Replaced Poll EmberObject instances with TrackedObject

- Updated component tests with new arguments

- Updated some tests to qunit-dom

- Fixed up core `repliesBelow` and `repliesAbove` logic to create post models properly. Previously it was passing 'transformed' versions of posts into the model, which doesn't make sense.
2024-09-04 09:38:22 +01:00
Osama Sayegh
280adda09c
FEATURE: Support designating multiple groups as mods on category (#28655)
Currently, categories support designating only 1 group as a moderation group on the category. This commit removes the one group limitation and makes it possible to designate multiple groups as mods on a category.

Internal topic: t/124648.
2024-09-04 04:38:46 +03:00
dependabot[bot]
536b0e641c
Build(deps-dev): Bump @ember/test-helpers from 4.0.2 to 4.0.3 (#28722)
Bumps [@ember/test-helpers](https://github.com/emberjs/ember-test-helpers) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/emberjs/ember-test-helpers/releases)
- [Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/commits)

---
updated-dependencies:
- dependency-name: "@ember/test-helpers"
  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-04 01:26:16 +02:00
David Taylor
023236d600
DEV: Convert card-contents-base from mixin to base class (#28709)
* DEV: Convert card-contents-base from mixin to base class

This allows us to convert it to native class syntax

Mixins are essentially deprecated, and will not be receiving native class syntax support. In this case, there is no real need for it to be a mixin, so a base class makes sense.
2024-09-04 07:51:40 +10:00
Renato Atilio
289249303c
UX: avoid flashing error when loading form template (#28700) 2024-09-03 17:41:20 -03:00
dependabot[bot]
460b875d03
Build(deps-dev): Bump @swc/core from 1.7.22 to 1.7.23 (#28694)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.22 to 1.7.23.
- [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.22...v1.7.23)

---
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-03 19:28:30 +01:00
Kris
653ee734db
FIX: don't use post ID as timeline collapse delay (#28712) 2024-09-03 14:01:59 -04:00
Penar Musaraj
8c19104866
FIX: Passkey login when Discourse used as SSO provider (#28672)
Co-authored-by: Osama Sayegh <asooomaasoooma90@gmail.com>
2024-09-03 11:46:23 -04:00
David Taylor
c9e8c9eeaf
DEV: Drop @discourse/ember-instantsearch dependency (#28707)
This was part of the `https://github.com/discourse/discourse-instant-search` experiment, which is no longer under development. If that changes, this dependency can be reintroduced.
2024-09-03 15:24:25 +01:00
Osama Sayegh
dbe7613352
DEV: Add PluginOutlets from the old /about page to the new one (#28695)
The old /about page has 3 plugin outlets: one after the description, one after the admins list, and one after the mods list. These outlets translate cleanly to the new /about page, so we should add them to it to make plugins/themes compatible with the new page.
2024-09-03 14:02:07 +03:00
David Taylor
80b9c280ba
DEV: Switch to pnpm for JS dependencies (#28671)
This will bring significant improvements to install speed & storage requirements. For information on how it may affect you, see https://meta.discourse.org/t/324521

This commit:
- removes the `yarn.lock` and replaces with `pnpm-lock.yaml`
- updates workspaces to pnpm format
- adjusts package dependencies to work with pnpm's stricter resolution strategy
- updates Rails app to load modules from more specific node_modules directories
- adds a `.pnpmfile` which automatically cleans up old yarn-managed `node_modules` directories
- updates various scripts to call `pnpm` instead of `yarn`
- updates patches to use pnpm's native patch system instead of patch-package
- adds a patch for licensee to support pnpm
2024-09-03 10:51:07 +01:00
Linca
74c9b5c11c
FIX: Keep the original URLParams in navigation item (#28696)
Originally, we assumed that the href passed to the NavigationItem must
not have URLParams, and roughly appended URLParams such as
`?order=created` to the end. This will result in something like
`/latest?state=my_votes?order=created` (note the double question mark
here), for example the discourse-topic-voting plugin

This commit modifies the logic for appending URLParams to the end,
ensuring that the original URL parameters are preserved.
2024-09-03 15:16:52 +08:00
Krzysztof Kotlarek
7577231ba2
DEV: the ability to define setting areas (#28570)
A new setting attribute is used to define the areas (separated by `|`).

In addition, endpoint `/admin/config/site_settings.json` accepts new `filter_area` data.
2024-09-03 09:25:45 +10:00
Joffrey JAFFEUX
b771d3173f
FIX: ensures default required validator handles 0 (#28686)
Prior to this fix `0` would be erroring as non-existing and would raise the required error.
2024-09-02 20:46:04 +02:00
Joffrey JAFFEUX
b4f8ea6ade
FIX: correctly pass updateGroupings to the modal (#28683)
A previous refactor has moved this function in the controller instead of the route making it inaccessible to the modal.

This commit is fixing this and also adding a spec.
2024-09-02 17:32:18 +02:00
David Taylor
cef1dcfc7d
DEV: Support passing component class to RenderGlimmer (#28660)
In particular, this allows us to use gjs `<template>` for RenderGlimmer, registerWidgetShim, and decorateCooked's `helper.renderGlimmer`.

```js
// Simple component class:
registerWidgetShim(
  "render-glimmer-test-component-shim",
  "div.initial-wrapper-class",
  SimpleComponent
);
```

```gjs
// Or an inline `<template>`
registerWidgetShim(
  "render-glimmer-test-component-shim",
  "div.initial-wrapper-class",
  <template>Hello world</template>
);
```
2024-09-02 11:21:46 +01:00
David Taylor
583c932173
DEV: Refactor complex initializers into classes (#28661)
We're working to remove all decorators from object-literal-properties. This commit refactors all initializers which were using these decorators into classes, where decorators are allowed. Also adds cleanup logic to the local-dates initializer, which was previously missing.
2024-09-02 10:08:07 +01:00
David Taylor
8b2009cd44
DEV: Skip babel for ace-builds and json-editor (#28659)
This will avoid warnings: "The code generator has deoptimised the styling of {path} as it exceeds the max of 500KB."

Should also provide a tiny improvement in build times
2024-09-02 10:07:43 +01:00
dependabot[bot]
a88b0d3f10
Build(deps-dev): Bump @swc/core from 1.7.21 to 1.7.22 (#28678)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.21 to 1.7.22.
- [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.21...v1.7.22)

---
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-02 10:06:59 +02:00
dependabot[bot]
72896d44b8
Build(deps-dev): Bump the embroider group with 4 updates (#28677)
Bumps the embroider group with 4 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat), [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core), [@embroider/macros](https://github.com/embroider-build/embroider/tree/HEAD/packages/macros) and [@embroider/webpack](https://github.com/embroider-build/embroider/tree/HEAD/packages/webpack).


Updates `@embroider/compat` from 3.6.0 to 3.6.1
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat)

Updates `@embroider/core` from 3.4.14 to 3.4.15
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/core)

Updates `@embroider/macros` from 1.16.5 to 1.16.6
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/macros)

Updates `@embroider/webpack` from 4.0.4 to 4.0.5
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/webpack)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/macros"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/webpack"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 10:06:40 +02:00
dependabot[bot]
5f7267a57f
Build(deps): Bump ace-builds from 1.36.0 to 1.36.2 (#28679)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.36.0 to 1.36.2.
- [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.36.0...v1.36.2)

---
updated-dependencies:
- dependency-name: ace-builds
  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-02 10:00:46 +02:00
Mark VanLandingham
3e320ce225
DEV: Add 'multiple' class to login-buttons when there are multiple btns (#28649) 2024-08-30 08:36:08 -05:00
dependabot[bot]
06fdd9af1f
Build(deps): Bump @babel/standalone in the babel group (#28650)
Bumps the babel group with 1 update: [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.25.5 to 7.25.6
- [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.25.6/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  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>
2024-08-30 10:55:53 +01:00
Martin Brennan
361e954c55
UX: Change admin plugins list to follow UI guidelines (#28478)
This commit introduces a little bit of duplication
since the old plugin UIs not using the new plugin show
page look different from ones like AI and Gamification
which have been converted. We can use the new admin
header component on the plugins list, but for the other
pages we are manually rendering a breadcrumb trail and
the list of plugin tabs.

Over time as we convert more plugins to use the new UI
guidelines and show page we can get rid of this duplication.
2024-08-30 14:53:36 +10:00
Martin Brennan
ca26099a8d
UX: Add descriptions to auto groups and auto group indicator (#28630)
This commit adds a description for all the auto groups
which will be shown in the group list and show group
pages, which will help admins understand their purpose
better.

Also adds an indicator with a tooltip to explain what
the auto groups are on the group show page.
2024-08-30 10:52:34 +10:00
Jean
22c7fde850
DEV: Add plugin outlet to the group info template (#28624)
* DEV: Add plugin outlet to the group info template
2024-08-29 14:02:33 -04:00
Amanda Alves Branquinho
bdd00a84b0
DEV: Introduce topic category wrapper outlet (#28585)
* dev: Introduce topic category wrapper outlet

* fix lint issue

* rename the outlet so it is unique
2024-08-29 14:01:36 -03:00
Mark VanLandingham
ae111904ef
DEV: Add container with classname to invited-by invite section (#28644) 2024-08-29 11:31:13 -05:00
dependabot[bot]
d45d315a26
Build(deps-dev): Bump @swc/core from 1.7.18 to 1.7.21 (#28618)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.18 to 1.7.21.
- [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.18...v1.7.21)

---
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-08-29 09:29:15 +08:00
Joffrey JAFFEUX
6f91014d64
FIX: correctly filter user bookmarks (#28612)
We were not updating `searchTerm` when changing the input which was making us always send an empty q parameter.

This commit is also adding tests for:
- initial url with q param
- filtering the bookmarks through the input
2024-08-28 15:39:07 -04:00
David Taylor
5df3aa66c8
DEV: Update registerUnbound() to native class syntax (#28613) 2024-08-28 19:06:14 +01:00
David Taylor
efa08658be
DEV: Convert badge & preferences controllers to native class syntax (#28608)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 17:18:22 +01:00
David Taylor
7210f36801
DEV: Convert eyeline & posts-with-placeholders to native class syntax (#28609) 2024-08-28 17:06:34 +01:00
David Taylor
a0d2cb052e
DEV: Convert raw-views to native class syntax (#28607)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 17:05:24 +01:00
David Taylor
cb883ceb74
DEV: Convert wizard components to native class syntax (#28606)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 16:48:21 +01:00
David Taylor
8cc6b214dd
DEV: Convert core components to native class syntax (batch 9) (#28604)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 16:25:29 +01:00
David Taylor
2e5502c417
FIX: Restore propertyEqual following native-class conversions (#28605)
I mistakenly replaced these with `@equal`, thinking the behavior was the same. It's not. `@propertyEqual` compares two properties, while `@equal` compares a single property with a constant.
2024-08-28 16:20:16 +01:00
David Taylor
54b281c4a2
DEV: Convert core components to native class syntax (batch 8) (#28602)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 16:20:04 +01:00
David Taylor
4150ec960e
DEV: Convert core components to native class syntax (batch 7) (#28603)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 16:15:13 +01:00
David Taylor
c4428715b5
DEV: Convert core components to native class syntax (batch 6) (#28598)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 14:34:02 +01:00
David Taylor
77d4b3304e
DEV: Convert core components to native class syntax (batch 5) (#28597)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 14:32:56 +01:00
David Taylor
935cbbb6a9
DEV: Convert core components to native class syntax (batch 4) (#28595)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-28 14:32:41 +01:00
David Taylor
2bc30bd7b8
DEV: Update DiscourseRoute and ApplicationRoute to native class syntax (#28594)
Changes made using the ember-native-class-codemod, plus some manual tweaks

Also ensures our implicit injections applied to the prototype immediately. Without this, they will only be applied on the next `.extend()` call, which is now later than the first native-class extension.
2024-08-28 13:05:06 +01:00
Jan Cernik
b092ccbdc5
UX: Add progress bar to the registration flow (#27694) 2024-08-28 08:43:39 -03:00
Natalie Tay
3a04443632
FIX: Sum pageviews with number instead of string (#28596)
When the tooltip items are tooltipItem = [{parsed: {y:12} }, {parsed: {y:10} } ], reducing without a initial value as a number would result in Javascript thinking it is a string. Thanks, Javascript!

There are no tests here yet since this makes use of an external library Chart.js.
2024-08-28 19:24:57 +08:00
Jarek Radosz
480f26a2c2
DEV: Await for ace render in tests (#28586)
Why all the manual setting of `width` and `height`? Without it all ace editors were 0x0, invisible.

Why didn't it affect the tests before? ace-editor tests only confirms that there is an element, theme-settings-editor tests were effectively unit tests before 7317b5a, fk-code test avoids interacting with ace.
2024-08-28 11:24:30 +02:00
Martin Brennan
4f0fe92195
UX: Add group link to category permission row (#28560)
Makes it easier to reach the group from the category security
tab, and moves the trash button to the right to avoid misclicks.

Also converts the category permission row to gjs
2024-08-28 16:11:16 +10:00
Jarek Radosz
6136a275dd
DEV: Fix an on import deprecation (#28588) 2024-08-27 21:56:04 +02:00
Jarek Radosz
7317b5a120
DEV: Update theme-settings-editor tests (#28582)
Convert them to proper integration tests.
2024-08-27 18:47:24 +02:00
David Taylor
7bf3727663
DEV: Convert core components to native class syntax (batch 3) (#28517)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-27 15:28:08 +01:00
Jarek Radosz
9b83ae7d55
DEV: Update ace-editor tests, minor tweaks to component (#28579) 2024-08-27 16:27:52 +02:00
David Taylor
66b061a5a8
DEV: Convert core components to native class syntax (batch 2) (#28515)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-27 15:00:46 +01:00
dependabot[bot]
92f03a1108
Build(deps-dev): Bump @ember/test-helpers from 3.3.1 to 4.0.2 (#28533)
* Build(deps-dev): Bump @ember/test-helpers from 3.3.1 to 4.0.2

Bumps [@ember/test-helpers](https://github.com/emberjs/ember-test-helpers) from 3.3.1 to 4.0.2.
- [Release notes](https://github.com/emberjs/ember-test-helpers/releases)
- [Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/commits)

---
updated-dependencies:
- dependency-name: "@ember/test-helpers"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* add loader shim

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Taylor <david@taylorhq.com>
2024-08-27 14:08:01 +01:00
Jan Cernik
437d7a0ad1
FIX: Endless loading post history (#28425) 2024-08-27 09:33:13 -03:00
dependabot[bot]
d05d23f947
Build(deps): Bump @ember/string from 3.1.1 to 4.0.0 (#28564) 2024-08-27 13:31:12 +01:00
Joffrey JAFFEUX
b4a8873596
DEV: changes identifier from card to usercard (#28575) 2024-08-27 14:08:49 +02:00
Jarek Radosz
62c8904721
DEV: Convert ace-editor to glimmer/gjs (#28492) 2024-08-27 13:35:38 +02:00
Osama Sayegh
6161b1796b
DEV: Change number of displayed admins/mods on the new about page to 6 (#28566)
This commit changes the cutoff number for the admins and mods lists on the new /about page from 12 to 6. If the admins or mods lists are bigger than 6, the about page will display the 6 most recently seen admins/mods, and tuck the rest away behind a "view more" button.
2024-08-27 04:57:46 +03:00
Krzysztof Kotlarek
df6c152fa1
UX: flag settings tab to follow UI guidelines (#28479)
Add settings tab to flags moderation page.
2024-08-27 09:47:19 +10:00
Joffrey JAFFEUX
fbc485c218
FIX: correctly shortcut format on mac (#28556)
On windows + are shown between keys, not on mac. The fix was to wrap the whole shortcut in `translateModKey`.
2024-08-26 14:58:23 -04:00
Penar Musaraj
fe3d82a44a
FIX: Respect the End key when last post is already rendered (#28524)
Given we are a single-page-app, we hijack the browser's default behavior
for keyboard shortcuts like End because on long topics (20+ posts) we
need to load the last post before really reaching the end of the page.

However, when the last post is already rendered, the End shortcut
currently does nothing, it takes the user to the start of the last post.
If that post is too long, the user will have to scroll down manually.

This change ensures that if the last post of a topic is already rendered
(whether it is in the viewport or not), pressing End will take the user
to the very bottom of the page.

Note for the reviewer: the test added here is for the general case, it
is too hard to test the case where the last post is already rendered,
that isn't covered here.
2024-08-26 14:39:30 -04:00
Joffrey JAFFEUX
27f08a5c28
FIX: allows to manually remove error for virtual fields (#28555)
In FormKit you can add error on an existing field existing in the DOM, but you can also set an arbitrary error on a virtual field not existing in the DOM.

When revalidating existing data, we are only resetting real fields. This commit adds `removeError(name)` to allow you to manually manage virtual fields. `removeError` is available in the same helpers where `addError` is available.

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2024-08-26 20:32:46 +02:00
Joffrey JAFFEUX
d62c32ba71
FIX: allows selectText to take a scroll position as opt (#28554)
Prior to this fix using:

- `replaceText(...)`
- `selectText(..., ..., { scroll: true})`

Wouldn't have the expected behaviour as the scroll from selectText will attempt to save the scroll position and restore it AFTER the replacement happened. This commit allows scroll to be a Boolean or a Number, when a number, it will be used to restore the scrollTop position.

I tried to write tests for this specific behavior but couldn't reproduce the issue in tests.
2024-08-26 18:32:52 +02:00
dependabot[bot]
0e7d5b712a
Build(deps-dev): Bump ember-cli-deprecation-workflow from 3.0.1 to 3.0.2 (#28472)
Bumps [ember-cli-deprecation-workflow](https://github.com/ember-cli/ember-cli-deprecation-workflow) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/ember-cli/ember-cli-deprecation-workflow/releases)
- [Changelog](https://github.com/ember-cli/ember-cli-deprecation-workflow/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli-deprecation-workflow/commits)

---
updated-dependencies:
- dependency-name: ember-cli-deprecation-workflow
  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>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-08-26 18:18:20 +02:00
Jan Cernik
b0f6d074be
FIX: Destroy draft when clicking the Discard button (#28552) 2024-08-26 12:49:26 -03:00
Jarek Radosz
58d687a92e
DEV: "Downgrade" @ember/string from 4.x to 3.x (#28553)
A follow-up to dd1abf91ef.

Because `ember-cli-deprecation-workflow` relied on `@ember/string` 3.1.1, that was the effective version used in the app.

Turns out there's a compatiblity issue with 4.0.0. Let's lock it to 3.x so we can easily update deprecation-workflow and then we can look into the ember/string issue.
2024-08-26 17:48:40 +02:00
Jarek Radosz
dd1abf91ef
DEV: Add missing @ember/string dependencies (#28547)
All those addons import it but didn't have it in their package.jsons. And because the only thing that had it as a dependency (ember-cli-deprecation-workflow) removed it in the latest version, the build breaks.

File it under: a problem we wouldn't have with pnpm :P
2024-08-26 15:48:01 +02:00
dependabot[bot]
db8e0a02f1
Build(deps): Bump @babel/standalone in the babel group (#28532)
Bumps the babel group with 1 update: [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.25.4 to 7.25.5
- [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.25.5/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  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>
2024-08-26 14:13:24 +02:00
锦心
a2dbade55d
FIX: Prevent group requests from loading infinitely (#28544)
In GroupRequestsController, request_count is incorrectly written as
user_count, which causes group member requests to be loaded infinitely
when user_count is greater than request_count.
2024-08-26 17:54:30 +08:00
Joffrey JAFFEUX
3eb7aa866c
FIX: prevents exception when showing replacements (#28543) 2024-08-26 11:37:12 +02:00
David Battersby
910bfaf5f5
FIX: prevent desktop notification callbacks on mobile (#28527) 2024-08-26 15:49:49 +10:00
Sam
e25578d702
FIX: when replacing text in composer maintain history (#28537)
Replacing value in the composer will not maintain history, this migrates
us to the new pattern used throughout this file
2024-08-26 14:25:31 +10:00
Martin Brennan
a16faa27cd
FEATURE: Allow showing site text search in selected locale (#28453)
When searching for site texts for admin using the english
version of the text, previously we would show the english
version in the results _even if_ there was another locale
translated version available when a locale was selected
from the dropdown.

This commit adds a "Only show results in selected locale"
checkbox option which will instead make it so the results
shown are in the target locale, making it easier for translators
to tell when there is actually translations vs. missing tranlsations.
2024-08-26 11:25:36 +10:00
dependabot[bot]
d83ada23b9
Build(deps-dev): Bump @swc/core from 1.7.14 to 1.7.18 (#28534)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.14 to 1.7.18.
- [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.14...v1.7.18)

---
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-08-26 08:48:17 +08:00
Blake Erickson
274e18622e
FIX: Video uploads sometimes hang indefinitely (#28523)
If there is a codec issue or something trying to process a video file
for thumbnail generation, uploads could hang indefinitely. This fix
  ensures that we continue the upload process even if we encounter an
  error trying to generate a thumbnail for it.
2024-08-23 15:58:54 -06:00
Osama Sayegh
a7cd523faf
FIX: Refresh the edit tag section when navigating to another tag (#28519)
If you’re viewing a tag and you switch to a different tag via the sidebar or the tags dropdown, after expanding the info section of the tag page via the wrench button, the info section keeps showing the previous tag's details instead of the new one.

This happens because the tag info section makes an ajax request to load the tag's details, and this request is made inside the `didInsertElement` hook which is only fired once when the component is rendered. To fix this, we need to set the result from the ajax request to null and add a `didUpdateAttrs` hook to trigger another request to load the info of the new tag.

Internal topic: t/134809.
2024-08-23 20:08:24 +03:00
chapoi
208007d9a0
UX: centralise DMenu mobile styling + fixes (#28469) 2024-08-23 17:56:35 +02:00
Jarek Radosz
5a8e7c5f29
DEV: Convert admin charts to glimmer/gjs (#28271) 2024-08-23 14:59:56 +02:00
Joffrey JAFFEUX
fee8caf529
FIX: correctly reset form before destroying it (#28516)
This change is preventing the "is dirty check" from happening when clicking delete on this form. This was not good UX and was also causing bugs by leaving the form in a unexpected state.
2024-08-23 14:58:31 +02:00
David Taylor
fe6c91daa3
DEV: Convert select-kit subclasses to native class syntax (#28491)
This covers all select-kit subclasses in core and core plugins

Followup to https://github.com/discourse/discourse/pull/28489
2024-08-23 13:19:26 +01:00
David Taylor
87ae3f689c
DEV: Convert mapping-router to native class syntax (#28513) 2024-08-23 12:58:19 +01:00
David Taylor
d1cc60c435
DEV: Convert select-kit components to native class syntax (#28489)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-23 12:17:07 +01:00
Joffrey JAFFEUX
2829b670f9
DEV: adds support for replaceText in toolbarEvent (#28512)
This function was available in textarea manipulation mixin, but not exposed as other functions like addText, applySurround, ...
2024-08-23 11:44:27 +02:00
dependabot[bot]
1ac7482271
Build(deps): Bump @babel/standalone in the babel group (#28500)
Bumps the babel group with 1 update: [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.25.3 to 7.25.4
- [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.25.4/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  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>
2024-08-23 01:51:58 +02:00
dependabot[bot]
cd4efb8d68
Build(deps-dev): Bump webpack from 5.93.0 to 5.94.0 (#28501)
Bumps [webpack](https://github.com/webpack/webpack) from 5.93.0 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.93.0...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  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-08-23 01:51:21 +02:00
Sam
7ab7e6bb23
FEATURE: allow plugins to specify keyboard shortcuts for hidden toolbar items (#28456)
Previous to this change there is no clean way to apply keyboard shortcuts
to things such as "add poll" and other hidden options in the toolbar

This allows shortcuts to be specified similar to how they are on the toolbar



Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-08-23 09:28:28 +10:00
Joffrey JAFFEUX
eb70b3bc93
DEV: adds more fields to topic fabricator (#28497) 2024-08-22 23:01:17 +02:00
Kris
828c34451e
UX: don't use split subcategory color in docked header (#28494) 2024-08-22 16:36:59 -04:00
Blake Erickson
b53df4d884
FIX: Videos not uploading due to thumbnail generation error (#28493)
If we don't get a `videoWidth` back for a video don't try and generate a
thumbnail for it.

Also as part of this change I switched getImageData, the function
throwing the error, to use video.videoWidth instead of canvas.width
because it's very likely we were setting canvas.width too early before
the width could be read. Now that we are reading the value inside of the
setTimeout hopefully we will actually have a width. Just incase we don't
detect a width we will now exit early instead of throwing an error.

We only need to check for `0` and not null because the value is an
integer and will always return a 0 if it can't be read. https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/videoWidth

See https://meta.discourse.org/t/322363
2024-08-22 13:35:18 -06:00
David Taylor
5fa0496f81
DEV: fixup select-kit pluginApiIdentifiers typo (#28487)
Followup to 3e3c051164
2024-08-22 16:36:24 +01:00
Osama Sayegh
6997b3c5ce
FIX: Hide heading when there's no custom description (#28470)
In the new /about page, when there's no extended description provided by the admin, the "About" heading above the description should not be displayed.
2024-08-22 13:47:19 +03:00
dependabot[bot]
9d367cc9a1
Build(deps): Bump ace-builds from 1.35.5 to 1.36.0 (#28471)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.35.5 to 1.36.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.35.5...v1.36.0)

---
updated-dependencies:
- dependency-name: ace-builds
  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-08-22 12:22:31 +02:00
Joffrey JAFFEUX
905b4f900e
DEV: adds tag to core fabricators (#28480) 2024-08-22 10:49:00 +02:00
David Taylor
c91dcd0447
DEV: Convert core components to native class syntax (batch 1) (#28465)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-22 09:39:28 +01:00
David Taylor
3e3c051164
DEV: Convert select-kit base classes to native class syntax (#28467)
This lays the groundwork for converting SelectKit subclasses to native class syntax. This commit is designed to be entirely backwards-compatible, so it should not affect any existing subclasses.

Of interest:

- Any properties which are designed to be overridden by subclasses are implemented using a local `@protoProp` decorator. That means they are applied to the prototype, so that they can be overridden in subclasses by both legacy `.extend()` prototype extensions, and by modern native-class fields.

- New class decorators are introduced: `@selectKitOptions` and `@pluginApiIdentifiers`. These are native class versions of the legacy `concatenatedProperties` system. This follows the pattern Ember has introduced for `@className`, `@classNameBindings`, etc.
2024-08-22 09:39:03 +01:00
Martin Brennan
ebbe23e4d2
UX: Add title token for What's New admin page (#28476)
Followup e60b808f49,
I missed adding it here.
2024-08-22 14:36:32 +10:00
Martin Brennan
e60b808f49
UX: Apply new admin UI guidelines to What's New (#28454) 2024-08-22 10:28:29 +10:00
Joffrey JAFFEUX
5eca77dd70
FIX: ensures href is not set two times (#28466)
This would cause the infamous error:

```
index.js:118 Uncaught (in promise)
Error: Assertion Failed: You attempted to update `href` on `<ExtraNavItem:ember384>`, but it had already been used previously in the same computation.
```

Moreover, set didnt seem necessary here.
2024-08-21 20:27:21 +02:00
Renato Atilio
676f0897ac
FIX: subfolder account activation (#28463) 2024-08-21 13:50:38 -03:00
Jarek Radosz
cee2605d88
FIX: Lost outer context in #each block in hbr (#28461)
Regressed 3.5 years ago in e80332a2bc :P
2024-08-21 17:11:36 +02:00
Osama Sayegh
b69a7ea824
FIX: Specify @type arg for the image uploader in the about config area (#28460)
Specifying the type is required for the uploader to work on sites that use S3 uploads.
2024-08-21 16:35:32 +03:00
Martin Brennan
9dd47ca755
UX: Fix restore info link on admin backups page (#28452)
Followup 1446596089

The link to inform admins that restore is disabled
was not correct. This fixes it and also changes it
to go to /admin/backups/settings
2024-08-21 13:23:24 +10:00
Martin Brennan
8632ea5a63
UX: Apply admin UI guidelines to custom flags (#28433)
This commit changes the custom flags admin config area
to use the AdminPageHeader component and conforms
to the new admin UI guidelines. Also makes some slight
modifications to the reusable components to handle using
a @route for an action button.
2024-08-21 10:42:00 +10:00
dependabot[bot]
e1855da40d
Build(deps-dev): Bump ember-cli from 5.10.0 to 5.11.0 (#28449)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 5.10.0 to 5.11.0.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
- [Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli/compare/v5.10.0...v5.11.0)

---
updated-dependencies:
- dependency-name: ember-cli
  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-08-21 00:54:06 +02:00
dependabot[bot]
3d217dc6b3
Build(deps): Bump ace-builds from 1.35.4 to 1.35.5 (#28450)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.35.4 to 1.35.5.
- [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.35.4...v1.35.5)

---
updated-dependencies:
- dependency-name: ace-builds
  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-08-21 00:52:25 +02:00
Sérgio Saquetim
649cbad216
DEV: Use the glimmer header in the Styleguide (#28427) 2024-08-20 19:44:26 -03:00
Osama Sayegh
eb0b2c9308
FIX: Use correct subtitle for Site contact name field (#28448)
A copy-and-paste error resulted in using the wrong subtitle for the "Site contact name" field in the admin config area for the /about page.
2024-08-21 01:21:49 +03:00
Kris
6c159241c9
UX: view count in topic map should always be at least 1 (#28447) 2024-08-20 17:26:09 -04:00
Osama Sayegh
10ae7ef44a
FEATURE: Add estimated number of global and EU visitors to the about page (#28382)
This commit implements 2 new metrics/stats in the /about page for the _estimated_ numbers of unique visitors from the EU and the rest of the world. This new feature is currently off by default, but it can be enabled by turning on the hidden `display_eu_visitor_stats` site settings via the rails console.

There are a number of assumptions that we're making here in order to estimate the number of unique visitors, specifically:

1. we're assuming that the average of page views per anonymous visitor is similar to the average number of page views that a logged-in visitor makes, and
2. we're assuming that the ratio of logged in visitors from the EU is similar to the ratio of anonymous visitors from the EU

Discourse keeps track of the number of both logged-in and anonymous page views, and also the number of unique logged-in visitors and where they're from. So with those numbers and the assumptions above, we can estimate the number of unique anonymous visitors from the EU and the rest of the world.

Internal topic: t/128480.
2024-08-21 00:03:42 +03:00
Mark VanLandingham
9802d4040f
DEV: Add class to span wrapping after-topic-list plugin outlet (#28445) 2024-08-20 14:08:06 -05:00
Osama Sayegh
db6eff7be9
DEV: Allow custom site activity items in the new /about page (#28400)
This commit introduces a new frontend API to add custom items to the "Site activity" section in the new /about page. The new API is called `addAboutPageActivity` and it works along side the `register_stat` serve-side API which serializes the data that the frontend API consumes. More details of how the two APIs work together is in the JSDoc comment above the API function definition.

Internal topic: t/128545/9.
2024-08-20 16:16:05 +03:00
Joffrey JAFFEUX
ccb1861ada
DEV: better highlighting of mentions (#28403)
This commit improves the hilight-ing of mentions in posts and chat messages.

- `@here` and `@all` will generate a `<a class="mention --wide">`
- bots will generate a `<a class="mention --bot">`
- current user will generate a `<a class="mention --current">`

To achieve this change the following value transformer has been added: "mentions-class". It will be run in posts and chat messages after the mention is rendered.

A bug were bots were not considered in mentioned users has also been fixed as part of this PR.
2024-08-20 14:37:28 +02:00
Osama Sayegh
35b748e7f4
FIX: Don't show silence button on staff users and display similar users (#28423)
This commit fixes a bug where the silence button is incorrectly displayed on the admin page of a staff user. It's not actually possible to silence a staff user because the backend correctly prevents it, but the frontend isn't checking if the button should be displayed.

Another small bug that this commit fixes is the similar users list not showing up inside the silence/suspend modals due to also a bug in the frontend.

I've also changed the way similar users are loaded so that they're not returned by the `admin/users#show` endpoint anymore and moved them into a new endpoint that the penalize modals (suspend and silence) can call directly to retrieve the list of users. This is done because the similar users list is never shown on the admin user page (`/admin/users/:user_id/:username`); they're only needed when the suspend or silence modals are opened.

Internal topic: t/130014.
2024-08-20 15:27:29 +03:00
dependabot[bot]
08463a9db2
Build(deps): Bump a11y-dialog from 8.0.4 to 8.1.0 (#28418)
Bumps [a11y-dialog](https://github.com/KittyGiraudel/a11y-dialog) from 8.0.4 to 8.1.0.
- [Release notes](https://github.com/KittyGiraudel/a11y-dialog/releases)
- [Commits](https://github.com/KittyGiraudel/a11y-dialog/compare/8.0.4...8.1.0)

---
updated-dependencies:
- dependency-name: a11y-dialog
  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-08-20 12:00:41 +02:00
锦心
070025204d
DEV: add addError method to FormKit onRegisterApi (#28436)
This commit adds the addError method to From's onRegisterApi to allow
parent components to add errors to a field.
2024-08-20 17:22:36 +08:00
dependabot[bot]
b42d6faef5
Build(deps-dev): Bump @swc/core from 1.7.11 to 1.7.14 (#28424)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.11 to 1.7.14.
- [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.11...v1.7.14)

---
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-08-20 13:07:51 +08:00
David Taylor
dfc947a97d
PERF: Defer button actions to improve interaction-next-paint (INP) (#28019)
This is a variation on bc3e8a9963cf9a64d114ec751c875025af169690, which was reverted due to issues on iOS. Safari's "in response to user action" check cannot follow the `runAfterFramePaint` chain of interaction -> requestAnimationFrame -> messageChannel, and so some sensitive browser APIs (e.g. clipboard, upload, etc.) were blocked.

This commit is similar, but uses `next()` instead of `runAfterFramePaint()`. The result seems the same, but doesn't have the same issue on iOS.

The chat-emoji-picker change was required to resolve a test failure. The emoji picker has never closed-on-scroll on desktop, so there is no user-facing change in behavior.
2024-08-20 10:11:34 +08:00
Martin Brennan
1446596089
UX: Apply admin interface guidelines to Backups page (#28051)
This commit converts the Backups page in the admin interface
to follow our new admin interface guidelines.

As part of this work, I've also made `AdminPageHeader` and `AdminPageSubheader`
components that can be reused on any admin page for consistency, that handle
the title and action buttons and also breadcrumbs.

Also renamed `AdminPluginFilteredSiteSettings` to `AdminFilteredSiteSettings` since
it can be used generally to show a subset of filtered site settings, not only
settings for a plugin. Not sure if it's ideal to have to define a new route for this
for every config area, but not sure how else to do it right now.
2024-08-20 09:59:43 +10:00
Gerhard Schlager
0826e021e4
PERF: Delete I18n._overrides after they have been applied (#28405)
There's no need to keep them around. This might just bloat memory if there are lots of translation overrides.
2024-08-19 14:11:04 +02:00
Gerhard Schlager
7b8855a698
FIX: Translation overrides didn't work for search orders (#28404)
The `SortOrders` were cached before translation overrides were applied on the client.
2024-08-19 14:10:29 +02:00
Martin Brennan
31a6d24053
FEATURE: Unseen feature indicator in admin sidebar (#28397)
This commit adds a blue dot next to the "What's New"
link in the admin sidebar if the user has not seen the
new features yet, as a followup to 3e5976f843
which removed the tab on the dashboard that had this same
functionality.

When the admin visits the "What's New" page they count
as having seen all the features straight away. This could
be something we want to change, but for now this keeps the
same functionality.
2024-08-19 14:50:30 +10:00
dependabot[bot]
32195ed77e
Build(deps-dev): Bump qunit from 2.21.1 to 2.22.0 (#28415)
Bumps [qunit](https://github.com/qunitjs/qunit) from 2.21.1 to 2.22.0.
- [Release notes](https://github.com/qunitjs/qunit/releases)
- [Changelog](https://github.com/qunitjs/qunit/blob/main/History.md)
- [Commits](https://github.com/qunitjs/qunit/compare/2.21.1...2.22.0)

---
updated-dependencies:
- dependency-name: qunit
  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-08-19 01:01:47 +02:00
Joffrey JAFFEUX
e7b7886d83
DEV: removes route action usage from sidebar footer (#28408)
`routeAction` is an old and bad pattern we don't want to have in the codebase anymore.


Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2024-08-17 17:45:18 +02:00
Joffrey JAFFEUX
3e69f31e0b
DEV: migrates webhook-status to gjs (#28407)
This commit also adds a test for this component.

---------

Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2024-08-17 17:44:56 +02:00
Joffrey JAFFEUX
ea8516b38d
DEV: prevents route action to crash in tests (#28409)
`routeAction` is testing at runtime that a route exists when in debug mode. However in the case of components tested in isolation there's no existing route which was causing an exception, this commit prevents this check in this case as it's irrelevant.
2024-08-17 13:52:20 +02:00
Renato Atilio
5e91233ca9
UX: omit fav badges count if max is 0 (#28402) 2024-08-16 16:42:10 -03:00
Joffrey JAFFEUX
a59c89211b
FIX: bypass highlighths for long code in auto mode (#28399)
Long code is considered 1000 characters atm. 10000+ characters would take seconds due to how highlightjs will consider every installed lang before choosing the best candidate.
2024-08-16 14:25:19 +02:00
Jarek Radosz
6cc100abe0
DEV: Move user-profile-secondary outlet (#28398)
Move it into the preceding `dl` element and remove the `div` wrapper.

The two plugins that use this outlet:
* d-follow - actually jumps through hacky hoops to get its elements into that `dl` anyway
* d-gamification - would look better if its element was in that `dl`
2024-08-16 13:47:52 +02:00
chapoi
931485b7c1
DEV: replace list control nav dropdown with DMenuMobile (#28324)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Renato Atilio <renato@discourse.org>
Co-authored-by: David Taylor <david@taylorhq.com>
2024-08-16 01:40:47 +02:00
Martin Brennan
3e5976f843
FEATURE: Always show full page "New Features" to admins (#28383)
We used to show New Features in a tab on the dashboard,
but this could get pushed down the page especially on
our hosting. In 043117ca13
we made a separate What's New page, so this commit removes
the dashboard tab and changes the admin notification to
send the admin to /admin/whats-new instead of the dashboard
tab.
2024-08-16 09:12:24 +10:00
Kris
43abc219d1
DEV: give sidebar link buttons a data-list-item-name (#28389) 2024-08-15 17:44:37 -04:00
Osama Sayegh
a92cf019db
FIX: Make cancel and reset buttons work for file_size_restriction settings (#28347)
This commit fixes a number of bugs in `file_size_restriction` settings and does a little of refactoring to reduce duplicated code in site setting types (the refactoring is necessary to fix one of the bugs).

The bugs in `file_size_restriction` settings that are fixed in this commit:

1. Save/cancel buttons next to a `file_size_restriction` setting are shown upon navigating to the settings page without changes being made to the setting
2. Cancel button that discards changes made to the setting doesn't work
3. Reset button that resets the setting to its default doesn't work
4. Validation error message isn't cleared when resetting/cancelling changes

To repro those bugs, navigate to `/admin/site_settings/category/files` and observe the top 2 settings in the page (`max image size kb` and `max attachment size kb`).

Internal topic: t/134726.
2024-08-15 19:38:47 +03:00
Kris
b545576b3c
UX: do not check for dimensions in video filename (#28349) 2024-08-15 11:59:13 -04:00
David Battersby
de08ce8f7b
FIX: allow chat sound when notifications are disabled (#28385)
Desktop chat notification sounds have stopped working on most desktop browsers.

This is due to Notifications API being disabled when Push Notifications are supported in the browser, which means that we never iterate on the desktopNotificationHandlers and trigger the callback since we return early.
2024-08-15 18:30:55 +04:00
dependabot[bot]
10c6a761b3
Build(deps-dev): Bump @swc/core from 1.7.10 to 1.7.11 (#28379)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.10 to 1.7.11.
- [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.10...v1.7.11)

---
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-08-15 14:58:50 +02:00
Kris
8cd42de2ef
DEV: add before-sidebar-sections outlet to dropdown mode too (#28376) 2024-08-14 16:25:58 -04:00
Sérgio Saquetim
49449531de
DEV: Accept new transformer names after resetting to a new test (#28375) 2024-08-14 16:05:46 -03:00
David Taylor
b7b233423d
DEV: Fix ordering of freeze-valid-transformers (#28374)
plugins/themes need to use `withPluginApi` to register transformers, and that only works after `discourse-bootstrap` has been run
2024-08-14 18:22:48 +01:00
David Taylor
ede6220347
UX: Only scrollIntoView if sidebar items are not already visible (#28372)
When browsing through a sidebar with this feature enabled (i.e. admin, or docs), it's weird to have the scroll jump around when you click an item. This commit adds a check, so that we only `scrollIntoView` for items which are not already in the viewport.

Followup to b7cce1a0dc
2024-08-14 15:58:11 +01:00
Ted Johansson
d15031a219
DEV: Add plugin outlet for below wizard field (#28371)
We changed the design of the member access wizard step to use toggle groups instead of switches. To support existing designs for notices, we need another plugin outlet.
2024-08-14 15:25:59 +02:00
Osama Sayegh
1bcb5c4e21
UX: Tweak styling for the new /about page (#28367)
Various tweaks the new /about page. Main change is to make it display 3 columns of users instead of 2 when there's enough space.
2024-08-14 14:57:35 +03:00
锦心
1ffb0462c1
FIX: FormKit: Allow 0 in required number input (#28368)
0 is falsy in JavaScript, so the original code would treat 0 as if it
were not input. This unique exception was added to prevent 0 from being
treated as empty input.
2024-08-14 19:46:24 +08:00
Osama Sayegh
3704a917a9
FIX: Don't show blank space when there's no banner image (#28366)
This commit fixes a bug in the redesigned about page where if there's no banner image configured for the page, the top of the page where the banner goes is occupied with large white space. Additionally, this commit also fixes a related bug in the admin config area for the /about page where it's not possible to remove the uploaded banner image.
2024-08-14 10:34:34 +03:00
dependabot[bot]
ed3e566576
Build(deps): Bump terser from 5.31.5 to 5.31.6 (#28358)
Bumps [terser](https://github.com/terser/terser) from 5.31.5 to 5.31.6.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  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-08-14 00:57:46 +02:00
Joffrey JAFFEUX
a5980ea637
FIX: access correct name and description (#28353)
`defaultCategoryLinkRenderer` is using a fake category object which doesn’t have access to the functions and getters of category model.

This had been incorrectly set in c197daa04c

As we don't get a real category object, we have to call the transformers manually and also pass the fake category object as context, this is not ideal as people might try to access properties in the transformer which are not available on the category object given they will be different based on the context. Hopefully one day this helper and all the chain can be refactored to use a real category model.

This commit also adds tests for these two properties in the category-link helper.

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2024-08-14 00:04:55 +02:00
Jarek Radosz
c96dce2934
DEV: Convert user-status-picker to glimmer/gjs/dbutton/input (#28344) 2024-08-13 18:57:57 +02:00
Jarek Radosz
82741eb0a6
DEV: Replace onClick props in topic-timeline container (#28342)
Use `on` modifier instead, and set proper href attributes on links
2024-08-13 18:38:07 +02:00
Joffrey JAFFEUX
31ae81b8eb
FIX: do not continue list inside codefence (#28346)
This commit forces the textarea to check if the list is inside a codefence and won't continue the list if it's the case.

Note this commit also uses the message param of qunit assertions to make them more explicit. It has no impact on behavior.
2024-08-13 17:36:51 +02:00
Jarek Radosz
8a09fd370a
DEV: Convert software-update-prompt to glimmer/gjs/dbutton (#28341) 2024-08-13 15:47:14 +02:00
Jarek Radosz
eccfc946f1
DEV: Convert admin-watched-word to glimmer/gjs/dbutton (#28340) 2024-08-13 15:45:44 +02:00
Jarek Radosz
41593a5d7d
DEV: Convert expand-post to glimmer/gjs/dbutton (#28339) 2024-08-13 14:22:24 +02:00
Jarek Radosz
355dbb928a
Revert "DEV: Use on modifier (or @action param) (#28323)" (#28338)
This reverts commit e3e5710b3d.
2024-08-13 12:39:24 +02:00
Jarek Radosz
e3e5710b3d
DEV: Use on modifier (or @action param) (#28323)
instead of `onclick` prop
2024-08-13 10:50:09 +02:00
Joffrey JAFFEUX
bcfb8a5fc5
FIX: correctly render sql checkboxes (#28328)
This was not using CheckboxGroup and the I18n key was incorrect.
2024-08-13 10:46:54 +02:00
Sam
1fa3eb3f2a
FIX: stop injecting uneeded margin (#28335) 2024-08-13 08:11:16 +02:00
Jan Cernik
5b78bbd138
DEV: Convert account activation pages to use Ember (#28206) 2024-08-12 18:02:00 -03:00
Jan Cernik
043fc0a117
UX: Small topic map improvements and fixes (#28215) 2024-08-12 15:37:05 -03:00
Osama Sayegh
1d6e54e54c
DEV: Add admins and moderators sections to the redesigned /about page (#28273)
This commit continues on work laid out by 6039b513fe to redesign the /about page. In this commit, we add sections for showing the site admins and moderators.

The lists of admins and moderators display the 10 most recently seen admins/moderators, with a button to display the rest of admins or moderators. Admins or moderators that have not logged in to the site in the last year will not be shown. Clicking on an admin's or moderator's name/avatar will show their user card.
2024-08-12 16:23:44 +03:00
Jarek Radosz
34de336afb
DEV: Remove an unused component (#28316)
(admin/resumable-upload)
2024-08-12 14:45:40 +02:00
Jarek Radosz
2a193f2173
DEV: Fix unsafe binding warnings (#28317)
e.g.

```
WARNING: Binding style attributes may introduce cross-site scripting vulnerabilities; please ensure that values being bound are properly escaped. For more information, including how to disable this warning, see https://deprecations.emberjs.com/v1.x/#toc_binding-style-attributes. Style affected: \"height: 60px\"
```
2024-08-12 14:06:22 +02:00
dependabot[bot]
d9bce3087d
Build(deps-dev): Bump @swc/core from 1.7.6 to 1.7.10 (#28312)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.6 to 1.7.10.
- [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.6...v1.7.10)

---
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-08-12 09:21:42 +08:00
Kris
c002911bed
UX: set "topics" link in sidebar as active for hot, unseen, and my posts filters (#28305) 2024-08-09 16:39:12 -04:00
Kris
9d5eb6fed6
A11Y: add aria-label to avatar link on categories page (#28304) 2024-08-09 14:13:45 -04:00
David Taylor
b59b24884f
DEV: Promote modifyClass warning to error (#28300)
This message indicates broken behavior, so it should be an error rather than a warning.

An early-return is added, so that we don't even attempt to make the modification. This will make the behavior consistent, and easier to understand.

Also updates the normalization logic to use the resolver's own logic. This will handle all sorts of normalization in addition to our deprecations.
2024-08-09 16:45:33 +01:00
David Taylor
df5561d780
DEV: Ensure deprecation warning banner works in development builds (#28302)
In development, Ember raises an error when previously-used values are updated during a render. This is to avoid 'backtracking', where parts of templates have to be re-rendered multiple times. In general, this kind of pattern should be avoided, and Ember's warning helps us do that.

However, for the deprecation warning banner, it is quite reasonable for some rendering to trigger a deprecation, and thereby require the global-notice to be re-rendered. We can use our `DeferredTrackedSet` to achieve that. Its `.add` method will delay adding an item to the Set until after the current render has completed.
2024-08-09 15:04:05 +01:00
Kris
234e155d3c
A11Y: do not skip heading levels in keyboard shortcut modal (#28285) 2024-08-09 09:29:53 -04:00
David Taylor
65895f44e9
DEV: print modifyClass warning correctly for deprecated lookups (#28298)
e.g. we map `controller:composer` to `service:composer` in resolver lookups. So, when doing the cache check in modifyClass, we need to check against the normalized name, not the deprecated name.
2024-08-09 09:20:14 +01:00
dependabot[bot]
6229dc3bfd
Build(deps): Bump terser from 5.31.4 to 5.31.5 (#28289)
Bumps [terser](https://github.com/terser/terser) from 5.31.4 to 5.31.5.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.31.4...v5.31.5)

---
updated-dependencies:
- dependency-name: terser
  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-08-09 11:51:03 +08:00
Krzysztof Kotlarek
56524f4bdf
DEV: flaky toggle flag spec (#28292)
Very similar to move up/down flag problem fixed here -  https://github.com/discourse/discourse/pull/28272

Those are the steps to toggle the flag:
1. click toggle - `saving` CSS class is added;
2. request to backend;
3. `saving` CSS class is removed.

And check if the flag was toggle was:
```ruby
def has_saved_flag?(key)
  has_css?(".admin-flag-item.#{key}.saving")
  has_no_css?(".admin-flag-item.#{key}.saving")
end
```
If the save action is very fast, then the saving class is removed before the first check.

Therefore I decided to invert it, and once action is finished add `saved` CSS class.

Then we can have a quick positive check:

```ruby
def has_saved_flag?(key)
  has_css?(".admin-flag-item.#{key}.saved")
end
```
2024-08-09 09:56:10 +10:00
dependabot[bot]
6cf613d5f5
Build(deps-dev): Bump @floating-ui/dom from 1.6.9 to 1.6.10 (#28270)
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.9 to 1.6.10.
- [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.10/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-08-08 23:25:47 +02:00
Penar Musaraj
7c5e3eacda
FEATURE: "Hot" replacing "Top" as default in the top menu (#28252)
This change only applies to instances that have not modified the
`top_menu` site setting.
2024-08-08 13:57:42 -04:00
David Taylor
93a10b3b2e
FIX: Site setting category titles (#28281)
These were accidentally included in the refactoring of c197daa04c
2024-08-08 18:05:35 +01:00
Jean
1c9a482eb1
UX: Add plugin outlet to embeddable hosts (#28264) 2024-08-08 12:39:46 -04:00
Joffrey JAFFEUX
c197daa04c
DEV: allows to alter category name/description (#28263)
This commit adds two new getters to the category model:
- `displayName`
- `descriptionText`

These getters are used instead of `name` and `description_text` where appropriate.

On top of this two transformers have been added to allow plugins to alter these getters:

```javascript
api.registerValueTransformer(
  "category-display-name",
  ({ value, context }) =>
    value + "-" + context.category.id + "-transformed"
);
```

```javascript
api.registerValueTransformer(
  "category-description-text",
  ({ value, context }) =>
    value + "-" + context.category.id + "-transformed"
);
```
2024-08-08 17:33:23 +02:00
Jarek Radosz
86bb07f619
DEV: Add support for regular plugin outlets in hbr (#27840) 2024-08-08 16:59:28 +02:00
dependabot[bot]
1f02fef375
Build(deps): Bump terser from 5.31.3 to 5.31.4 (#28269)
Bumps [terser](https://github.com/terser/terser) from 5.31.3 to 5.31.4.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.31.3...v5.31.4)

---
updated-dependencies:
- dependency-name: terser
  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-08-08 09:50:47 +08:00
Krzysztof Kotlarek
db4395d70c
FIX: flaky flags specs when moving up or down (#28272)
Those are the steps to move the flag:
1. open menu;
2. click move up - `saving` CSS class is added;
3. request to backend;
4. `saving` CSS class is removed.

To check if the action was finished we are using this method:
```
def move_up(key)
  open_flag_menu(key)
  find(".admin-flag-item__move-up").click
  has_saved_flag?(key)
  self
end

def has_saved_flag?(key)
  has_css?(".admin-flag-item.#{key}.saving")
  has_no_css?(".admin-flag-item.#{key}.saving")
end
```

However, sometimes specs were failing with `expected to find CSS ".admin-flag-item.spam.saving" but there were no matches`

I think that the problem is with those 2 lines:
```
  find(".admin-flag-item__move-up").click
  has_closed_flag_menu?
```
If the save action is very fast, then the `saving` class is removed before the first check.

Therefore, to determine that the move action is finished, I am checking if the menu is closed.
2024-08-08 09:50:28 +08:00
Penar Musaraj
9d00871a67
UX: Change bookmark menu label from "Custom..." to "More options…" (#28266) 2024-08-07 17:57:18 -04:00
Joffrey JAFFEUX
1b69c0c721
DEV: adds tests for transformers (#28207)
This commit adds tests for:
- header-notifications-avatar-size
- home-logo-href
2024-08-07 20:58:56 +02:00
Sérgio Saquetim
a9abaf408d
DEV: Auto expand active sections and scroll active link into view (#28237) 2024-08-07 14:47:34 -03:00
Jarek Radosz
064332ef6e
DEV: Update ember-cli-deprecation-workflow from 2.2.0 to 3.0.1 (#28226)
From dependabot PR:

<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/ember-cli/ember-cli-deprecation-workflow/releases">ember-cli-deprecation-workflow's releases</a>.</em></p>
<blockquote>
<h2>v3.0.1-ember-cli-deprecation-workflow</h2>
<h2>Release (2024-07-11)</h2>
<p>ember-cli-deprecation-workflow 3.0.1 (patch)</p>
<h4>🏠 Internal</h4>
<ul>
<li><code>ember-cli-deprecation-workflow</code>
<ul>
<li><a href="https://redirect.github.com/ember-cli/ember-cli-deprecation-workflow/pull/192">#192</a> fix repository link in package.json (<a href="https://github.com/mansona"><code>@​mansona</code></a>)</li>
<li><a href="https://redirect.github.com/ember-cli/ember-cli-deprecation-workflow/pull/191">#191</a> update release plan workflow (<a href="https://github.com/mansona"><code>@​mansona</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 1</h4>
<ul>
<li>Chris Manson (<a href="https://github.com/mansona"><code>@​mansona</code></a>)</li>
</ul>
<h2>v3.0.0</h2>
<h2>Release (2024-06-25)</h2>
<p>ember-cli-deprecation-workflow 3.0.0 (major)</p>
<h4>💥 Breaking Change</h4>
<ul>
<li><code>ember-cli-deprecation-workflow</code>
<ul>
<li><a href="https://redirect.github.com/ember-cli/ember-cli-deprecation-workflow/pull/159">#159</a> [BREAKING] Convert to a module. Drops support for Ember &lt; 3.28, requires manual initialization (<a href="https://github.com/lolmaus"><code>@​lolmaus</code></a>)</li>
<li><a href="https://redirect.github.com/ember-cli/ember-cli-deprecation-workflow/pull/175">#175</a> Node 16 is the minimum supported version (<a href="https://github.com/mixonic"><code>@​mixonic</code></a>)</li>
</ul>
</li>
</ul>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>ember-cli-deprecation-workflow</code>
<ul>
<li><a href="https://redirect.github.com/ember-cli/ember-cli-deprecation-workflow/pull/181">#181</a> Remove unused broccoli magic (<a href="https://github.com/simonihmig"><code>@​simonihmig</code></a>)</li>
</ul>
</li>
</ul>
<h4>📝 Documentation</h4>
<ul>
<li><code>ember-cli-deprecation-workflow</code>
<ul>
<li><a href="https://redirect.github.com/ember-cli/ember-cli-deprecation-workflow/pull/184">#184</a> Update configuration paths in documentation (<a href="https://github.com/backspace"><code>@​backspace</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>ember-cli-deprecation-workflow</code>
<ul>
<li><a href="https://redirect.github.com/ember-cli/ember-cli-deprecation-workflow/pull/189">#189</a> start using release-plan (<a href="https://github.com/mansona"><code>@​mansona</code></a>)</li>
<li><a href="https://redirect.github.com/ember-cli/ember-cli-deprecation-workflow/pull/188">#188</a> start using pnpm (<a href="https://github.com/mansona"><code>@​mansona</code></a>)</li>
<li><a href="https://redirect.github.com/ember-cli/ember-cli-deprecation-workflow/pull/178">#178</a> Upgrade Ember CLI to 5.4 (<a href="https://github.com/lolmaus"><code>@​lolmaus</code></a>)</li>
<li><a href="https://redirect.github.com/ember-cli/ember-cli-deprecation-workflow/pull/170">#170</a> Bump Node, swap to npm, update CI pipeline (<a href="https://github.com/mixonic"><code>@​mixonic</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 5</h4>
<ul>
<li>Andrey Mikhaylov (lolmaus) (<a href="https://github.com/lolmaus"><code>@​lolmaus</code></a>)</li>
<li>Buck Doyle (<a href="https://github.com/backspace"><code>@​backspace</code></a>)</li>
<li>Chris Manson (<a href="https://github.com/mansona"><code>@​mansona</code></a>)</li>
<li>Matthew Beale (<a href="https://github.com/mixonic"><code>@​mixonic</code></a>)</li>
<li>Simon Ihmig (<a href="https://github.com/simonihmig"><code>@​simonihmig</code></a>)</li>
</ul>
</blockquote>
</details>
2024-08-07 17:59:42 +02:00
David Taylor
75d11bfeba
DEV: Convert core controllers to native class syntax (batch 3) (#28224)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-07 14:48:29 +01:00
David Taylor
2c8d703b48
DEV: Fixes for modifyClass (#28227)
This resolves issues when a mix of callback-based modifications and Ember-reopen-based modifications are used on the same target. In summary:

- Fixes `pluginId` exception logic for callback-based modifications

- Moves `pluginId` storage to a WeakMap so it doesn't pollute the target's descriptors

- When applying a legacy modifyClass, we will temporarily rollback any modern callback-based modifications. This means all of Ember's reopen calls apply to un-prepended classes, and then we add our modern prepends on top.

- Calls `.proto()` on CoreObject descendants before prepending, to ensure that pending Ember mixins have been applied
2024-08-07 12:28:51 +01:00
Osama Sayegh
5dbf812d32
DEV: Add site age and site activities section to the redesigned about page (#28214)
This commit continues on work laid out by 6039b513fe to redesign the /about page. In this commit, we add the site age and a section on the right hand side to show site activities/statistics such as topics, posts, sign-ups, likes etc.
2024-08-07 11:11:41 +03:00
Isaac Janzen
8aff94dadb
DEV: Add addLogSearchLinkClickedCallbacks to plugin API (#28254)
- Added `addLogSearchLinkClickedCallbacks` which allows plugins/TCs to register a callback when a search link is clicked and before a search log is created
2024-08-06 16:08:40 -05:00
David Taylor
66de6a43a8
FIX: Ensure do-not-disturb icon updates correctly (#28253)
`currentUser.do_not_disturb_until` is a string, so we need to parse it before comparing to the current timestamp
2024-08-06 19:13:13 +01:00
Joffrey JAFFEUX
584106b752
UX: link edit text to search in badges form (#28248)
During our refactoring of admin badges we decided to link to:

`adminSiteText.edit locale=locale`

Instead of:

`adminSiteText q=key`

After feedback from the community we are reverting this change.
2024-08-06 16:01:20 +02:00
David Taylor
998e035614
DEV: Convert core controllers to native class syntax (batch 4) (#28225)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-06 12:47:05 +01:00
Joffrey JAFFEUX
ad8c5e7f80
FIX: use CheckboxGroup for admin badges form (#28239)
A recent change in FormKit has changed the syntax of this specific component. It's also better to use `<CheckboxGroup />` for this use case too.

Im mixed on writing tests for labels, it's a lot of tests to write for a rather low value.

This commit also slightly tweaks the width of the icon picker, from medium to small.
2024-08-06 10:45:09 +02:00
Krzysztof Kotlarek
fc2259d1c8
FIX: limit the number of custom flags to 50 (#28221)
Admin can create up to 50 custom flags. It is limited for performance reasons.

When the limit is reached "Add button" is disabled and backend is protected by guardian.
2024-08-06 10:50:12 +10:00
dependabot[bot]
0514044cf2
Build(deps-dev): Bump @floating-ui/dom from 1.6.8 to 1.6.9 (#28235)
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.8 to 1.6.9.
- [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.9/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-08-06 08:48:17 +08:00
Renato Atilio
48ac62dfef
UX: respect current locale on topic map views date format (#28199)
* UX: respect current locale on topic map views date format

* DEV: linting
2024-08-05 13:18:48 -03:00
marstall
e7f976a106
DEV: add description parameter to discourse-tag component (#28213)
* DEV: add description parameter to discourse-tag component

* prettier
2024-08-05 12:04:54 -04:00
dependabot[bot]
f9b44361b2
Build(deps-dev): Bump @swc/core from 1.7.4 to 1.7.6 (#28216)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.4 to 1.7.6.
- [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.4...v1.7.6)

---
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-08-05 13:57:26 +02:00
David Taylor
595c43c5e5
DEV: Enable glimmer header by default (#28222)
https://meta.discourse.org/t/316549
2024-08-05 12:08:52 +01:00
David Taylor
1b28b8e169
DEV: Upgrade babel & remove vendored safari-bugfix transformation (#28208)
The Safari 15 bugfix has been rolled into @babel/preset-env in the most recent version, so we no longer need to carry our vendored copy.

This commit updates @babel/preset-env, runs npx yarn-deduplicate yarn.lock, and removes the vendored transform.

This commit also refactors our theme transpiler to use @babel/preset-env, with the same list of target browsers as our ember-cli build uses. This means we no longer need to maintain a separate list of babel transforms for themes.
2024-08-05 10:35:26 +01:00
Krzysztof Kotlarek
300ef67481
UX: move admin flag form to form-kit (#28187)
Rewrite the admin flag form to use FormKit. This is a draft because waiting for Checkbox improvements.
2024-08-05 11:01:25 +10:00
Sérgio Saquetim
4167862a05
DEV: Catch transformer errors and improve warnings (#28205) 2024-08-02 15:58:13 -03:00
David Taylor
1b2e0e86f8
FIX: Further improvements to // handling (#28211)
Followup to f70a65ea02

1. Update a second regex in `routeTo` to avoid stripping domain/protocol from middle of string

2. Update `URL.handleURL` to strip double-slashes in paths, before calling the ember router. This mimics what Ember does on initial page-load

Additional tests are added for both
2024-08-02 18:11:11 +01:00
Keegan George
18ac600352
DEV: Add stacked line chart mode (#28203) 2024-08-02 09:40:27 -07:00
David Taylor
f70a65ea02
FIX: Do not strip // from the middle of URLs in discourse-url (#28210)
Protocol/domain should only be stripped when they occur at the beginning of a URL
2024-08-02 16:23:54 +01:00
David Battersby
6ec8728ebf
DEV: refactor live notifications setting in user preferences (#28145)
This change is mainly a refactor of the desktop notifications service to improve readability and have standardised values for tracking state for current user in regards to the Notification API and Push API.

Also improves readability when handling push notification jobs, especially in scenarios where the push_notification_time_window_mins site setting is set to 0, which will allow sending push notifications instantly.
2024-08-02 17:25:15 +04:00
David Taylor
7977ae61f7
FIX: Update do-not-disturb icon in real-time on glimmer header (#28200)
To achieve this, a new notifications service is set up with an `isInDoNotDisturb` tracked property. While a user is in do-not-disturb mode, it runs a regular timer until do-not-disturb is over.
2024-08-02 08:55:51 +01:00
David Taylor
11369018b6
DEV: Stop storing theme-transpiler on filesystem in development (#28198)
We were writing theme-transpiler JS files to the filesystem on a per-process basis, and then immediately reading them back in. Plus, there was no cleanup mechanism, so the tmp directory would grow indefinitely.

This commit refactors things so that the `build.js` script outputs the theme-transpiler source to stdout. That way, we can read it directly into the process, and then into mini-racer, without needing to go via the filesystem. No cleanup required!

In production, the theme-transpiler is still cached in a file during `assets:precompile`
2024-08-01 17:59:34 +01:00
David Taylor
87450f677b
DEV: Resolve observes deprecation in full-page-search (#28196) 2024-08-01 15:47:33 +01:00
Joffrey JAFFEUX
8b61aafe74
FIX: correct return isForever value (#28194)
Following a refactor we forgot to return the value.
2024-08-01 16:06:26 +02:00
Joffrey JAFFEUX
a6eba4b203
DEV: prevents chrome to ask for fav search engine (#28192) 2024-08-01 15:49:07 +02:00
Joffrey JAFFEUX
4998c7be50
DEV: typo in variable name (#28193)
Note this had no behavior impact, as the computed property was correct.
2024-08-01 15:47:02 +02:00
Martin Brennan
77081de027
FIX: Badge image uploader (#28188)
In the formkit conversion in 2ca06ba236
we missed setting a type for the UppyImageUploader for badges. Also,
we were not passing down the `image_url` as form data, so when we used
`data.image` for that field the badge was not updating in the UI after
page loads and the image URL was not loading for preview.

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-08-01 15:36:17 +02:00
David Taylor
492a45da37
DEV: Introduce home-logo-image-url value transformer (#28189)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-08-01 13:43:18 +01:00
Joffrey JAFFEUX
5357f0175e
DEV: moves version to the top (#28190)
The version is a very important info of the file and it's currently lost in the middle of the file. I think it makes sense to have it at the top.
2024-08-01 14:29:45 +02:00
dependabot[bot]
4c13ad5f60
Build(deps-dev): Bump @swc/core from 1.7.3 to 1.7.4 (#28182)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.3 to 1.7.4.
- [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.3...v1.7.4)

---
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-08-01 12:06:12 +01:00
David Taylor
fc02b4904d
DEV: Convert core controllers to native class syntax (batch 2) (#28179)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-01 12:03:17 +01:00
David Taylor
608e5682e2
DEV: Drop unused legacy modal controller/mixin (#28175) 2024-08-01 10:18:50 +01:00
David Taylor
8c4db0d2f8
DEV: Convert core controllers to native class syntax (batch 1) (#28177)
Changes made using the ember-native-class-codemod, plus some manual tweaks
2024-08-01 10:18:36 +01:00
Sérgio Saquetim
7b14cd98c7
DEV: Add behavior transformers (#27409)
This commit introduces the `behaviorTransformer` API to safely override behaviors defined in Discourse.

Two new plugin APIs are introduced:

- `addBehaviorTransformerName` which allows plugins and theme-components to add a new valid transformer name if they want to provide overridable behaviors;
- `registerBehaviorTransformer` to register a transformer to override behaviors.

It also introduces the function `applyBehaviorTransformer` which can be imported from `discourse/lib/transformer`. This is used to mark a callback containing the desired behavior as overridable and applies the transformer logic.

How does it work?

## Marking a behavior as overridable:
 
To mark a behavior as overridable, in Discourse core, first the transformer name must be added to `app/assets/javascripts/discourse/app/lib/transformer/registry.js`. For plugins and theme-components, use the plugin API `addBehaviorTransformerName` instead.

Then, in your component or class, use the function `applyBehaviorTransformer` to mark the Behavior as overridable and handle the logic:

- example:

```js
  ...
  @action
  loadMore() {
    applyBehaviorTransformer(
      "discovery-topic-list-load-more",
      () => {
        this.documentTitle.updateContextCount(0);
        return this.model
          .loadMore()
          .then(({ moreTopicsUrl, newTopics } = {}) => {
            if (
              newTopics &&
              newTopics.length &&
              this.bulkSelectHelper?.bulkSelectEnabled
            ) {
              this.bulkSelectHelper.addTopics(newTopics);
            }
            if (moreTopicsUrl && $(window).height() >= $(document).height()) {
              this.send("loadMore");
            }
          });
      },
      { model: this.model }
    );
  },
  ...	
```

## Overriding a behavior in plugins or themes

To override a behavior in plugins, themes, or TCs use the plugin API `registerBehaviorTransformer`:

- Example:

```js
withPluginApi("1.35.0", (api) => {
  api.registerBehaviorTransformer("example-transformer", ({ context, next }) => {
    console.log('we can introduce new behavior here instead', context);

    next(); // call next to execute the expected behavior
  });
});
```
2024-07-31 16:39:22 -03:00
David Taylor
5388f0a48f
DEV: Convert components/admin-user-field-item to native class (#28174)
This was the last classic class in the `admin/` section 🎉
2024-07-31 19:06:59 +01:00
David Taylor
fa6dbbed1b
DEV: controllers/admin-site-text-edit to native class syntax (#28173) 2024-07-31 17:37:24 +01:00
David Taylor
d4479eab73
DEV: Remove object-property-decorators from admin mixins (#28172)
Ember's legacy mixin system does not support native-class syntax, so we have to use the non-decorator syntaxes for `action()` and `computed()`.

Eventually, we will need to refactor things to remove these mixins... but today is not that day.
2024-07-31 17:37:15 +01:00
Joffrey JAFFEUX
9383143bc6
FIX: system badges can be disabled (#28169)
A previous commit mistakenly assumed system badges couldn't be disabled.
2024-07-31 15:28:59 +02:00
carson chang
46b296527b
DEV: Add user-stream-item-above and bookmark-list-before-link plugin outlets (#28151)
* DEV: Add `user-stream-item-above` and `bookmark-list-before-link` plugin outlets

* Lint
2024-07-30 20:43:51 -07:00
carson chang
fa3f50efd0
UX: Hide/show preview button title attribute fix (#28155) 2024-07-30 20:43:12 -07:00
Natalie Tay
188cb58daa
SECURITY: Fixes for main (#28137)
* SECURITY: Update default allowed iframes list

Change the default iframe url list to all include 3 slashes.

* SECURITY: limit group tag's name length

Limit the size of a group tag's name to 100 characters.

Internal ref - t/130059

* SECURITY: Improve sanitization of SVGs in Onebox

---------

Co-authored-by: Blake Erickson <o.blakeerickson@gmail.com>
Co-authored-by: Régis Hanol <regis@hanol.fr>
Co-authored-by: David Taylor <david@taylorhq.com>
2024-07-30 14:19:01 +08:00
Martin Brennan
2d5f323ca3
DEV: Move config area site setting fetch into new controller (#28136)
Followup 4aea12fdcb

In certain config areas (like About) we want to be able
to fetch specific site settings by name. In this case,
sometimes we need to be able to fetch hidden settings,
in cases where a config area is still experimental.

Splitting out a different endpoint for this purpose
allows us to be stricter with what we return for config
areas without affecting the main site settings UI, revealing
hidden settings before they are ready.
2024-07-30 15:41:28 +10:00
Krzysztof Kotlarek
284aa1da22
FIX: addCommunitySectionLink secondary argument (#28135)
`addCommunitySectionLink` API function accepts secondary argument to determine if the link should be added to the primary or secondary (more) section. There was a bug and all links were mounted in the secondary section.
2024-07-30 14:32:07 +10:00
David Taylor
b44190307f
UX: Avoid header topic-info flicker when using ?page= params (#28117)
In this case, there is no 'nearPost' param in the URL. Instead, the server preloads a post-stream with whichever page of posts is requested. We can check for that situation using `postStream.firstPostPresent`.

Also updates the widget-header version to fetch a value from the service on initial render, instead of relying on the observer triggering.

Followup to bdec564d14
2024-07-29 20:36:23 +01:00
Loïc Guitaut
cfa4f07378 FIX: Don't crash when MF definitions are missing
Currently, if MF definitions are missing (typically because there’s a
compilation error), `I18n.messageFormat` will try to access
`I18n._mfMessages.hasMessage` resulting in a crash that will in turn
crash Ember.

This patch addresses the issue by using the optional chaining operator
making the `I18n.messageFormat` method return a "Missing Key" message.
MF strings won’t be rendered properly, but the site will stay usable.
2024-07-29 18:13:17 +02:00
Ted Johansson
3126c50baa
DEV: Update member access wizard step to use toggle group (#28013)
We want to change the design of the "member experience" step of the wizard from using checkbox switches to using radio toggle groups.
2024-07-29 14:07:06 +08:00
Krzysztof Kotlarek
2a9dcade0a
UX: group admin new features by month (#28106)
Display new features grouped by month and show additional information about the version.
2024-07-29 14:20:12 +10:00
dependabot[bot]
22e8970629
Build(deps-dev): Bump @swc/core from 1.7.0 to 1.7.3 (#28111)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.0 to 1.7.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.7.0...v1.7.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-07-29 10:43:48 +08:00
Jarek Radosz
f14cf4f8a9
DEV: Fix random typos (#28103)
July 2024 edition
2024-07-26 23:13:12 +02:00
Jarek Radosz
e627d24c3b
FIX: Bulk (glimmer) topic selection on mobile (#28100)
`/t/-/134051`
2024-07-26 21:16:19 +02:00
marstall
b55f2a6270
needed () to work (#28099) 2024-07-26 14:00:10 -04:00
chapoi
3e6b5a16a6
UX: restyle main nav on mobile (#28094) 2024-07-26 19:54:09 +02:00
David Taylor
d141adb872
FIX: Adjust swc minify options for Safari 15 support (#28098)
By default, the swc minifier seems to unwrap 'unneeded' IIFE. That means it was undoing the 'bugfix' transformation we have for class fields in Safari 15. Disabling the 'inline' and 'reduce_funcs' options seems to stop this behavior.
2024-07-26 17:46:31 +01:00
dependabot[bot]
56ecbcb8c9
Build(deps-dev): Bump ember-test-selectors from 6.0.0 to 7.0.0 (#28092)
Bumps [ember-test-selectors](https://github.com/mainmatter/ember-test-selectors) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/mainmatter/ember-test-selectors/releases)
- [Changelog](https://github.com/mainmatter/ember-test-selectors/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mainmatter/ember-test-selectors/compare/v6.0.0...v7.0.0)

---
updated-dependencies:
- dependency-name: ember-test-selectors
  dependency-type: direct:development
  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>
2024-07-26 14:49:45 +02:00
carson chang
f169985fce
UX: Fix button syntax in preferences (#28074)
* UX: Fix button syntax in preferences

* linting
2024-07-25 14:46:30 -07:00
Penar Musaraj
5958ad89f2
DEV: Fix flakey user tips test (#28087)
When we show user tips, we immediately send an AJAX request to mark the
tiup as seen. This is done in the background. However, when system tests
are run, sometimes that request is not completed before the test ends.
This causes the test to be flakey.

One way to fix this is to force the system test run to wait for the AJAX
request to complete. However, this is not ideal because it makes the
test suite slower on each run.

Instead, this commit removes the flakey assertion and adds an alternative
assertion in the frontend tests that ensures the background request is
sent when the user tip is shown.
2024-07-25 16:39:30 -04:00
Renato Atilio
75e4b8f330
UX: limit "outputs HTML" watched word option to replacements (#28063)
We were displaying the "outputs HTML" option in all watched word actions, while it's only supposed to be used in the Replace action.
2024-07-25 16:25:56 -03:00
Osama Sayegh
7cc0f26292
DEV: Migrate about config area to Form Kit (#28021)
Form Kit is our new form library/framework for unifying the way forms look across Discourse. The admin config area for the /about page is a new form that isn't currently used, so it makes sense for it to be one of the first forms to be migrated to Form Kit to test the library.

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-07-25 19:07:38 +03:00
Jan Cernik
40bc0bcf98
FIX: Render the bottom topic map only if all posts are loaded (#28078) 2024-07-25 10:48:54 -03:00
Jan Cernik
f7d1b9cf67
UX: Allow adding content inline to the topic map (#28053) 2024-07-25 10:46:52 -03:00
Jarek Radosz
038e5deb2a
DEV: Clean up imports (#28060)
* `@ember/owner` instead of `@ember/application`
* `discourse-i18n` instead of `I18n`
* `{ service } from "@ember/service"` instead of `inject as service`
2024-07-25 15:09:06 +02:00
dependabot[bot]
07ef3b759e
Build(deps-dev): Bump @ember/test-helpers from 3.3.0 to 3.3.1 (#28067)
Bumps [@ember/test-helpers](https://github.com/emberjs/ember-test-helpers) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/emberjs/ember-test-helpers/releases)
- [Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/commits)

---
updated-dependencies:
- dependency-name: "@ember/test-helpers"
  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-07-25 13:23:04 +02:00
David Taylor
5b056b9ab4
PERF: Restore minimization of all JS assets (#28077)
In an attempt to improve build performance, 9db5eafb mistakenly removed minimization for some of our JS assets, leading to a significant increase in the size of some files.

This commit restores minimization to those files. To avoid regressing on the build time improvements, this commit switches to using the `webpack-terser-plugin`'s "swcMinify" option. On an entry-level 1CPU/1GB-ram/2GB-swap DO droplet, this commit increases build time from ~16 minutes to ~18 minutes.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2024-07-25 11:41:20 +01:00
锦心
5b05cdfbd9
FIX: Add post id to the anchor to prevent two identical anchors (#28070)
* FIX: Add post id to the anchor to prevent two identical anchors

We generate anchors for headings in posts. This works fine if there is
only one post in a topic with anchors. The problem comes when you have
two or more posts with the same heading. PrettyText generates anchors
based on the heading text using the raw context of each post, so it is
entirely possible to generate the same anchor for two posts in the same
topic, especially for topics with template replies

    Post1:
    # heading
    context
    Post2:
    # heading
    context

When both posts are on the page at the same time, the anchor will only
work for the first post, according to the [HTML specification](https://html.spec.whatwg.org/multipage/browsing-the-web.html#scroll-to-the-fragment-identifier).

> If there is an a element in the document tree whose root is document
> that has a name attribute whose value is equal to fragment, then
> return the *first* such element in tree order.

This bug is particularly serious in forums with non-Latin languages,
such as Chinese. We do not generate slugs for Chinese, which results in
the heading anchors being completely dependent on their order.

```ruby
[2] pry(main)> PrettyText.cook("# 中文")
=> "<h1><a name=\"h-1\" class=\"anchor\" href=\"#h-1\"></a>中文</h1>"
```

Therefore, the anchors in the two posts must be in exactly the same by
order, causing almost all of the anchors in the second post to be
invalid.

This commit solves this problem by adding the `post_id` to the anchor.
The new anchor generation method will add `p-{post_id}` as a prefix when
post_id is available:

```ruby
[3] pry(main)> PrettyText.cook("# 中文", post_id: 1234)
=> "<h1><a name=\"p-1234-h-1\" class=\"anchor\" href=\"#p-1234-h-1\"></a>中文</h1>"
```

This way we can ensure that each anchor name only appears once on the
same topic. Using post id also prevents the potential possibility of the
same anchor name when splitting/merging topics.
2024-07-25 13:50:30 +08:00
Krzysztof Kotlarek
205a2bf0d6
DEV: show admin moderation flags UI (#28071)
The page was hidden behind a feature flag in this PR https://github.com/discourse/discourse/pull/27756

It is now in a shippable state.
2024-07-25 15:24:17 +10:00
Martin Brennan
31d3984e50
UX: Remove bookmark menu title on mobile (#28069)
We don't show this when editing on desktop,
so no need to show on mobile (also the label
is wrong)
2024-07-25 13:05:02 +10:00
Alan Guo Xiang Tan
c7911441fa
DEV: Add DISCOURSE_WEBPACK_MINIMIZE to reenable webpack minimize. (#28066)
Disabling webpack minimize is a bug we are working to resolve but we
have to consider self-hosters that deploy on low cost hardware
and reenabling this for them drastically increases the build time.
For now, add a  `DISCOURSE_WEBPACK_MINIMIZE` env to allow sites to opt
back in.
2024-07-25 06:55:29 +08:00
Joffrey JAFFEUX
7a7cc815be
DEV: removes legacy modal code (#28047) 2024-07-24 18:07:17 +02:00
Meghna
ff7892a3f8
DEV: update the plugin outlet to be available just after name and badge (#28058) 2024-07-24 10:55:23 -04:00
Joffrey JAFFEUX
0fbce0aa85
DEV: adds a way to set a title/description to a radio (#28049)
Usage:

```
<Form as |form|>
  <form.Field @name="foo" @title="Foo" as |field|>
    <field.RadioGroup as |RadioGroup|>
      <RadioGroup.Radio @value="one" as |radio|>
        <radio.Title>One title</radio.Title>
        <radio.Description>One description</radio.Description>
      </RadioGroup.Radio>
    </field.RadioGroup>
  </form.Field>
</Form>
```
2024-07-24 14:25:34 +02:00
Joffrey JAFFEUX
c393c56e5a
UX: do not show footer nav if not actions (#28059) 2024-07-24 11:16:05 +02:00
Joffrey JAFFEUX
0c13c91f84
DEV: migrates footer-nav from widget to gjs (#28024)
This commit also attempts to promote more declarative patterns. The route history logic has been replaced by using the history-store service.

---------

Co-authored-by: Jarek Radosz <jarek@cvx.dev>
Co-authored-by: David Taylor <david@taylorhq.com>
2024-07-24 07:54:15 +02:00
Martin Brennan
db8c1f20ed
DEV: Convert group SMTP settings form to FormKit (#27965)
This commit changes the group SMTP settings form (at
`/g/:name/manage/email`) to use
FormKit, our magical new form component system  

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-07-24 09:52:52 +10:00
David Taylor
c333e9d6e6
FIX: Improve topic/header integration when navigating away (#28040)
- Ensure main title is set as 'not visible' when removed from DOM

- `deactivate` -> `willTransition` to ensure proper behavior when navigating between multiple topics

Followup to bdec564d14
2024-07-23 14:57:15 +01:00
dependabot[bot]
424a67778e
Build(deps-dev): Bump @floating-ui/dom from 1.6.7 to 1.6.8 (#28027)
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.7 to 1.6.8.
- [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.8/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-07-23 14:21:57 +02:00
dependabot[bot]
989dec421d
Build(deps): Bump ace-builds from 1.35.3 to 1.35.4 (#28029)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.35.3 to 1.35.4.
- [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.35.3...v1.35.4)

---
updated-dependencies:
- dependency-name: ace-builds
  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-07-23 14:21:11 +02:00
David Taylor
bdec564d14
DEV: Refactor header topic-info handling (#27989)
- Move topic-title on-screen detection to intersection-observer (via new modifier), and add a boolean to header service which indicates whether it's on-screen

- Move scroll-direction from Mixin to dedicated service. Teach it to pause scroll monitoring while transitions are in progress, to avoid reporting false changes in scroll direction. Also resets to a 'neutral' state after each navigation, which indicates the the user has not yet scrolled

- When entering a topic view, notify the header service which post is being targeted. It can then make an educated guess about whether the topic title is likely to be in-view

- Update header service `topicInfoVisible` to be a declarative getter, based on the three refactored sources of truth mentioned above

- Update legacy widget header to use the header service for topic info

All of these changes mean that the header no longer 'flickers' when navigating into topics on mobile. As well as the improved UX, this should also improve our Cumulative Layout Shift (CLS) web vital metrics.
2024-07-23 10:24:44 +01:00
Martin Brennan
129eb4ba59
FIX: Missing model return in admin-backups route (#28035)
Followup dd30463276

We missed the explicit `return` when we changed to
async/await, so the model ends up being null on admin
backups.

This means we also have no tests for the backup UI, that
will be fixed in a subsequent PR.
2024-07-23 16:24:29 +10:00
Jan Cernik
a4692609e4
FIX: Ensure topic steam is loaded before rendering the map (#28031) 2024-07-23 01:16:58 -03:00
Martin Brennan
0b413e2aa1
FEATURE: Use new topic bulk actions menu for all sites (#28003)
This commit promotes the new topic bulk action
menu introduced in 89883b2f51
to the main method of bulk selecting and performing
actions on topics. The site setting flag gating this
feature is deleted, and the old bulk select code is
deleted as well.

The new modal shows a loading spinner while operations
are taking place, allows selecting the action from a dropdown
instead of having a 2-step modal flow,
and also supports additional options for some operations, e.g.
allowing Close silently.
2024-07-23 11:39:27 +10:00
Jan Cernik
a027ec4663
UX: Merge the simplified topic map (#27964)
Replaces the existing topic map with the experimental-topic-map made by @awesomerobot.

---------

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2024-07-22 19:42:29 -03:00
Osama Sayegh
6039b513fe
DEV: Initial parts for a redesigned /about page (#27996)
This commit introduces the foundation for a new design for the /about page that we're currently working on.  The current version will remain available and still be the default until we finish the new version and are ready to roll out. To opt into the new version right now, add one or more group to the `experimental_redesigned_about_page_groups` site setting and members in those groups will get the new version.

Internal topic: t/128545.
2024-07-23 01:35:18 +03:00
Sérgio Saquetim
8ef69f4c56
DEV: Added enter hints for the quick search and sidebar filter (#28022) 2024-07-22 15:33:50 -03:00
David Taylor
a267c0727d
Revert "DEV: Defer button actions with layout change to the next frame paint (#27967)" (#28020)
This is causing issues with some buttons on iOS. Reverting while we investigate.

This reverts commit 352d6f9dfb.
2024-07-22 17:35:23 +01:00
carson chang
747fe63db3
UX: Remove automatic composer prompt when draft exists (#28017) 2024-07-22 09:16:37 -07:00
dependabot[bot]
53ae390835
Build(deps-dev): Bump qunit from 2.21.0 to 2.21.1 (#27998)
Bumps [qunit](https://github.com/qunitjs/qunit) from 2.21.0 to 2.21.1.
- [Release notes](https://github.com/qunitjs/qunit/releases)
- [Changelog](https://github.com/qunitjs/qunit/blob/main/History.md)
- [Commits](https://github.com/qunitjs/qunit/compare/2.21.0...2.21.1)

---
updated-dependencies:
- dependency-name: qunit
  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-07-22 16:34:44 +02:00
dependabot[bot]
04253177b0
Build(deps-dev): Bump @embroider/compat in the embroider group (#27979)
Bumps the embroider group with 1 update: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat).


Updates `@embroider/compat` from 3.5.7 to 3.6.0
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 14:12:27 +01:00
锦心
0eeebeb6b1
DEV: add @submit hook for ace editor (#28010)
* DEV: add @commit hook for ace editor

Add @commit hook to AceEditor to handle "save and run" in Data Explorer
2024-07-22 15:53:30 +08:00
Ted Johansson
23d7800ff1
DEV: Redirect to actionable page if routing is restricted (#28002)
If a user has a required action, e.g. adding a 2FA method or filling in new required fields, we disable client-side routing except to allowed pages.

This led to a situation where a user might navigate away from e.g. the profile page to look at the new ToS, and then being "stuck" due to not knowing how to get back to accept the new terms.

This PR makes it so that if you click any restricted link, instead of doing nothing we transition the user back to the page where they can take the required action.
2024-07-22 12:24:05 +08:00
Natalie Tay
352d6f9dfb
DEV: Defer button actions with layout change to the next frame paint (#27967)
User actions can trigger functions that render changes to the screen within the same cycle (e.g. pressing the reply button will cause the login modal to pop up), potentially impacting performance and causing some jank on slower devices.

This change inserts runAfterFramePaint where certain actions are triggered. Below are some screenshots indicating an improved INP for some of the buttons affected on controls with the highest INPs. The two places where this is added help with several actions, e.g. user + group cards, generic button action usage.
2024-07-22 10:59:39 +08:00
dependabot[bot]
d13dab5b68
Build(deps): Bump ace-builds from 1.35.2 to 1.35.3 (#27980)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.35.2 to 1.35.3.
- [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.35.2...v1.35.3)

---
updated-dependencies:
- dependency-name: ace-builds
  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-07-19 16:42:30 +01:00
Natalie Tay
ad04720dc6
DEV: Forward the actual event into the header (#27987) 2024-07-19 23:37:11 +08:00
Joffrey JAFFEUX
b10b485572
DEV: adds an integer validation rule to form-kit (#27985)
Usage:

```
@validation="integer"
```

This commit also adds a default for rules. By default a rule will now be `ruleName: {}`, this avoids all the boilerplate in validation-parser.js.
2024-07-19 12:39:26 +02:00
Ella E.
803877748d
UX: Fix page content overflow when the setting category list is expanded on mobile (#27983) 2024-07-18 17:52:15 -06:00
Neil Lalonde
d54e47f373
DEV: add plugin outlets to the admin plugins list (#27974) 2024-07-18 16:12:51 -04:00
Sérgio Saquetim
e1f638b0a3
DEV: Prevent error filtering the sidebar items when the section text is empty (#27957) 2024-07-18 13:17:13 -03:00
Kris
1bba54c3da
A11Y: attempt to refocus modal trigger on modal close (#27972) 2024-07-18 11:55:28 -04:00
David Taylor
445951e854
DEV: Ensure plugin outlet parentView deprecation cannot be avoided (#27973)
We'd implemented the deprecation by overriding `get parentView`, and storing the real value on `_parentView`. Unfortunately that meant people could access `_parentView` directly, thereby bypassing the deprecation message.

This commit moves the internal storage to a private field, which cannot be accessed from outside the class. A deprecated getter for `_parentView` is introduced to avoid immediate breakage for any code using this workaround.
2024-07-18 16:48:46 +01:00
Ella E.
79e0aa6a64
UX: fix dashboard nav overflow (#27963) 2024-07-18 09:39:59 -06:00
Kris
9719aa0e2d
DEV: follow-up to avoid using schedule when opening modal from dropdown (#27970) 2024-07-18 10:33:06 -04:00
Kris
6344e3f937
FIX: avoid updating hamburgerVisible in the same computation (#27956) 2024-07-18 08:39:17 -04:00
Joffrey JAFFEUX
4c8812737c
DEV: supports setProperties (#27969)
This is a convenience for when you have multiple properties to set in form kit.

```
// before
set("foo", 1);
set("bar", 2);

//after
setProperties({foo: 1, bar: 2});
```
2024-07-18 14:33:08 +02:00
Joffrey JAFFEUX
1aa24f83bb
DEV: form-kit improvements (#27966)
- correctly support @title on fields
- correctly support @subtitle on fields
- improves error message when a field name is incorrect in assertions
2024-07-18 10:30:18 +02:00
Martin Brennan
48d13cb231
UX: Use a dropdown for SSL mode for group SMTP (#27932)
Our old group SMTP SSL option was a checkbox,
but this was not ideal because there are actually
3 different ways SSL can be used when sending
SMTP:

* None
* SSL/TLS
* STARTTLS

We got around this before with specific overrides
for Gmail, but it's not flexible enough and now people
want to use other providers. It's best to be clear,
though it is a technical detail. We provide a way
to test the SMTP settings before saving them so there
should be little chance of messing this up.

This commit also converts GroupEmailSettings to a glimmer
component.
2024-07-18 10:33:14 +10:00
Krzysztof Kotlarek
c975c7fe1b
FEATURE: custom flag can require additional message (#27908)
Allow admin to create custom flag which requires an additional message.

I decided to rename the old `custom_flag` into `require_message` as it is more descriptive.
2024-07-18 10:10:22 +10:00
Isaac Janzen
f4b87c744b
DEV: Add after-breadcrumbs plugin outlet (#27954) 2024-07-17 13:30:46 -05:00
Joffrey JAFFEUX
b6b0d68576
DEV: various form-kit tweaks (#27950)
- removes unused css code
- improves password control sizing
- adds more spacing between collection items
- correct a typo in collection class

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2024-07-17 20:18:19 +02:00
dependabot[bot]
df6b41464f
Build(deps-dev): Bump @embroider/compat in the embroider group (#27942)
Bumps the embroider group with 1 update: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat).


Updates `@embroider/compat` from 3.5.6 to 3.5.7
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-17 11:46:11 +01:00
dependabot[bot]
2c1719a396
Build(deps): Bump terser from 5.31.2 to 5.31.3 (#27944)
Bumps [terser](https://github.com/terser/terser) from 5.31.2 to 5.31.3.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.31.2...v5.31.3)

---
updated-dependencies:
- dependency-name: terser
  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-07-17 11:42:10 +01:00
dependabot[bot]
edcd686597
Build(deps): Bump the babel group across 1 directory with 2 updates (#27943)
Bumps the babel group with 2 updates in the / directory: [@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.24.7 to 7.24.9
- [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.24.9/packages/babel-core)

Updates `@babel/standalone` from 7.24.7 to 7.24.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.24.10/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  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>
2024-07-17 11:41:52 +01:00
chapoi
2ca06ba236
DEV: form-kit
This PR introduces FormKit, a component-based form library designed to simplify form creation and management. This library provides a single `Form` component, various field components, controls, validation mechanisms, and customization options. Additionally, it includes helpers to facilitate testing and writing specifications for forms.

1. **Form Component**:
   - The main component that encapsulates form logic and structure.
   - Yields various utilities like `Field`, `Submit`, `Alert`, etc.

   **Example Usage**:
   ```gjs
   import Form from "discourse/form";

   <template>
     <Form as |form|>
       <form.Field
         @name="username"
         @title="Username"
         @validation="required"
         as |field|
       >
         <field.Input />
       </form.Field>

       <form.Field @name="age" @title="Age" as |field|>
         <field.Input @type="number" />
       </form.Field>

       <form.Submit />
     </Form>
   </template>
   ```

2. **Validation**:
   - Built-in validation rules such as `required`, `number`, `length`, and `url`.
   - Custom validation callbacks for more complex validation logic.

   **Example Usage**:
   ```javascript
   validateUsername(name, value, data, { addError }) {
     if (data.bar / 2 === value) {
       addError(name, "That's not how maths work.");
     }
   }
   ```

   ```hbs
   <form.Field @name="username" @validate={{this.validateUsername}} />
   ```

3. **Customization**:
   - Plugin outlets for extending form functionality.
   - Styling capabilities through propagated attributes.
   - Custom controls with properties provided by `form` and `field`.

   **Example Usage**:
   ```hbs
   <Form class="my-form" as |form|>
     <form.Field class="my-field" as |field|>
       <MyCustomControl id={{field.id}} @onChange={{field.set}} />
     </form.Field>
   </Form>
   ```

4. **Helpers for Testing**:
   - Test assertions for form and field validation.

   **Example usage**:
   ```javascript
   assert.form().hasErrors("the form shows errors");
   assert.form().field("foo").hasValue("bar", "user has set the value");
   ```

   - Helper for interacting with he form

   **Example usage**:
   ```javascript
   await formKit().field("foo").fillIn("bar");
   ```

5. **Page Object for System Specs**:
   - Page objects for interacting with forms in system specs.
   - Methods for submitting forms, checking alerts, and interacting with fields.

   **Example Usage**:
   ```ruby
   form = PageObjects::Components::FormKit.new(".my-form")
   form.submit
   expect(form).to have_an_alert("message")
   ```

   **Field Interactions**:
   ```ruby
   field = form.field("foo")
   expect(field).to have_value("bar")
   field.fill_in("bar")
   ```


6. **Collections handling**:
   - A specific component to handle array of objects

   **Example Usage**:
   ```gjs
    <Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
      <form.Collection @name="foo" as |collection|>
        <collection.Field @name="bar" @title="Bar" as |field|>
          <field.Input />
        </collection.Field>
      </form.Collection>
    </Form>
   ```
2024-07-17 11:59:35 +02:00
Sérgio Saquetim
7d729603b4
DEV: Improve args deprecation on plugin outlets (#27885) 2024-07-16 14:29:39 -03:00
Kris
d4ade75583
A11Y: remove heading tags from usercards (#27926) 2024-07-16 12:32:53 -04:00
Kris
0d4492c7b7
A11Y: Close header dropdown menus on focusout (#27901)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-07-16 09:11:26 -04:00
David Taylor
0b7099f34e
FIX: 2fa check error for anon users (#27924) 2024-07-15 14:19:04 +01:00
锦心
4d64205eef
DEV: Add slug parameter to hashtag-decorator (#27917)
In order to facilitate discourse-tag-icons and discourse-category-icons to render icons for post content, we need to provide an additional slug parameter here
2024-07-15 17:22:02 +08:00
Kelv
1d277ba96e
DEV: add discourse prefix to deprecation ids to differentiate from ember deprecations (#27910) 2024-07-15 15:10:04 +08:00
Kelv
98cbfd598c
DEV: add deprecation ids for base-url, fa-icon and chat service (#27911) 2024-07-15 14:29:17 +08:00
Martin Brennan
97e2b353f6
FEATURE: Allow for multiple GitHub onebox tokens (#27887)
Followup 560e8aff75

GitHub auth tokens cannot be made with permissions to
access multiple organisations. This is quite limiting.
This commit changes the site setting to be a "secret list"
type, which allows for a key/value mapping where the value
is treated like a password in the UI.

Now when a GitHub URL is requested for oneboxing, the
org name from the URL is used to determine which token
to use for the request.

Just in case anyone used the old site setting already,
there is a migration to create a `default` entry
with that token in the new list setting, and for
a period of time we will consider that token valid to
use for all GitHub oneboxes as well.
2024-07-15 13:07:36 +10:00
Krzysztof Kotlarek
9e4e591d60
Revert "FEATURE: custom flag can require additional message (#27706)" (#27906)
This reverts commit c0bcd979e3.
2024-07-15 09:45:57 +10:00
Krzysztof Kotlarek
c0bcd979e3
FEATURE: custom flag can require additional message (#27706)
Allow admin to create custom flag which requires an additional message.

I decided to rename the old `custom_flag` into `require_message` as it is more descriptive.
2024-07-15 08:48:01 +10:00
锦心
63ca30ccb4
FIX: Don't let table-build automatically fill empty headers with default values (#27894)
* FIX: Don't let table-build automatically fill empty headers with default values

The old table builder would fill empty headers with default values A~Z when editing.
This commit makes table-builder respect the old empty headers

related meta topic: https://meta.discourse.org/t/editing-a-table-with-empty-headers-fills-them-in-with-the-default-text-column-a-column-b/268472
2024-07-13 00:41:18 +08:00
David Taylor
271cbcefa9
DEV: Improve safari-class-fields-bugfix transform (#27890)
This tightens things up to reduce the number of initializers which need to be wrapped in an IIFE.

Mirrors the changes made in https://github.com/babel/babel/pull/16569
2024-07-12 17:00:04 +01:00
David Taylor
a2463313a8
DEV: Ensure implicit injections shim is run early (#27829)
This needs to run before any component files are `import`'d. In traditional resolver-based tests, this was working previously because component files would only be loaded 'at runtime'. However, in gjs-based tests (e.g. those introduced in the formkit PR), component files are imported before the application is booted.
2024-07-12 12:08:09 +01:00
David Taylor
895e9a5893
DEV: Revert sass upgrade (#27891)
This reverts commit d05f8285e7 and 727acfee6a. This bump introduced a new deprecation message which is very noisy for us. We'll resolve it before merging again.
2024-07-12 12:07:13 +01:00
Martin Brennan
a0283305ca
FIX: Integer settings wrongly showing overridden from default (#27886)
Followup db993cf8fd

Since in the above commit we converted integer site settings
to actual integers then set that as the new `buffered.value`,
the overridden indicator technically thinks the value has changed,
even if the user sets it back to the default:

```
overridden: propertyNotEqual("setting.default", "buffered.value"),
```

We can fix this by converting the parsed integer back to a string
before setting the buffered setting value.
2024-07-12 12:03:02 +10:00
dependabot[bot]
727acfee6a
Build(deps-dev): Bump sass from 1.77.7 to 1.77.8 (#27881)
Bumps [sass](https://github.com/sass/dart-sass) from 1.77.7 to 1.77.8.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.77.7...1.77.8)

---
updated-dependencies:
- dependency-name: sass
  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-07-12 01:35:43 +02:00
dependabot[bot]
a803ac27e7
Build(deps-dev): Bump webpack from 5.92.1 to 5.93.0 (#27882)
Bumps [webpack](https://github.com/webpack/webpack) from 5.92.1 to 5.93.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.92.1...v5.93.0)

---
updated-dependencies:
- dependency-name: webpack
  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-07-12 01:30:31 +02:00
Sérgio Saquetim
c973dcc411
DEV: Disambiguate how the topic info is handled in the header service (#27810) 2024-07-11 20:18:02 -03:00
carson chang
88c2b1c01b
UX: Wrap text in span (#27853) 2024-07-11 10:40:47 -07:00
Joffrey JAFFEUX
654a42171a
DEV: migrates themes-list-item to gjs (#27870) 2024-07-11 14:36:50 +02:00
Joffrey JAFFEUX
797f659eed
DEV: removes unused text-overflow (#27865) 2024-07-11 13:45:16 +02:00
Joffrey JAFFEUX
5cdd6d7c37
DEV: migrates username-preference to gjs (#27864) 2024-07-11 13:28:49 +02:00
Joffrey JAFFEUX
015a38d014
DEV: migrates reviewable-claimed-topic to gjs (#27863) 2024-07-11 11:56:13 +02:00
Joffrey JAFFEUX
48f36e52a4
DEV: migrates user-badge to gjs (#27866)
Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2024-07-11 11:55:42 +02:00
Joffrey JAFFEUX
b024e32e74
DEV: removes unused modal-tab (#27869) 2024-07-11 11:55:25 +02:00
Joffrey JAFFEUX
0614279b9d
DEV: migrates user-stat to gjs (#27867) 2024-07-11 11:55:20 +02:00
Joffrey JAFFEUX
6547f78ff8
DEV: migrates reviewable-created-by to gjs (#27862) 2024-07-11 11:54:35 +02:00
Joffrey JAFFEUX
38f80be810
DEV: migrates reviewable-created-by-name to gjs (#27861) 2024-07-11 11:54:17 +02:00
Joffrey JAFFEUX
7b91aff46f
DEV: migrates related-messages to gjs (#27860) 2024-07-11 11:53:55 +02:00
Joffrey JAFFEUX
da1a049144
DEV: migrates pwa-install-banner to gjs (#27859) 2024-07-11 11:53:39 +02:00
Joffrey JAFFEUX
478b096286
DEV: migrates private-message-glyph to gjs (#27858) 2024-07-11 11:53:24 +02:00
Joffrey JAFFEUX
d5dd5bfb55
DEV: migrates empty-state to gjs (#27857)
Technically there was a wrapping div here, but that shouldn't be necessary.
2024-07-11 11:53:05 +02:00
Joffrey JAFFEUX
11713518ef
DEV: removes unused disabled-icon (#27856) 2024-07-11 11:52:52 +02:00
David Taylor
374279b93e
DEV: Cleanup ace-editor event listeners (#27844)
- set in constructor so they're guaranteed to be present, even if async-import hasn't finished yet
- ensure they're all cleaned up properly
- combine two cleanup methods into one
2024-07-11 10:14:01 +01:00
carson chang
9bb288604d
UX: Remove PluginOutlet spans (#27845) 2024-07-10 20:49:29 -07:00
锦心
8d6a2aad18
UX: Add missing title to notifications-button (#27837)
This commit adds the missing title for notifications-button. In the past, it was automatically fallbacked to the button's key.

Related meta topic: https://meta.discourse.org/t/tracking-toggle-text-on-hover-sometimes-not-translated/315727
2024-07-11 08:37:53 +08:00
dependabot[bot]
8c5553448a
Build(deps): Bump terser from 5.31.1 to 5.31.2 (#27852)
Bumps [terser](https://github.com/terser/terser) from 5.31.1 to 5.31.2.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.31.1...v5.31.2)

---
updated-dependencies:
- dependency-name: terser
  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-07-11 00:56:45 +02:00
Kris
39187d9814
A11Y: improve notification panel layout for high zoom levels (#27848) 2024-07-10 15:50:34 -04:00
Kris
5b73322c41
A11Y: improve topic entrance aria-label, title (#27842)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-07-10 14:15:14 -04:00
Kris
0e3ed7ea2a
A11Y: improve topic list table markup for screenreaders (#27808)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-07-10 13:14:36 -04:00
chapoi
aedff155bd
UX: user page copy change responses -> replies (#27841) 2024-07-10 18:30:14 +02:00
Kris
0ac1a43fef
A11Y: aria-current="page" is more appropriate for navigation bar links (#27835) 2024-07-10 12:24:51 -04:00
Jarek Radosz
8fa61410aa
DEV: Add missing outlet args to glimmer topic list components (#27838) 2024-07-10 17:10:19 +02:00
Jarek Radosz
318dad23c4
DEV: Remove extra whitespace from render-glimmer-container (#27839) 2024-07-10 17:04:18 +02:00
Joffrey JAFFEUX
89bcf955c0
DEV: migrates groups-info to gjs (#27832)
Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2024-07-10 16:14:04 +02:00