Commit Graph

22899 Commits

Author SHA1 Message Date
dependabot[bot]
49aac85057
Build(deps): Bump ember-resolver from 11.0.1 to 12.0.0 (#27390)
Bumps [ember-resolver](https://github.com/ember-cli/ember-resolver) from 11.0.1 to 12.0.0.
- [Release notes](https://github.com/ember-cli/ember-resolver/releases)
- [Changelog](https://github.com/ember-cli/ember-resolver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-resolver/compare/v11.0.1...v12.0.0)

---
updated-dependencies:
- dependency-name: ember-resolver
  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-06-10 14:24:46 +02:00
Guhyoun Nam
c13f64d35b
FEATURE: Add Filter for Webhook Events by Status (#27332)
* FEATURE: Add Filter for Webhook Events by Status

* Fixing multiple issues

* Lint

* Fixing multiple issues

* Change the range of the status for webhook events
2024-06-07 10:26:00 -05:00
dependabot[bot]
066fa8e216
Build(deps-dev): Bump ember-cli from 5.8.1 to 5.9.0 (#27376)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 5.8.1 to 5.9.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.8.1...v5.9.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-06-07 15:21:12 +02:00
dependabot[bot]
476d5febeb
Build(deps): Bump terser from 5.31.0 to 5.31.1 (#27377)
Bumps [terser](https://github.com/terser/terser) from 5.31.0 to 5.31.1.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.31.0...v5.31.1)

---
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-06-07 15:18:58 +02:00
Martin Brennan
aef3f17b56
DEV: A different approach to breadcrumbs (#27365)
Really fully authored by Jarek, I only made the PR :)

The `DBreadcrumbItem` and `DBreadcrumbContainer` components
introduced in 1239178f49 have
some limitations, mainly that the container has no awareness of
its items, so nothing that requires positional knowledge can
be used. This is needed to use `aria-current` on the last breadcrumb
item, see https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/examples/breadcrumb/.

We change `DBreadcrumbItem` to always be a link, removing
the need for `LinkTo`. Then, we introduce a service to keep
track of containers and items (since all items are rendered into
all containers) and make the item itself responsible for registering
to the service, and introduce the needed `aria-current` behaviour.

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-06-07 11:31:46 +10:00
Martin Brennan
36dbf06fe9
FEATURE: Use new topic bulk actions dropdown on search page (#27303)
We want to get rid of the old topic bulk actions modal
and use the new dropdown (currently gated behind
experimental_topic_bulk_actions_enabled_groups). To do
this we need to use the new dropdown in all places in the
UI.

This commit changes the full page search UI to use the new
topic bulk actions dropdown if experimental_topic_bulk_actions_enabled_groups
is enabled, and makes some minor refactors to make this work.
Also add a spec for both the old and new functionality.
2024-06-07 10:41:42 +10:00
Kris
0739431cc0
UX: create space for new topics banner on new, unread (#27374) 2024-06-06 18:04:27 -04:00
Isaac Janzen
69193c4bd5
DEV: Add a callback to the validation of user custom fields in the signup form (#27369)
# Description

Add `addCustomUserFieldValidationCallback` to the user fields validation mixin. This allows you to add a custom validation when checking the validity of custom user field values in the signup form on submit. 

```js
addCustomUserFieldValidationCallback((userField) => {
  if (userField.field.name === "my custom user field" && userField.value === "foo") {
    return EmberObject.create({
      failed: true,
      reason: I18n.t("value_can_not_be_foo"),
      element: userField.field.element,
    });
  }
});
```

In the case your custom validation deems an input value `failed`, you return an EmberObject with the fields `failed: true`, `reason`, and `element`.

```js
return EmberObject.create({
  failed: true,
  reason: I18n.t("value_can_not_be_foo"),
  element: userField.field.element,
});
```

which will then display your custom `reason` to the user attached to the given user custom field input and will not submit the signup form.

<img width="288" alt="Screenshot 2024-06-06 at 11 08 40 AM" src="https://github.com/discourse/discourse/assets/50783505/11168fb8-8806-43f0-9417-73991bbd1178">

# Other

- Add `addCustomUserFieldValidationCallback` to the plugin api
- Bump plugin api version
- Update plugin api changelog
- Add tests
2024-06-06 11:17:06 -06:00
Kris
dbd16776fa
UX: improve topic timeline date titles (#27351) 2024-06-06 11:27:12 -04:00
Jarek Radosz
46ab4f0c4a
DEV: Implement DeferredTrackedSet (#27372)
For cases where you'd be using a TrackedSet to render something and then modifying that set throughout the same render cycle. (specifically it will be used in #27365)
2024-06-06 15:59:20 +02:00
Osama Sayegh
ffec8163b0
DEV: Initial UI for admin config area for /about (#27340)
This commit introduces the initial UI for the admin config area for the /about page. The UI isn't wired and doesn't do anything yet, but we're going to iterate on it in future commits.

Internal topic: t/128544.
2024-06-06 16:07:08 +03:00
Alan Guo Xiang Tan
952f69ce60
FIX: User can't reset password with backup codes when only security key is enabled (#27368)
This commit fixes a problem where the user will not be able to reset
their password when they only have security keys and backup codes
configured.

This commit also makes the following changes/fixes:

1. Splits password reset system tests to
   `spec/system/forgot_password_spec.rb` instead of missing the system
   tests in `spec/system/login_spec.rb` which is mainly used to test
   the login flow.

2. Fixes a UX issue where the `Use backup codes` or `Use authenticator
   app` text is shown on the reset password form when the user does
   not have either backup codes or an authenticator app configured.
2024-06-06 14:30:42 +08:00
dependabot[bot]
4a1048f541
Build(deps): Bump the babel group with 2 updates (#27361)
Bumps the babel group with 2 updates: [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) and [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/core` from 7.24.6 to 7.24.7
- [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.7/packages/babel-core)

Updates `@babel/standalone` from 7.24.6 to 7.24.7
- [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.7/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-06-06 01:46:03 +02:00
Jan Cernik
343430fe77
FIX: password reset with security key (#27358)
This regressed in 0434112.

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2024-06-05 20:26:22 -03:00
Joffrey JAFFEUX
729063e485
FIX: ensures invalid OTP blocks submit (#27352) 2024-06-05 14:45:16 -04:00
Jarek Radosz
fb812a48ab
DEV: Fix invalid hbs syntax in tests (#27348)
Followup to 26198fb328

also removes superfluous whitespace
2024-06-05 14:08:15 +02:00
Jarek Radosz
26198fb328
DEV: Fix incorrect hbs syntax in tests (#27345) 2024-06-05 13:28:22 +02:00
Martin Brennan
748240ce3b
FIX: Pluralisation for short password count (#27342)
Followup 0434112aa7,
when I introduced the pluralisation for the
password.too_short message I didn't change the
key name to `count`, which is necessary.
2024-06-05 16:20:48 +10:00
Martin Brennan
0434112aa7
UX: Streamline reset password page (#27341)
This commit includes various UX improvements to the reset
password page:

* Introduce a `hide-application-header-buttons` helper to do the following:
  * Hide Sign Up and Log In buttons, they are not necessary on this flow
  * Hide the sidebar, it is a distraction on this flow
* Improve messaging when a 2FA confirmation is required first
* Improve display of server-side ActiveRecord model validation errors
  in password form, e.g. instead of "is the same as your current password"
  we do "The password is the same as your current password"
* Move password tip to next line below input and move caps lock hint
  inline with Show/Hide password toggle
* Add system specs for 2FA flow on reset password page
* Fixes a computed property conflict issue on the password reset
   page when toggling 2FA methods
2024-06-05 15:22:59 +10:00
Krzysztof Kotlarek
aa88b07640
FEATURE: the ability to change the order of flags (#27269)
Continued work on moderate flags UI.
In this PR admins are allowed to change the order of flags. The notify user flag is always on top but all other flags can be moved.
2024-06-05 13:27:06 +10:00
Krzysztof Kotlarek
c1ecbb8d28
UX: move users link to the top of the admin sidebar (#27339)
Before, users link was in the community section.
2024-06-05 12:49:46 +10:00
Kris
9404459188
UX: prevent twitter like/retweet counts from wrapping (#27333) 2024-06-04 16:55:50 -04:00
Kris
a4001548d8
UX: fix only-emoji size in user-stream excerpts (#27330) 2024-06-04 14:59:43 -04:00
Jarek Radosz
e57fe1e994
DEV: Remove uses of @on from native classes (#27327)
Fixes a deprecation warning introduced in a64f021f49 and removes all uses of `@on` in native classes. (those are unnecessary)
2024-06-04 20:16:05 +02:00
Jarek Radosz
bbdf14828b
DEV: Check lifecycle props in Presence service (#27328)
This may or may not fix flakes in `Unit | Service | presence` tests
2024-06-04 20:15:27 +02:00
Kris
4236aa0851
UX: add space between revision avatar and username (#27329) 2024-06-04 12:48:16 -04:00
Kris
14f81490ec
UX: fix mobile read state alignment (#27323) 2024-06-04 09:40:41 -04:00
Jarek Radosz
c972a31819
DEV: Fix typos and formatting (#27320) 2024-06-04 15:16:24 +02:00
David Taylor
0ddad8fc64
Revert "DEV: Update action syntax for routes/application.js (#27282)" (#27318)
This reverts commit 0b10e335ae.

I realised that some of these actions are overridden in themes/plugins, so this is going to cause problems (especially because modifyClass doesn't currently work well with the `@action` decorator)
2024-06-04 13:44:19 +01:00
David Taylor
0b10e335ae
DEV: Update action syntax for routes/application.js (#27282) 2024-06-04 13:38:24 +01:00
David Taylor
d02e40e989
DEV: Update action syntax for routes/discourse.js (#27283) 2024-06-04 13:37:18 +01:00
David Taylor
aa37be3323
UX: Use regular reset-password flow for expired passwords (#27316)
This makes it more obvious what's happening, and makes it much less likely that users will send repeated reset emails (and thereby hit the rate limit)

Followup to e97ef7e9af
2024-06-04 12:47:33 +01:00
Kris
30f55cd64b
UX: improve search result consistency (#27289) 2024-06-04 15:34:21 +10:00
Krzysztof Kotlarek
eebf332025
FEATURE: expand the admin sidebar when filtering (#27312)
Even when the admin sidebar sections are collapsed, they should expand while filtering. When the filter is removed, sections should go back to the previous state.

In addition, trim whitespace from the filter section.
2024-06-04 12:23:21 +10:00
David Taylor
a64f021f49
DEV: Convert user-posts-stream to native class syntax (#27278)
This is the final model in Discourse core to be converted
2024-06-03 15:03:50 +01:00
Jarek Radosz
adeda6c6a5
FIX: Restore cmd+click ability in topic-info (#27305) 2024-06-03 16:01:20 +02:00
David Taylor
29b826c8f7
DEV: Convert DiscourseURL to native class syntax (#27284) 2024-06-03 14:59:05 +01:00
David Taylor
a3d0a9edbb
DEV: Convert almost all routes to native class syntax (#27281)
Only remaining ones are `routes/discourse.js` and `routes/application.js`. Those two both contain legacy `actions: {}` hashes which need to be updated before being converted to native class syntax.
2024-06-03 14:58:53 +01:00
Osama Sayegh
fed9055818
DEV: Remove admin-revamp and introduce foundations for admin config (#27293)
This commit removes the `/admin-revamp` routes which were introduced as a part of an experiment to revamp the admin pages. We still want to improve the admin/staff experience, but we're going to do them within the existing `/admin` routes instead of introducing a completely new route.

Our initial efforts to improve the Discourse admin experience is this commit which introduces the foundation for a new subroute `/admin/config` which will house various new pages for configuring Discourse. The first new page (or "config area") will be `/admin/config/about` that will house all the settings and controls for configuring the `/about` page of Discourse.

Internal topic: t/128544
2024-06-03 10:18:14 +03:00
Martin Brennan
4b2bd4d682
FEATURE: Allow "move to inbox" and "move to archive" for private messages using new bulk topic dropdown (#27236)
This commit re-introduces the "Move to Inbox" and "Move to Archive"
bulk topic actions, which we had in the old modal but had not yet added
to the new "experimental" dropdown, which isn't really experimental at
this point.

Once this is merged we can remove the old modal and only
rely on the new dropdown.
2024-06-03 14:37:28 +10:00
dependabot[bot]
a8f0a927a0
Build(deps-dev): Bump sass from 1.77.3 to 1.77.4 (#27294)
Bumps [sass](https://github.com/sass/dart-sass) from 1.77.3 to 1.77.4.
- [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.3...1.77.4)

---
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-06-03 10:38:10 +08:00
Joffrey JAFFEUX
50e573e797
FIX: ensures bulk-select on messages page is working (#27291)
The issue was simple, we were just not returning the helper in the `user-private-messages` controller which was preventing any action to happen.

Follow up: we should write specs for this toggle.
2024-06-03 10:04:38 +10:00
Joffrey JAFFEUX
510c022131
FIX: ensures bulk-select is correctly working on mobile (#27290)
Prior to this fix we were opening a modal before closing the `DMenu` modal, given `DModal` expects only one modal at a time it was closing the latest modal and instantly closing the one we just opened.
2024-06-03 10:03:57 +10:00
Kris
4f6f904320
UX: keep recent search items on same line as icon (#27280) 2024-05-31 10:49:38 -04:00
David Taylor
0a9be3bfd8
DEV: Convert helpers to native class syntax (#27279) 2024-05-31 14:40:52 +01:00
David Taylor
c0abae054d
DEV: Convert app.js to native class syntax (#27277) 2024-05-31 14:40:41 +01:00
David Taylor
0b25d64750
DEV: Convert adapters to native class syntax (#27276) 2024-05-31 14:40:32 +01:00
Jarek Radosz
faad8842d4
DEV: Avoid extra whitespace in rawRenderGlimmer (#27272) 2024-05-31 13:41:14 +02:00
Joffrey JAFFEUX
a9cccf07c6 REVERT: UX: keep recent search items on same line as icon (#27264)
This was making the hamburger menu un-scrollable on mobile.
2024-05-31 10:01:44 +02:00
Kris
5eae8ced9e
UX: keep recent search items on same line as icon (#27264) 2024-05-30 16:10:02 -04:00