Commit Graph

32212 Commits

Author SHA1 Message Date
Bianca Nenciu
ebc1763aa5
FIX: Change request method for categories/search (#26976)
This commit changes request method for "categories/search" from GET to
POST to make sure that long filters can be passed to the server. For
example, category selectors with many categories are setting the full
list of selected category IDs to ensure these are filtered out from the
list of choices. This can result in a long URL that exceeds the maximum
length.
2024-05-13 14:37:17 +03:00
Vinoth Kannan
262393282d
FIX: set selected duration to relative time picker component (#26997)
When the duration of relative time picker change we should update the input argument too.
2024-05-13 17:48:46 +08:00
dependabot[bot]
334e8c0fcb
Build(deps-dev): Bump glob from 10.3.14 to 10.3.15 (#26986)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.14 to 10.3.15.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.3.14...v10.3.15)

---
updated-dependencies:
- dependency-name: glob
  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-05-13 09:46:36 +02:00
Martin Brennan
9bcbfbba43
FEATURE: Force admin sidebar for all admins in admin_sidebar_enabled_groups and handle legacy "hamburger dropdown" in this mode (#26899)
Some sites are still on the legacy "hamburger dropdown"
navigation_menu setting. In this case to avoid confusion,
we want to show both the sidebar icon and the header dropdown
hamburger when visiting the admin portal. Otherwise, the
hamburger switches sides from right to left for admins
and takes on different behaviour.

The hamburger in this case _only_ shows the main panel, not
other sidebar panels like the admin one.
2024-05-13 14:40:23 +10:00
Kelv
df75923f2b
DEV: add home-logo-contents plugin outlet (#26965) 2024-05-13 12:31:57 +08:00
dependabot[bot]
ebb9611c46
Build(deps): Bump babel-plugin-ember-template-compilation (#26987)
Bumps [babel-plugin-ember-template-compilation](https://github.com/emberjs/babel-plugin-ember-template-compilation) from 2.2.4 to 2.2.5.
- [Release notes](https://github.com/emberjs/babel-plugin-ember-template-compilation/releases)
- [Changelog](https://github.com/emberjs/babel-plugin-ember-template-compilation/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emberjs/babel-plugin-ember-template-compilation/commits)

---
updated-dependencies:
- dependency-name: babel-plugin-ember-template-compilation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 11:06:39 +08:00
dependabot[bot]
3c779bd10c
Build(deps): Bump morphlex from 0.0.15 to 0.0.16 (#26988)
Bumps [morphlex](https://github.com/joeldrapper/morphlex) from 0.0.15 to 0.0.16.
- [Commits](https://github.com/joeldrapper/morphlex/commits)

---
updated-dependencies:
- dependency-name: morphlex
  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-05-13 11:03:31 +08:00
dependabot[bot]
7df062089b
Build(deps-dev): Bump sass from 1.77.0 to 1.77.1 (#26989)
Bumps [sass](https://github.com/sass/dart-sass) from 1.77.0 to 1.77.1.
- [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.0...1.77.1)

---
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-05-13 11:03:06 +08:00
Krzysztof Kotlarek
74f24d5973
FIX: bold sidebar header when admin sidebar is disabled (#26993)
Recently a bug was introduced when the admin sidebar section was made bold.

When the admin sidebar is disabled, we display the original sidebar in the admin panel. In that case, an incorrect CSS rule is executed.
```CSS
.admin-area .sidebar-wrapper {
  background-color: var(--d-sidebar-admin-background);
  .sidebar-section-header-text {
    font-weight: bold;
  }
}
```
Bug in this PR: https://github.com/discourse/discourse/pull/26801

To solve it, a custom CSS class with a panel key was added which will allow granular customisations.
2024-05-13 12:36:03 +10:00
Jarek Radosz
fc76622b56
DEV: Add a has truth-helper for use with Set (#26980)
and clean up re-exports
2024-05-12 20:29:45 +02:00
Jarek Radosz
38bd0b3f86
DEV: Remove unused screenNotFull code (#26979) 2024-05-12 20:29:07 +02:00
Jarek Radosz
fcd2293226
DEV: Convert the entire sidebar to gjs (#26978) 2024-05-12 19:43:51 +02:00
Jarek Radosz
2f95628f87
DEV: Check lifetime props in the Presence service (#26975) 2024-05-11 17:44:36 +02:00
Jarek Radosz
4c47f25530
DEV: Simplify sidebar's collapsedSections (#26972) 2024-05-11 11:15:38 +02:00
Bianca Nenciu
3e7601cada
DEV: Embed IDs in serializer for about page (#26679)
It used to embed the objects which could lead to duplicated objects
when the same user or category was used multiple times (user was admin,
moderator and category or category was parent for multiple categories).
2024-05-10 20:11:43 +03:00
Osama Sayegh
3be4924b99
DEV: Move array type custom fields to JSON type in automation (#26939)
The automation plugin has 4 custom field types that are array typed. However, array typed custom fields are deprecated and should be migrated to JSON type.

This commit does a couple of things:

1. Migrate all four custom fields to JSON
2. Fix a couple of small bugs that have been discovered while migrating the custom fields to JSON (see the comments on this commit's PR for details https://github.com/discourse/discourse/pull/26939)
2024-05-10 18:47:12 +03:00
Vinoth Kannan
4e22b505c5
FIX: add missing translations for staff action logs. (#26969)
The watched word group's create, update and delete action logs were missing the translations. This PR will add those strings and will use the group key instead of watched word key where needed.
2024-05-10 23:11:56 +08:00
dependabot[bot]
3f788e4de8
Build(deps-dev): Bump glob from 10.3.12 to 10.3.14 (#26961)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.12 to 10.3.14.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.3.12...v10.3.14)

---
updated-dependencies:
- dependency-name: glob
  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-05-10 15:39:07 +02:00
David Taylor
97847f6cd8
Revert "DEV: @babel/plugin-proposal-decorators -> decorator-transforms (#25290)" (#26971)
This reverts commit 0f4520867b.

This has led to two problems:

1. An incompatibility with Cloudflare's "auto minify" feature. They've deprecated this feature because of incompatibility with modern JS syntax. But unfortunately it will remain enabled on existing properties until 2024-08-05.

2. Discourse fails to boot in Safari 15. This is strange, because Safari does support all the required features in our production JS bundles. Even more strangely, things start working as soon as you open the developer tools. That suggests the cause could be a Safari bug rather than a simple incompatibility.

Reverting while we work out a path forward on both those issues.
2024-05-10 12:48:16 +01:00
Joffrey JAFFEUX
47cabdc6d2
DEV: various improvements to d-menu (#26970)
- adds a `@groupIdentifier` property which will ensure that two menus of the same group are not expanded at the same time
- adds a `@class` property which will be applied to the trigger and the content
- adds a `@triggerClass` property which will be applied to the trigger
- adds a `@contentClass` property which will be applied to the trigger
- removes `extraClassName`
2024-05-10 13:43:37 +02:00
Joffrey JAFFEUX
46371fe9e4
DEV: allows to get a menu by its identifier (#26968)
Usage:

```javascript
this.menu.getByIdentifier("foo");
```
2024-05-10 12:00:58 +02:00
Kelv
38c1312dfb
FIX: restore behaviour of adding docked classname to document body during header updates (#26967) 2024-05-10 16:41:17 +08:00
Natalie Tay
113e6fd274
DEV: Increase external avatar url limit (#26966) 2024-05-10 16:19:23 +08:00
Joffrey JAFFEUX
2a2eaf835f
FIX: disables the modal on mobile bookmark-menu (#26958)
It's a temporary solution while I work a better solution. The problem here is quite tricky. We are showing a modal from a modal. But if we close the previous modal, before the second one is show it means we destroy the menu holding the first modal which prevents showing the second modal.

One possible solution would be to refactor d-modal’s show function. At the moment if you await on show it will await until closed and not when the modal has been inserted to the DOM. It means we don't have a clean moment to close the d-menu.

The second issue it that even though it's possible to have multiple modals on screen, the close modal assumes only one active modal at a time.
2024-05-09 22:17:31 +02:00
Joffrey JAFFEUX
9e696a0305
FIX: allows to disable body scroll lock on swipe modifier (#26957)
Cases like the glimmer-site-header are complex because the swiped area is not the moved target, for now it's simpler to not apply the body scroll lock automatically.

A new property is now available on the swipe modifier: `{{swipe @lockBody=false}}`

Note I tried to have tests for this modifier in the past, but it was very inconsistent on CI causing lots of flakeys, this is why there are no tests for now. I might try to write them again using system specs.
2024-05-09 21:16:27 +02:00
Joffrey JAFFEUX
cb9817acb6
FIX: close d-menu before action in topic menu (#26956)
Prior to this fix we were making the action and then closing the d-menu which in this case would be a modal and close the modal opened by the action.
2024-05-09 21:08:15 +02:00
carson chang
4fad0b33eb
UX: Use breakpoint CSS variable instead of arbitrary 570px (#26945)
* Update header.scss

* Update discourse.scss
2024-05-09 09:16:24 -07:00
Mark Reeves
ce798ac2af
FIX: Open Powered-by link in new tab (#26953)
Opening the Discourse Powered-by link in a new tab doesn't take away from focus in the forum, avoids back button issues.
2024-05-09 11:08:01 -04:00
Vinoth Kannan
9747037554
FIX: update duration & interval when input values updated. (#26796)
Previously, we only updated the duration and interval values in the constructor. So whenever the initial values are updated in the form the changes are not reflected in the UI. To fix this issue we're using "get" methods in this PR.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-05-09 18:06:19 +08:00
Jarek Radosz
20e049bcbc
DEV: Minor refactor of d-menu/d-tooltip (#26942)
* `menuInstance` cached getter -> prop
* `next()` and a `trigger` check -> gone
* `allowedProperties` action -> getter
* `keys` -> `entries`
* update the `service` import
* flatten the object spread structures
2024-05-09 10:54:37 +02:00
Rishabh
69158ebb5c
Update /powered-by link to final target (#26950) 2024-05-09 13:00:08 +05:30
Alan Guo Xiang Tan
7079698cdf
FIX: Use MaxMind supplied permalinks to download MaxMind databases (#26847)
This commit switches `DiscourseIpInfo.mmdb_download` to use the
permalinks supplied by MaxMind to download the MaxMind databases as
specified in
https://dev.maxmind.com/geoip/updating-databases#directly-downloading-databases
which states:

```
To directly download databases, follow these steps:

1. In the "Download Links" column, click "Get Permalink(s)" for the desired database.
2. Copy the permalink(s) provided in the modal window.
3. Provide your account ID and your license key using Basic Authentication to authenticate.
```

Previously we are downloading from `https://download.maxmind.com/app/geoip_download` but this is not
documented anyway on MaxMind's docs so this URL can in theory break
in the future without warning. Therefore, we are taking a proactive
approach to download the databases from MaxMind the recommended way
instead of relying on a hidden URL. This old way of downloading the
databases with only a license key will be deprecated in 3.3 and be
removed in 3.4.
2024-05-09 15:11:56 +08:00
Martin Brennan
abb073b80a
UX: Add CSS for admin plugin empty list CTA (#26949)
This adds `admin-plugin-config-area__empty-list`,
allows us to standardize on CTA styling for empty lists.
2024-05-09 12:46:41 +10:00
Keegan George
0695424c92
DEV: Bump ember-instantsearch to v1.1.2 (#26943) 2024-05-08 13:06:59 -07:00
Jarek Radosz
e579cfc08f
DEV: Avoid using the old action helper (#26935) 2024-05-08 20:26:48 +02:00
Jarek Radosz
1b80ee9eb7
FIX: Track User.status property (#26941)
Fixes a bug I stumbled upon in dev env:

```
Error: Assertion Failed: You attempted to update <discourse@model:user::ember337>.status to "[object Object]", but it is being tracked by a tracking context, such as a template, computed property, or observer. In order to make sure the context updates properly, you must invalidate the property when updating it. You can mark the property as `@tracked`, or use `@ember/object#set` to do this.
```
2024-05-08 19:07:43 +02:00
Jan Cernik
7bc7ad45bb
UX: Merge the redesign experiment for embedded replies (#26876)
This PR merges the [design experiment](https://meta.discourse.org/t/embedded-replies-feedback/290538) based on the [Custom embedded replies component](https://meta.discourse.org/t/custom-embedded-replies/272670) created by [Don](https://meta.discourse.org/u/don/summary)

---------

Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
2024-05-08 18:00:17 +02:00
Joffrey JAFFEUX
9bf763d03f
FIX: inject current user service in category model (#26937) 2024-05-08 14:09:00 +02:00
Jarek Radosz
5d7aff12a7
DEV: Convert dialog-holder to gjs (#26869) 2024-05-08 13:04:01 +02:00
Joffrey JAFFEUX
7896d00a7a
FIX: incorrect divider in topic admin menu (#26934)
Adds a divider only if we are staff or have extra buttons.
2024-05-08 11:49:04 +02:00
David Taylor
0f4520867b
DEV: @babel/plugin-proposal-decorators -> decorator-transforms (#25290)
decorator-transforms (https://github.com/ef4/decorator-transforms) is a modern replacement for babel's plugin-proposal-decorators. It provides a decorator implementation using modern browser features, without needing to enable babel's full suite of class feature transformations. This improves the developer experience and performance.

In local testing with Google's 'tachometer' tool, this reduces Discourse's 'init-to-render' time by around 3-4% (230ms -> 222ms).

It reduces our initial gzip'd JS payloads by 3.2% (2.43MB -> 2.35MB), or 7.5% (14.5MB -> 13.4MB) uncompressed.
2024-05-08 10:40:51 +01:00
dependabot[bot]
592d05cb9c
Build(deps): Bump babel-plugin-ember-template-compilation (#26932)
Bumps [babel-plugin-ember-template-compilation](https://github.com/emberjs/babel-plugin-ember-template-compilation) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/emberjs/babel-plugin-ember-template-compilation/releases)
- [Changelog](https://github.com/emberjs/babel-plugin-ember-template-compilation/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emberjs/babel-plugin-ember-template-compilation/commits)

---
updated-dependencies:
- dependency-name: babel-plugin-ember-template-compilation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 11:11:09 +02:00
dependabot[bot]
34b9b3f6a7
Build(deps): Bump the embroider group with 3 updates (#26931)
Bumps the embroider group with 3 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat), [@embroider/router](https://github.com/embroider-build/embroider/tree/HEAD/packages/router) and [@embroider/addon-shim](https://github.com/embroider-build/embroider/tree/HEAD/packages/addon-shim).


Updates `@embroider/compat` from 3.4.9 to 3.5.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)

Updates `@embroider/router` from 2.1.6 to 2.1.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/router)

Updates `@embroider/addon-shim` from 1.8.7 to 1.8.8
- [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/addon-shim)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: embroider
- dependency-name: "@embroider/router"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/addon-shim"
  dependency-type: direct:production
  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-05-08 11:10:45 +02:00
Rishabh
a20e0ef0b6
powered-by-discourse should link to /about instead (#26930) 2024-05-08 18:45:08 +10:00
dependabot[bot]
93e55ed355
Build(deps-dev): Bump @types/jquery in the types group (#26918)
Bumps the types group with 1 update: [@types/jquery](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jquery).


Updates `@types/jquery` from 3.5.29 to 3.5.30
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jquery)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 10:40:14 +02:00
Joffrey JAFFEUX
cf8b81771f
DEV: implements <DropdownMenu /> (#26917)
DropdownMenu component is meant as a way to describe the content of menus.

Syntax:

```
<DropdownMenu as |dm|>
  <dm.item class="test">
    First
  </dm.item>
  <dm.divider class="foo" />
  <dm.item class="bar">
    Second
  </dm.item>
</DropdownMenu>
```
2024-05-08 09:08:42 +02:00
dependabot[bot]
7744e8ac85
Build(deps-dev): Bump sinon from 17.0.1 to 17.0.2 (#26920)
Bumps [sinon](https://github.com/sinonjs/sinon) from 17.0.1 to 17.0.2.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v17.0.1...v17.0.2)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 14:08:39 +08:00
dependabot[bot]
b67513eb28
Build(deps-dev): Bump sass from 1.76.0 to 1.77.0 (#26921)
Bumps [sass](https://github.com/sass/dart-sass) from 1.76.0 to 1.77.0.
- [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.76.0...1.77.0)

---
updated-dependencies:
- dependency-name: sass
  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-05-08 14:08:20 +08:00
Krzysztof Kotlarek
b3f321e333
Revert "FEATURE: revert redirect from wizard to guide (#26873)" (#26916)
This reverts commit 74f1a79d36.
2024-05-08 08:46:30 +10:00
Joffrey JAFFEUX
fe16633a0c
DEV: allows for multiple menus/tooltips (#26823)
menus and tooltips are now appended to their own portals. The service are the only responsible for managing the instances, prior to this commit, services could manage one instance, but the DMenu and DTooltip components could also take over which could cause unexpected states.

This change also allows nested menus/tooltips.

Other notable changes:

- few months ago core copied the CloseOnClickOutside modifier of float-kit without removing the float-kit one, this commit now only use the core one.
- the close function is now trully async
- the close function accepts an instance or an identifier as parameter
2024-05-07 23:48:44 +02:00