Commit Graph

53827 Commits

Author SHA1 Message Date
Martin Brennan
380e5ca6cb
DEV: Move more service code to core (#26613)
This is to enable :array type attributes for Contract
attributes in services, this is a followup to the move
of services from chat to core here:

cab178a405

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-04-12 13:14:19 +02:00
Andrei Prigorshnev
a2db8d9439
DEV: Drop FoundUserWithStatusSerializer (#25884)
See dedf1a5e
2024-04-12 15:08:07 +04:00
Bianca Nenciu
38e1706b61
FIX: Update category breadcrumbs more reliably (#26608)
The breadcrumbs were updated everytime there were changes to the
categories which was not efficient and caused unnecessary rerendering
of the CategoryDrop elements when "lazy load categories" is enabled.

This commit also ensures that all category fields are serialized for
ancestors too for the categories#search endpoint.
2024-04-12 11:56:32 +03:00
Jarek Radosz
4d2dcdad9b
UX: Emoji aligment fixes, followup to #26491 (#26618) 2024-04-12 10:48:14 +02:00
Jarek Radosz
f296881703
FIX: Broken timeline back button title (#26604)
"[en.Go back to your last unread post]" ain't it 😉
2024-04-12 10:36:07 +02:00
Joffrey JAFFEUX
01a0f8298f
FIX: ensures reply is unlocking body scroll (#26616)
Prior to this fix we were calling the action before closing the menu which could cause various callbacks, like the enable body scroll one, to not be called as some actions will do: `chat.activeMessage = null;` causing the message actions menu to be instantly destroyed.
2024-04-12 10:01:53 +02:00
David Battersby
11eb4153fa
UX: prevent toasts from covering header (#26615)
This change prevents toast notifications from blocking the header and user navigation on both desktop and mobile.
2024-04-12 15:49:23 +08:00
David Battersby
2706f7ed74
DEV: set toast progress bar to false by default (#26614)
This change disables the toast notification progress bar by default. It can be enabled for a specific toast by setting showProgressBar: true.
2024-04-12 14:27:10 +08:00
Natalie Tay
18bb6b0871
DEV: Do not attempt to update polls if there are no polls before and after (#26573) 2024-04-12 13:16:10 +08:00
Martin Brennan
973a0028b4
FEATURE: Bulk topic tagging allowing restricted operations on sole categories (#26602)
The bulk actions menu for topics has multiple options to work
with tags on topics (append, replace, remove). Our tagging system
along with categories allows for some complicated tag restrictions
to be applied via tag groups. This was a problem for the topic bulk
actions because you couldn't append restricted tags to topics.

This commit allows restricted tags to be used in bulk tagging actions
as long as all selected topics are for a sole category. The category
information will be shown in the modal, and the category ID is used
for the tag search.
2024-04-12 13:10:14 +10:00
dependabot[bot]
a96367e56a
Build(deps-dev): Bump rubocop-rspec_rails from 2.28.2 to 2.28.3 (#26611)
Bumps [rubocop-rspec_rails](https://github.com/rubocop/rubocop-rspec_rails) from 2.28.2 to 2.28.3.
- [Release notes](https://github.com/rubocop/rubocop-rspec_rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec_rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec_rails/compare/v2.28.2...v2.28.3)

---
updated-dependencies:
- dependency-name: rubocop-rspec_rails
  dependency-type: indirect
  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-12 01:29:00 +02:00
dependabot[bot]
b677d72b9f
Build(deps-dev): Bump puppeteer-core from 22.6.3 to 22.6.4 (#26610)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 22.6.3 to 22.6.4.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v22.6.3...puppeteer-core-v22.6.4)

---
updated-dependencies:
- dependency-name: puppeteer-core
  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-12 00:37:39 +02:00
Blake Erickson
334a2f216f
FEATURE: User Notifications Links Page (#26609) 2024-04-11 15:54:28 -06:00
Daniel Waterworth
cead0cf684
DEV: Remove Category.findById from admin web hooks (#26605)
Include categories when fetching admin/web_hooks and make
'extras' more useful. 'extras' is the mechanism we use to provide
context for rest objects.

However, previously:

 * When you fetched many objects, extras was only set on the ResultSet,
   not on each object,

 * If you need derived data from extras, there wasn't a sensible place to
   put this code. Now, you can create an 'ExtrasClass' static field on
   your rest model and this class will be used for your extras data,
2024-04-11 16:11:00 -05:00
Andrei Prigorshnev
463eff2bbf
DEV: Drop user_id from chat_mentions (#25022)
This column is ignored since 62f423d
2024-04-11 18:50:29 +04:00
Andrei Prigorshnev
8b147b7f84
DEV: Drop chat_mention.notification_id column (#24800)
We ignore this column since fbd24fa
2024-04-11 17:15:57 +04:00
Joffrey JAFFEUX
af7d44971d
DEV: correctly check for latest (#26603)
This was not testing the right path, and was still green most of the times because we were not waiting for channels to be preloaded in this case.
2024-04-11 14:23:07 +02:00
Gerhard Schlager
4d045bfc61
DEV: Import script should insert more data into user_stats table (#26551)
This SQL tries to insert as much data as possible into the `user_stats` table by either calculating or by approximating stats based on existing. It also fixes an error in the calculation of `reply_count`which mistakenly contained all posts, not just replies.

This change also disables some steps in the `import:ensure_consistency` rake task by setting the `SKIP_USER_STATS` env variable. Otherwise, the rake task will overwrite the calculated data in the `user_stats` table with inaccurate data. I'm not changing or removing the logic from the rake task yet because other bulk import scripts seem to depend on it.
2024-04-11 14:05:21 +02:00
dependabot[bot]
4f2b44ba9f
Build(deps-dev): Bump the embroider group with 4 updates (#26595)
Bumps the embroider group with 4 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat), [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core), [@embroider/macros](https://github.com/embroider-build/embroider/tree/HEAD/packages/macros) and [@embroider/webpack](https://github.com/embroider-build/embroider/tree/HEAD/packages/webpack).


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

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

Updates `@embroider/macros` from 1.15.0 to 1.15.1
- [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.2 to 3.2.3
- [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/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-patch
  dependency-group: embroider
- dependency-name: "@embroider/webpack"
  dependency-type: direct:development
  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-04-11 09:28:38 +02:00
dependabot[bot]
c59ace2aab
Build(deps-dev): Bump mocha from 2.1.0 to 2.2.0 (#26594)
Bumps [mocha](https://github.com/freerange/mocha) from 2.1.0 to 2.2.0.
- [Changelog](https://github.com/freerange/mocha/blob/main/RELEASE.md)
- [Commits](https://github.com/freerange/mocha/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: mocha
  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-04-11 15:05:40 +08:00
dependabot[bot]
0f97bea113
Build(deps-dev): Bump lefthook from 1.6.9 to 1.6.10 (#26596)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.6.9 to 1.6.10.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
- [Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evilmartians/lefthook/compare/v1.6.9...v1.6.10)

---
updated-dependencies:
- dependency-name: lefthook
  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-11 15:05:28 +08:00
dependabot[bot]
087eba9e20
Build(deps-dev): Bump typescript from 5.4.4 to 5.4.5 (#26597)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.4 to 5.4.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.4...v5.4.5)

---
updated-dependencies:
- dependency-name: typescript
  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-11 15:05:15 +08:00
dependabot[bot]
cce9671cd0
Build(deps-dev): Bump rubocop from 1.63.0 to 1.63.1 (#26598)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.63.0 to 1.63.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.63.0...v1.63.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: indirect
  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-11 15:05:02 +08:00
dependabot[bot]
e25838a1bd
Build(deps): Bump nokogiri from 1.16.3 to 1.16.4 (#26599)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.3 to 1.16.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.16.3...v1.16.4)

---
updated-dependencies:
- dependency-name: nokogiri
  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-11 15:04:47 +08:00
Alan Guo Xiang Tan
f095494936
UX: Improve the identifier for categories typed prop in theme objects editor (#26600)
This commit changes the identifier displayed in the navigation tree of
the theme objects editor from the generic "category 1" to "<category
name>, <category 2 name>" when a property of typed categories is set as
the identifier.

Example:

For the following theme objects schema:

```
some_setting:
  type: objects
  default: []
  schema:
    name: <some scheme name>
    identifier: list_of_categories
    properties:
      list_of_categories:
        type: categories
```

If the `list_of_categories` property's value has been set to `category
1` and `category 2`, the navigation tree will display `category 1,
category 2` as the text to represent the object in the navigation tree.
2024-04-11 13:00:07 +08:00
Jan Cernik
389018c0cb
DEV: Fix flaky test when moving threads (#26590) 2024-04-10 22:10:35 -03:00
Joffrey JAFFEUX
d1cdac0e70
FIX: only allows kbd and not details 2024-04-11 00:13:58 +02:00
Joffrey JAFFEUX
107015ff4b
DEV: allows chat to render specific html tags (#26591)
This commit adds two custom markdown rules:
- chat-html-block
- chat-html-inline

For now it only allows `<kbd>` for inline and `<details>` for block.
2024-04-10 21:23:23 +02:00
Vinoth Kannan
9d88f80f26
UX: make first admin a moderator to review user approvals. (#26588)
Previously, when the new site was created and after the first admin login, no one will receive notifications to review the user approval queue since only the moderators would receive the PMs about it. Also, this PR will change the "pending_users_reminder_delay_minutes" site setting to 5 minutes while the site is in bootstrap mode.
2024-04-10 20:59:03 +05:30
Bianca Nenciu
8ce836c039
FIX: Load categories with user activity and drafts (#26553)
When lazy load categories is enabled, categories should be loaded with
user activity items and drafts because the categories may not be
preloaded on the client side.
2024-04-10 17:35:42 +03:00
David Taylor
3733db866c
DEV: Introduce default 'auto' mode for glimmer header (#26467)
This will automatically enable the glimmer header when all installed themes/plugins are ready. This replaces the old group-based site setting.

In 'auto' mode, we check for calls to deprecated APIs (e.g. decorateWidget) which affect the old header. If any are present, we stick to the old header implementation and print a message to the console alongside the normal deprecation messages.

To override this automatic behavior, a new `glimmer_header_mode` site setting can be set to 'disabled' or 'enabled'.

This change also means that our test suite is running with the glimmer header. This unveiled a couple of small issues (e.g. some incorrect `aria-*` and `alt` text) which are now fixed. A number of selectors had to be updated to ensure the tests were clicking the actual `<button>` elements rather than the surrounding `<li>` elements.
2024-04-10 14:35:54 +01:00
Arpit Jalan
5d0471ebe4
FEATURE: add new plugin outlet 'after-header' (#26587)
* FEATURE: add new plugin outlet 'after-header'

* Add to widget version

* fix linting

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2024-04-10 16:26:57 +05:30
Isaac Janzen
f8dd468caa
DEV: Update headerIcons API (#26090)
- Remove panelPortal usage, which allowed for content to be added as a dropdown
- Instead rely on float-kit's DMenu to render a dropdown
2024-04-10 11:37:37 +01:00
Régis Hanol
8509fc2ebc DEV: refactor (composer|d)-editor.js
This started as a way to prevent "previewUpdated" from doing the same work twice when morphing.

Ended up refactoring "previewUpdated" and extracted into 5 distinct methods for clearer understanding and more consistent debouncing (using the "@debounce" decorator instead of the "discourseDebounce" method).

No "feature" was changed, other than not doing the "decorateCookedElement" when morphing is enabled, since we already did it _before_ morphing.
2024-04-10 10:36:20 +02:00
Régis Hanol
4b043a2a82 DEV: refactor morphed preview specs 2024-04-10 10:36:20 +02:00
Régis Hanol
84d4dca4ab FIX: morph after all the "decorateCookedElement"
A lot of plugins are using "api.decorateCookedElement" to decorate the cooked preview.

Some of those plugins, like the "image-grid" ([grid]...[/grid]), changes the DOM. We have to call them _before_ morphing otherwise, there's no real point in morphing the preview.

The missing piece was triggering the "decorate-non-stream-cooked-element" application event.
2024-04-10 10:36:20 +02:00
Régis Hanol
db77803ca3 DEV: refactor column.js 2024-04-10 10:36:20 +02:00
Martin Brennan
b7a2d29b7b
DEV: Introduce post_should_secure_uploads? plugin modifier (#26508)
This modifier allows plugins to alter the outcome of
`should_secure_uploads?` on a Post record, for cases when
plugins need post-attached uploads to always be secure (or
not secure) in specific scenarios.
2024-04-10 12:02:44 +10:00
Jarek Radosz
98ec4af327
FIX: Add the ident to fix user status styling in posts (#26585) 2024-04-10 01:44:37 +02:00
dependabot[bot]
cac21677ee
Build(deps-dev): Bump lefthook from 1.6.8 to 1.6.9 (#26584)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.6.8 to 1.6.9.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
- [Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evilmartians/lefthook/compare/v1.6.8...v1.6.9)

---
updated-dependencies:
- dependency-name: lefthook
  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-10 01:35:23 +02:00
dependabot[bot]
f687d91b99
Build(deps-dev): Bump qunit-dom from 3.1.0 to 3.1.1 (#26583)
Bumps [qunit-dom](https://github.com/mainmatter/qunit-dom) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/mainmatter/qunit-dom/releases)
- [Commits](https://github.com/mainmatter/qunit-dom/compare/v3.1.0...v3.1.1)

---
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-10 01:34:49 +02:00
dependabot[bot]
3b85ae89c6
Build(deps-dev): Bump babel-import-util from 2.0.1 to 2.0.2 (#26582)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from 2.0.1 to 2.0.2.
- [Commits](https://github.com/ef4/babel-import-util/compare/v2.0.1...v2.0.2)

---
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-10 01:34:35 +02:00
Jarek Radosz
54cc0a0304
FIX: Nested list checkboxes css (#26581)
regressed in 6cf7447cb9
2024-04-10 00:28:23 +02:00
Penar Musaraj
a52b1d6b4a
FIX: Let users reset their homepage choice if custom homepage is from… (#26536)
Co-authored-by: Régis Hanol <regis@hanol.fr>
2024-04-09 15:54:44 -04:00
Ella E
002ff94ded
UX: Display JIT when user list is empty (#26579)
* UX: Display JIT when user list is empty

* UX: Remove empty state heading

* DEV: add spacing by enclosing empty state body in <p> tag
2024-04-09 13:52:21 -06:00
Blake Erickson
72ac675e4e
FEATURE: Consolidate link notifications (#26567)
Just like we have for consolidating likes this adds similar
functionality for consolidating links.
2024-04-09 11:53:37 -06:00
Discourse Translator Bot
7f802e9c42
Update translations (#26575) 2024-04-09 18:48:44 +02:00
Jarek Radosz
d16bc06b66
UX: Fix user menu ellipsis color (#26578) 2024-04-09 17:20:26 +02:00
Jarek Radosz
6cf7447cb9
UX: Tweak the checklist plugin css (#26577)
Fixes alignment of checboxes in posts. Removes unused styles.
2024-04-09 16:00:26 +02:00
Jarek Radosz
f5c9e75438
UX: Fix alignment issues around user status (#26491)
Minor changes but they 1. correct the html structure (no divs in spans) 2. unify the margins
2024-04-09 11:10:12 +02:00