Commit Graph

28282 Commits

Author SHA1 Message Date
Sam
60abe99add
FIX: allow tl4 to bulk select (#19094)
* FIX: allow tl4 to bulk select

- Also allows tl4 to perform batch tagging

---

Long term this needs to be rewritten to account for "bulk action" permission
given from the server.

Co-authored-by: Martin Brennan <martin@discourse.org>
2022-11-18 10:41:59 +11:00
dependabot[bot]
2b7e73d7ff
Build(deps): Bump source-map in /app/assets/javascripts (#19090)
Bumps [source-map](https://github.com/mozilla/source-map) from 0.6.1 to 0.7.4.
- [Release notes](https://github.com/mozilla/source-map/releases)
- [Changelog](https://github.com/mozilla/source-map/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mozilla/source-map/compare/0.6.1...v0.7.4)

---
updated-dependencies:
- dependency-name: source-map
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 00:18:09 +01:00
dependabot[bot]
68b2304588
Build(deps): Bump babel-import-util in /app/assets/javascripts (#19086)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from 1.2.2 to 1.3.0.
- [Release notes](https://github.com/ef4/babel-import-util/releases)
- [Commits](https://github.com/ef4/babel-import-util/compare/v1.2.2...v1.3.0)

---
updated-dependencies:
- dependency-name: babel-import-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 00:15:10 +01:00
Jarek Radosz
4cbb811988
DEV: Add dark theme support to QUnit (#19014) 2022-11-17 18:44:44 +01:00
Jarek Radosz
59f1d01381
DEV: Convert SiteSettings to a tracked object (#19015)
TrackedObject allows us to reference SiteSettings in autotracking contexts (e.g. JS getters referenced from a Glimmer template) without the need for EmberObject's `get()`  function. TrackedObject is backwards-compatible with Ember's legacy reactivity model, so it can be referenced in things like computed properties.

Co-authored-by: David Taylor <david@taylorhq.com>
2022-11-17 18:44:23 +01:00
Kris
a18f6dcb7e
UX: user message controls need some padding (#19079) 2022-11-17 12:33:17 -05:00
Peter Wagenet
a88902950a
DEV: Convert DButton to a Glimmer Component (#17767)
This change is intended to be backwards-compatible with all the previous arguments to `DButton`.

A deprecation warning will be triggered when a string is passed to the `@action` argument. This kind of action bubbling has been deprecated in Ember for some time, and should be updated to use closure actions.

Co-authored-by: Dan Gebhardt <dan@cerebris.com>
Co-authored-by: David Taylor <david@taylorhq.com>
2022-11-17 10:55:15 +00:00
Meghna
040136675b
UX: better email login pages (#19058)
* UX: better email login pages

* Update error message for email login error
2022-11-17 13:09:39 +05:30
Martin Brennan
40e8912395
FIX: Invite redemption error if user had already redeemed (#19070)
When opening the invite acceptance page when the user
was already logged in, we were still showing the Accept
Invitation prompt even if the user had already redeemed
the invitation and was present in the `InvitedUser` table.

This would lead to errors when the user clicked on the button.

This commit fixes the issue by hiding the Accept Invitation
button and showing an error message instead indicating that
the user had already redeemed the invitation. This only applies
to multi-use invite links.
2022-11-17 15:51:58 +10:00
Penar Musaraj
5ee3e2932f
FIX: Bug with admin trust level growth report (#19050)
When this report in the admin dashboard has lots of data ( > 75 days of activity), the dates were ordered incorrectly. This is apparently expected behaviour; when using GROUP BY without specifying the ordering, PG decides to order, and it so happens that it works under some conditions but not others. Explicit ordering fixes the problem. 

However, because this works in some conditions but not others, we can't really add a useful test.
2022-11-16 22:11:09 -05:00
Penar Musaraj
0ef8d0a7bc
FIX: Regression with special a keyword in search (#19063)
Fixes a regression introduced in ac7bf98.
2022-11-16 21:51:29 -05:00
Kris
7465fadca0
DEV: remove unused CSS (#19069) 2022-11-17 08:19:08 +08:00
Sérgio Saquetim
81efd3101d
DEV: Added plugin outlet below user summary stats (#18968) 2022-11-16 20:18:51 -03:00
Bianca Nenciu
35980ad56e
FIX: Update user options only once (#19066)
* FIX: Update user options only once

Performing actions that updated list of seen popups used to update user
options everytime instead of checking if the change has any effect.

* FIX: Load updated user data from response
2022-11-17 09:12:54 +11:00
Penar Musaraj
19158cde53
Add search tip for @me shortcut (#19062) 2022-11-16 15:19:34 -05:00
Kris
a5f2099884
A11Y: add live area for search menu, labels (#19061) 2022-11-16 14:02:39 -05:00
Jarek Radosz
d2a8884127
DEV: Bump pikaday (#19060) 2022-11-16 18:59:15 +01:00
Jarek Radosz
a7b033d642
DEV: Update node-fetch (#19059)
node-fetch is now a ES module, so it has to either imported with `import/from` syntax (which can't be used in addon's index.js) or using the dynamic `import()`
2022-11-16 18:58:38 +01:00
David Taylor
6d6d5a200f
DEV: Add withSilencedDeprecationsAsync for async functions (#19057)
Previously we were trying to handle both async and sync use cases in a single function, but it was confusing to read and led to subtle race conditions. This commit separates the async version into a separate function.
2022-11-16 17:55:20 +00:00
Andrei Prigorshnev
ce7172bc9b
FIX: status was clearing after editing user preferences (#18887)
The problem was reported as a problem with changing theme in user preferences, after saving a new theme the previously set user status was disappearing (https://meta.discourse.org/t/user-status/240335/42). Turned out though that the problem was more wide, changing pretty much any setting in user preferences apart from user status itself led to clearing the status.
2022-11-16 21:42:56 +04:00
David Taylor
cf51a4ea84
DEV: Modernise mixed test direction text-field to avoid deprecation (#19056)
Previously we had a combination of a computed property and `this.set`. This was triggering the `computed-property.override` deprecation. This commit moves everything into the `dir` property, makes it a native getter, and adds a test to verify the reactive behavior.
2022-11-16 17:34:04 +00:00
Jordan Vidrine
38d6e8c071
FIX: Add Custom Primary-Numbers (#19055) 2022-11-16 11:33:23 -06:00
Kris
19ec341bce
DEV: allow themes to more easily set border-radii (#19037) 2022-11-16 11:35:09 -05:00
Jarek Radosz
99dfdf70e8
DEV: Make dialog-holder a monorepo package (#19051) 2022-11-16 16:43:45 +01:00
Bianca Nenciu
9f3371f367
DEV: Remove old "first notification" tutorial (#19036)
It was replaced by the new "first notification" user tip.
2022-11-16 14:35:18 +02:00
Jarek Radosz
cfd610cc7c
DEV: Make bootstrap-json a monorepo package (#19048) 2022-11-16 11:58:10 +01:00
dependabot[bot]
ffce372a48
Build(deps): Bump eslint in /app/assets/javascripts (#18933)
Bumps [eslint](https://github.com/eslint/eslint) from 8.26.0 to 8.27.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.26.0...v8.27.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 11:45:55 +01:00
Jarek Radosz
9bf95d472d
DEV: Move shouldLoadPluginTestJs() (#19045)
A first step in the effort to depend only on explicitly declared dependencies in package.json.
2022-11-16 11:07:58 +01:00
dependabot[bot]
b36c5e7565
bump eslint-plugin-qunit from 6.2.0 to 7.3.2 in /app/assets/javascripts (#18927)
---
updated-dependencies:
- dependency-name: eslint-plugin-qunit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 11:03:43 +01:00
David Taylor
b9b2e6a2e0
DEV: Convert user ...Categories computed props to getters/setters (#19018)
Some locations in the app were `.set`-ing these computed properties. This would trigger the `computed-property.override` Ember deprecation, and also lead to inconsistency between the `..._categories_ids` property and the `...Categories` property.

This commit updates these properties to have getters/setters, with all state being stored in the `..._ids` property. The `@dependentKeyCompat` decorator is used to ensure these 'autotracking' getters can still be used as dependent keys in other computed properties.
2022-11-16 10:00:57 +00:00
David Taylor
392bafcd7e
DEV: Add unique ids to deprecations (#19019)
This will improve the QUnit deprecation summaries introduced via 8c48285145
2022-11-16 10:00:39 +00:00
Jarek Radosz
25aa0bc10d
DEV: Deprecate create-store test helper (#19021)
Use the regular Store service instead.
2022-11-16 10:54:46 +01:00
Jarek Radosz
5b16546358
DEV: Refactor _warnCannotSeeMention() (#19042) 2022-11-16 10:33:47 +01:00
David Taylor
c78c5dd407
DEV: Improve discourse-common/deprecate implementation (take 2) (#19032)
- Count deprecations and print them to the console following QUnit runs
- In GitHub actions, write the same information as a job summary
- Add documentation to `discourse-common/lib/deprecated`
- Introduce `id` and `url` options to `deprecated`
- Introduce `withSilencedDeprecations` helper to allow testing deprecated code paths without making noise in the logs

This was previously reverted in 47035693b7.
2022-11-16 09:30:20 +00:00
Jarek Radosz
5c4a2d428a
DEV: Make the setupTests a regular import (#19046) 2022-11-16 16:11:18 +08:00
Jarek Radosz
4a49c22780
DEV: Make more dependencies explicit (#19047) 2022-11-16 16:10:58 +08:00
Krzysztof Kotlarek
87b297e76c
FIX: deprioritize reaction notifications (#19049)
Fix for https://github.com/discourse/discourse/pull/19029

Reactions should be moved down similarly to likes
2022-11-16 15:37:51 +11:00
Krzysztof Kotlarek
2e655f8311
FEATURE: deprioritize like notifications on all list (#19029)
On the all notifications list, likes should be deprioritized and marked as read.
2022-11-16 13:32:05 +11:00
dependabot[bot]
f1548c801e
Build(deps): Bump loader-utils in /app/assets/javascripts (#19044)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 23:57:28 +01:00
Kris
e071ba5d84
UX: move horiz nav margin to padding (#19041) 2022-11-15 17:05:43 -05:00
Bianca Nenciu
ac272c041e
FEATURE: Add user tips for post and topic features (#18964)
* DEV: Add utility to hide all user tips

* DEV: Add UserTip Glimmer component

* DEV: Add tests for existing user tips

* FEATURE: Add user tip for post menu

* FEATURE: Add user tip for topic notification level

* FEATURE: Add user tip for suggested topics

* FEATURE: Hide new popups for existing users
2022-11-15 17:36:08 +02:00
Kris
f90a8438e9
UX: force sidebar to occupy full height (#19035) 2022-11-15 09:37:00 -05:00
David Taylor
d123371cb9
DEV: Add discourse/tests to jsconfig (#19031)
This allows IDEs to resolve imports under `discourse/tests`
2022-11-15 11:33:56 +00:00
dependabot[bot]
cac0c6212b
Build(deps): Bump sass from 1.56.0 to 1.56.1 in /app/assets/javascripts (#19022)
Bumps [sass](https://github.com/sass/dart-sass) from 1.56.0 to 1.56.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.56.0...1.56.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 00:06:24 +01:00
dependabot[bot]
a210b698eb
Build(deps): Bump webpack in /app/assets/javascripts (#19027)
Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.75.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.74.0...v5.75.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 00:05:52 +01:00
David Taylor
338901d335
Revert "DEV: Improve discourse-common/deprecate implementation (#18987)" (#19028)
This reverts commit 8c48285145. This introduced a bug which could cause sites to break when certain deprecations are hit. We'll re-introduce a fixed version of this change in a future commit.
2022-11-15 09:32:01 +11:00
Blake Erickson
7be53b1588
FEATURE: Default Composer Category Site Setting (#18967)
* FEATURE: Default Composer Category Site Setting

- Create the default_composer_category site setting
- Replace general_category_id logic for auto selecting the composer
  category
- Prevent Uncategorized from being selected if not allowed
- Add default_composer_category option to seeded categories
- Create a migration to populate the default_composer_category site
  setting if there is a general_category_id populated
- Added some tests

* Add missing translation for the new site setting

* fix some js tests

* Just check that the header value is null
2022-11-14 11:09:57 -07:00
David Taylor
8c48285145
DEV: Improve discourse-common/deprecate implementation (#18987)
- Count deprecations and print them to the console following QUnit runs
- In GitHub actions, write the same information as a job summary
- Add documentation to `discourse-common/lib/deprecated`
- Introduce `id` and `url` options to `deprecated`
- Introduce `withSilencedDeprecations` helper to allow testing deprecated code paths without making noise in the logs
2022-11-14 17:05:16 +00:00
Joffrey JAFFEUX
6493ddce17
PERF: limits use of redis cache while building emojis list (#19013)
We were doing get on Redis two times for each emoji while building the custom/standard/all lists which where resulting in ~3710 Redis calls. Given the emoji DB file is loaded in memory while we build/cache the emojis list this is unnecessary and slow.

As a simplification in pseudo code here is an explanation of what we were doing:

```ruby
emojis.each |emoji_name|
  aliases = get_aliases_from_redis_cache(emoji_name)
  is_tonable = get_is_tonable_from_redis_cache(emoji_name)
  build_emoji(emoji_name, aliases, is_tonable)
end
```

The two redis calls are now simplified to a simple hash access: `@db[emoji_name]`
2022-11-14 13:38:50 +01:00
Jarek Radosz
2325bec3c9
DEV: Skip a flaky FF test (#18996)
On Firefox Evergreen this upload test often fails, because the order of uploads in markdown is somehow reversed.
2022-11-14 12:16:00 +01:00