Commit Graph

22659 Commits

Author SHA1 Message Date
Krzysztof Kotlarek
da329d54af
FEATURE: new admin sidebar for moderators (#26795)
Enable a new sidebar for moderators with limited links.
2024-04-29 11:32:47 +10:00
Jarek Radosz
5d568d0bab
Revert "DEV: Convert topic-title to glimmer/gjs (#26775)" (#26794)
This reverts commit 261ef8404e.
2024-04-29 09:15:35 +08:00
Martin Brennan
edec941a87
FIX: Better tracking of topic visibility changes (#26709)
This commit introduces a few changes as a result of
customer issues with finding why a topic was relisted.
In one case, if a user edited the OP of a topic that was
unlisted and hidden because of too many flags, the topic
would get relisted by directly changing topic.visible,
instead of going via TopicStatusUpdater.

To improve tracking we:

* Introduce a visibility_reason_id to topic which functions
  in a similar way to hidden_reason_id on post, this column is
  set from the various places we change topic visibility
* Fix Post#unhide! which was directly modifying topic.visible,
  instead we use TopicStatusUpdater which sets visibility_reason_id
  and also makes a small action post
* Show the reason topic visibility changed when hovering the
  unlisted icon in topic status on topic titles
2024-04-29 10:34:46 +10:00
dependabot[bot]
3e1377578a
Build(deps-dev): Bump babel-import-util from 2.0.3 to 3.0.0 (#26786)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from 2.0.3 to 3.0.0.
- [Release notes](https://github.com/ef4/babel-import-util/releases)
- [Changelog](https://github.com/ef4/babel-import-util/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ef4/babel-import-util/compare/v2.0.3...v3.0.0)

---
updated-dependencies:
- dependency-name: babel-import-util
  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-04-29 00:45:54 +02:00
dependabot[bot]
4a200a670b
Build(deps-dev): Bump @floating-ui/dom from 1.6.3 to 1.6.4 (#26785)
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.3 to 1.6.4.
- [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.4/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-04-29 00:41:43 +02:00
dependabot[bot]
2013673d9e
Build(deps-dev): Bump ember-cli from 5.8.0 to 5.8.1 (#26787)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 5.8.0 to 5.8.1.
- [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.0...v5.8.1)

---
updated-dependencies:
- dependency-name: ember-cli
  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-04-29 00:22:49 +02:00
Jarek Radosz
f75c253b95
DEV: Inline cancel-link code (#26778)
No need for this small component (and its unused and empty admin component twin)
2024-04-27 14:26:29 +02:00
Jarek Radosz
505d8b52b8
DEV: Add support for arrays to concatClass (#26777)
It'd be useful in cases like:

```gjs
get flagNames() {
  return this.flags?.map((flag) => flag && `flag-${flag.name}`);
  // w/o this change you'd have to handle it here:
  // return this.flags?.map((flag) => flag && `flag-${flag.name}`).filter(Boolean).join(" ");
}

<template>
  <span class={{concatClass "gadget" this.flagNames}}>
  {{! …or here: }}
  <span class={{concatClass "gadget" (concatClass this.flagNames)}}>
```

(also: replaces ember's `compact()` with `filter(Boolean)`)
2024-04-27 12:02:20 +02:00
Jarek Radosz
cf11e556cb
DEV: Update htmlSafe imports (#26776) 2024-04-27 12:01:58 +02:00
Jarek Radosz
261ef8404e
DEV: Convert topic-title to glimmer/gjs (#26775) 2024-04-27 11:58:59 +02:00
Jarek Radosz
2a52f7f13f
DEV: Convert track-selected to glimmer/gjs (#26773) 2024-04-27 11:58:42 +02:00
Jarek Radosz
6c7e46a32f
DEV: Remove key-enter-escape mixin (#26759)
Was used in only two places, just inline it to unblock conversion to glimmer
2024-04-26 16:42:22 +02:00
Jarek Radosz
9874801f94
DEV: Convert topic-post-badges to glimmer/gjs (#26760) 2024-04-26 16:16:32 +02:00
Joffrey JAFFEUX
a7f596da7a
FIX: relative picker was being reset on change (#26766)
A change in relative picker was causing a serie of events which ultimately would cause the whole list of time options to be reset and re-rendered which would cause a new instance of the picker to be created, causing a reset.

The fix is using id in the each loop to help ember identify that it doesn’t have to re-render a specific component.
2024-04-26 10:59:51 +02:00
Daniel Waterworth
c77d109362
FIX: Selecting categories for new admin webhooks (#26746) 2024-04-25 09:43:16 -05:00
Bianca Nenciu
dbe923d26e
FIX: Fetch categories for "+subcategories" option (#26622)
Selecting the +subcategories option does not work sometimes when "lazy
load categories" is enabled because the subcategories may not be
fetched. This ensures that subcategories are loaded by requesting them
before being used.
2024-04-25 16:47:45 +03:00
Joffrey JAFFEUX
9d3ab91517
UX:minor tweaks to user notifications dropdown (#26754)
- changes mute icon to bell-slash
- changed mute text
- changed ignore text
2024-04-25 15:22:41 +02:00
David Taylor
2f2da72747
FEATURE: Add experimental tracking of 'real browser' pageviews (#26647)
Our 'page_view_crawler' / 'page_view_anon' metrics are based purely on the User Agent sent by clients. This means that 'badly behaved' bots which are imitating real user agents are counted towards 'anon' page views.

This commit introduces a new method of tracking visitors. When an initial HTML request is made, we assume it is a 'non-browser' request (i.e. a bot). Then, once the JS application has booted, we notify the server to count it as a 'browser' request. This reliance on a JavaScript-capable browser matches up more closely to dedicated analytics systems like Google Analytics.

Existing data collection and graphs are unchanged. Data collected via the new technique is available in a new 'experimental' report.
2024-04-25 11:00:01 +01:00
Penar Musaraj
1f73e7d039
FIX: Allow deleting avatars from the selectable avatars setting (#26720)
Fixes two issues:

- frontend was reloading the page when clicking-to-remove avatar
- backend wasn't allowing resetting the setting by deleting all avatars
2024-04-24 16:07:12 -04:00
Keegan George
963647c734
DEV: Add experimental ember-instantsearch add-on (#26667) 2024-04-24 11:49:05 -07:00
Joffrey JAFFEUX
be96295c25
DEV: supports inline for d-menu (#26742)
`<DMenu @inline={{true}} ...>...</DMenu>` will render the body relative to the trigger instead of rendering it in a portal.
2024-04-24 18:29:26 +02:00
Joffrey JAFFEUX
9f8091abf0
FIX: prevents error due to property override (#26741)
The `secondFactorMethod` property is defined as a @discourseComputed` which means it can't be overridden. Yet, we do override it in `app/assets/javascripts/discourse/app/components/security-key-form.js` and `app/assets/javascripts/discourse/app/components/second-factor-form.js` by doing `this.set("secondFactorMethod", ...)`.

This commit sets a default property `secondFactorMethod` on the `email-login` controller after the model has been loaded. Given this property is no longer computed, it can be set again at other places.

Followups:
- Ideally we would follow DDAU pattern but this is quite a significant refactor.
- The test I added is very limited, ideally we should start writing system specs for this, but it means having to deal with the email, it's a significant work.
2024-04-24 17:54:16 +02:00
Joffrey JAFFEUX
21ef033e86
UX: changes normal level icon for user-notifications (#26740)
The icon has been changed from "user" to "bell" to make this level more clear.
2024-04-24 16:07:21 +02:00
Kris
dcf9ca054b
DEV: add topic-area-bottom plugin outlet (#26721) 2024-04-24 09:56:59 -04:00
David Taylor
dcd994a9f1
DEV: Drop workbox dependency (#26735)
This service-worker caching functionality was disabled by default in 1c58395bca, and the setting to re-enable was marked as experimental. Now we are dropping all the related logic.
2024-04-24 10:19:12 +01:00
dependabot[bot]
3b07b6e4ca
Build(deps-dev): Bump qunit-dom from 3.1.1 to 3.1.2 (#26724)
Bumps [qunit-dom](https://github.com/mainmatter/qunit-dom) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/mainmatter/qunit-dom/releases)
- [Commits](https://github.com/mainmatter/qunit-dom/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: qunit-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-04-24 09:42:32 +01:00
Krzysztof Kotlarek
0cd4d7ddd1
FEATURE: include themes and components keywords to the admin sidebar (#26708)
Include themes and component keywords to make the filter more accurate.
2024-04-24 12:34:38 +10:00
Daniel Waterworth
d2a52c3c35
FIX: Use serialized subcategories in subcategory-with-featured-topics (#26718) 2024-04-23 15:27:12 -05:00
Kris
efc31387e2
UX: bookmark button in topic footer should have btn-default class (#26717) 2024-04-23 13:11:13 -04:00
Arkshine
c3fb050988
FIX: Automatic code highlighting not applied in fullscreen modal (#26710) 2024-04-23 13:04:17 -04:00
Krzysztof Kotlarek
e1d9fd479f
FEATURE: after wizard admin is redirected to the guide page (#26696)
After the wizard is completed, the admin should be redirected to the admin guide topic.

Also tooltip from "Getting started" button was removed.
2024-04-23 10:04:15 +10:00
dependabot[bot]
ada3588860
Build(deps): Bump terser from 5.30.3 to 5.30.4 (#26703)
Bumps [terser](https://github.com/terser/terser) from 5.30.3 to 5.30.4.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.30.3...v5.30.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-04-23 08:55:51 +10:00
Penar Musaraj
30e3f291f8
UX: Fix styling for focused row (#26698) 2024-04-22 13:17:00 -04:00
Kris
b971efed8c
UX: dynamic spacing for summarization buttons (#26690) 2024-04-22 09:49:00 -04:00
Gabriel Grubba
dc996a1e5c
FIX: Locale mismatch at theme translations picker (#26687)
* FIX: Locale mismatch at theme translations picker

Before, the theme translations picker value was set to the
site's default locale, which mismatches from the user's locale.

This commit changes the picker value to the user locale.

relates to https://meta.discourse.org/t/locale-mismatch-at-theme-translations/302879

* DEV: Address code review feedback.

- https://github.com/discourse/discourse/pull/26687#discussion_r1572516758
- https://github.com/discourse/discourse/pull/26687#discussion_r1572524059
2024-04-19 14:23:27 -03:00
Mark VanLandingham
239eac7799
DEV: Allow auth errors to render HTML (#26686) 2024-04-19 09:11:03 -05:00
Bianca Nenciu
1deeff2336
FIX: Serialize categories for group posts (#26663)
This is necessary when "lazy load categories" feature is enabled to
make sure the categories are rendered for group posts.
2024-04-19 16:33:37 +03:00
Kris
5021f8a7da
FIX: correct arguments for "show top replies" in topic map (#26681)
Co-authored-by: Kelv <kelv@discourse.org>
2024-04-19 08:17:05 -04:00
David Taylor
7180da1b1c DEV: Boolean -> globalThis.Boolean in gjs template
Globals are no longer directly available in gjs
2024-04-19 10:06:08 +01:00
David Taylor
e9e3456f18 DEV: Rename modifier import to avoid overwriting template keyword 2024-04-19 10:06:08 +01:00
dependabot[bot]
9f9b09536d Build(deps): Bump babel-plugin-ember-template-compilation
Bumps [babel-plugin-ember-template-compilation](https://github.com/emberjs/babel-plugin-ember-template-compilation) from 2.2.1 to 2.2.2.
- [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/compare/v2.2.1...v2.2.2)

---
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>
2024-04-19 10:06:08 +01:00
dependabot[bot]
5a2317609f
Build(deps-dev): Bump babel-import-util from 2.0.2 to 2.0.3 (#26682)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from 2.0.2 to 2.0.3.
- [Commits](https://github.com/ef4/babel-import-util/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: babel-import-util
  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-04-19 09:31:25 +01:00
David Battersby
06500fa626
FEATURE: add swipe up to close toast notification (#26659)
Toasts can now be dismissed by doing a swipe up on mobile.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-04-19 09:49:50 +02:00
Carson Chang
7cf04d96c3
UX: Keep input headings consistently bold (#26510) 2024-04-18 20:22:08 -07:00
Martin Brennan
dbcefcf85e
FEATURE: Show additional filter links in admin sidebar for no results (#26672)
When the user sees no results in their admin sidebar query,
we are adding two additional links:

* "Search site settings" - Navigates to the site settings page
  with the filter prefilled in the search
* "Admin user list" - Navigates to the user list with the filter
  prefilled in the username search

This will bridge the gap until we have a full admin-wide search.

Also make admin site setting search param refresh on filter changes

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-04-19 10:55:17 +10:00
dependabot[bot]
b88273e046
Build(deps-dev): Bump the embroider group with 5 updates (#26677)
Bumps the embroider group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@embroider/test-setup](https://github.com/embroider-build/embroider/tree/HEAD/packages/test-setup) | `3.0.3` | `4.0.0` |
| [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat) | `3.4.7` | `3.4.8` |
| [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core) | `3.4.7` | `3.4.8` |
| [@embroider/macros](https://github.com/embroider-build/embroider/tree/HEAD/packages/macros) | `1.15.1` | `1.16.0` |
| [@embroider/webpack](https://github.com/embroider-build/embroider/tree/HEAD/packages/webpack) | `3.2.3` | `4.0.0` |


Updates `@embroider/test-setup` from 3.0.3 to 4.0.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/test-setup)

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

Updates `@embroider/core` from 3.4.7 to 3.4.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/core)

Updates `@embroider/macros` from 1.15.1 to 1.16.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/macros)

Updates `@embroider/webpack` from 3.2.3 to 4.0.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/webpack)

---
updated-dependencies:
- dependency-name: "@embroider/test-setup"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: embroider
- 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-minor
  dependency-group: embroider
- dependency-name: "@embroider/webpack"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-18 15:48:10 +01:00
David Taylor
5c2ac4fe88
DEV: Allow RenderGlimmer to be used inside post-cooked-glued widgets (#26675)
In this case, the top-level widget being glued must have a `_postCookedWidget` attribute.
2024-04-18 15:39:29 +01:00
Jarek Radosz
bfd6a7b86c
DEV: Clean up sidebar/filter.gjs (#26673)
The most important change being the replacement of `Input` component with an `<input>` element.
2024-04-18 13:17:21 +02:00
Jarek Radosz
2d5d7b5a33
DEV: Don't leak the topic model through minimized arg (#26669)
Co-authored-by: David Taylor <david@taylorhq.com>
2024-04-18 13:17:09 +02:00
Martin Brennan
2d2329095c
FEATURE: Use new bookmark menu in topic footer buttons (#26670)
Followup to 67a8080e33

This commit makes it so the topic footer button for bookmarks
uses the new BookmarkMenu component, and makes some tweaks to
that component to allow for a label and CSS class options.

Also introduces a TopicBookmarkManager to manage the saving/editing/
deleting of the topic level bookmarks and the reactivity that happens
in the topic UI afterward.

Next commit should rip out old bookmark associated code in the
topic controller as it will no longer be needed.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-04-18 11:06:12 +02:00