Commit Graph

32105 Commits

Author SHA1 Message Date
David Battersby
0c8f531909
FEATURE: encourage users to set chat thread titles (#26617)
This change encourages users to title their threads to make it easier for other users to join in on conversations that matter to them.

The creator of the chat thread will receive a toast notification prompting them to add a thread title when on mobile and the thread has at least 5 sent replies.
2024-04-29 17:20:01 +08:00
Joffrey JAFFEUX
1510c6d004
FIX: correctly enable/disable body scroll on modal (#26784) 2024-04-29 08:45:48 +02:00
Martin Brennan
94fe31e5b3
UX: Fix report color duplication (#26799)
In the "Consolidated Pageviews with Browser Detection (Experimental)"
report we used the same color for "Known Crawler" and "Other pageviews"
which makes the report confusing to look at, this commit makes them
different.
2024-04-29 15:12:47 +10:00
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
David Taylor
594026d65f
FIX: Include HTML content for authenticated users with crawler UA (#26757)
e05628c0 introduced an optimization to remove basic-HTML content for authenticated users. The assumption is that, if they were able to log in, they must have a JS capable browser and do not need the basic HTML.

However, there are use-cases where an API-key is used to crawl a private site, or private categories of a public site. This commit re-enables those use cases by keeping the basic-html in place for crawler/bot user agents.
2024-04-25 22:41:57 +01:00
Daniel Waterworth
e0e0e0506f
DEV: Limit the number of category sidebar links a user can have (#26756) 2024-04-25 13:21:39 -05: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
Natalie Tay
00a9369ca2
FIX: Move user reindexing into a job (#26753)
In a large forum with millions of users and millions of user_fields
updating the list of dropdown user field options will result in a
502 now due to the large number of fields.

This commit moves the indexing into a job.
2024-04-25 20:58:34 +08: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
Régis Hanol
7dcd707c59 PERF: introduce a basic api key serializer
For better performances when listing all the API keys.

Loading all the "api key scopes" is slow and not required when showing the list of all the api keys.
2024-04-24 19:16:10 +02: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
David Taylor
bca855f239
FIX: Improve handling of 'PublicExceptions' when bootstrap_error_pages enabled (#26700)
- Run the CSP-nonce-related middlewares on the generated response

- Fix the readonly mode checking to avoid empty strings being passed (the `check_readonly_mode` before_action will not execute in the case of these re-dispatched exceptions)

- Move the BlockRequestsMiddleware cookie-setting to the middleware, so that it is included even for unusual HTML responses like these exceptions
2024-04-24 09:40:13 +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
Vinoth Kannan
859b55366f
DEV: don't send moderator welcome message to first admin. (#26719)
We already skipping the admin welcome message for the first admin user. We should also skip the moderator message.
2024-04-24 00:20:14 +05:30
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
Penar Musaraj
98d400f7b5
DEV: Refactor discover setting reporting (#26706) 2024-04-23 09:52:01 -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
Alan Guo Xiang Tan
b3f1192312
DEV: Add getCategoryIdByName helper function to theme migrations (#26601)
This commit adds a `getCategoryIdByName` helper function to the context in
which theme migrations are ran in. The purpose of this commit is to
allow themes which may have stored category names in theme settings to
migrate to objects typed theme settings which supports properties of
categories typed which stores the category ids in the value of the
property.
2024-04-22 09:01:53 +08:00
Michael Brown
a5ef7b1999 FIX: in EmailSettingsValidator, unset smtp authentication when there's no user and password
net-smtp 0.5.0 bails when authentication is set without username/password

followup-to: 7b8d60dc, 897be759
2024-04-19 14:02:22 -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