Commit Graph

32105 Commits

Author SHA1 Message Date
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
Sam
1c67917367
FIX: disable storing invalid post and topic timing when sent from client (#26683)
This ensures we only ever store correct post and topic timing when the client
notifies.

Previous to this change we would blindly trust the client.

Additionally this has error correction code that will correct the last seen
post number when you visit a topic with incorrect timings.
2024-04-19 18:10:50 +10: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
Joffrey JAFFEUX
09311c7dab
DEV: minimum fabricators for post/topic (#26671)
I will add new default properties as needed in the future, but for now this is enough to have an entry point.
2024-04-18 09:54:23 +02:00
Martin Brennan
99d22c85ae
FEATURE: Make admin sidebar keywords translateable (#26657)
This commit ensures that additional keywords for admin
sidebar links (which are also stored in the admin sidebar state
manager) are translated with I18n, which was discussed
in https://meta.discourse.org/t/introducing-experimental-admin-sidebar-navigation/289281/58?u=martin

This also changes the admin sidebar state manager keywords to
not be a TrackedObject -- this is not necessary as keywords are
only set once, and it was causing rendering issues because
the keywords were being set at the same time they were read.

Finally this adds a "theme" keyword to the "Components" link
because we often refer to components as Theme Components

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-04-18 16:14:11 +10:00
Ted Johansson
f3cad5f3a2
FIX: Correctly re-attach allowed images in activity summary e-mail (#26642)
For e-mails, secure uploads redacts all secure images, and later uses the access control post to re-attached allowed ones. We pass the ID of this post through the X-Discourse-Post-Id header. As the name suggests, this assumes there's only ever one access control post. This is not true for activity summary e-mails, as they summarize across posts.

This adds a new header, X-Discourse-Post-Ids, which is used the same way as the old header, but also works for the case where an e-mail is associated with multiple posts.
2024-04-18 10:27:46 +08:00
Kelv
edbd44e737
DEV: replace transformed-post POJO with topic model in topic-map components (#26629)
* DEV: replace postAttrs dependencies in topic-map component by passing in topicDetails and postStream to topic-map to ensure state changes are passed properly down to child components
2024-04-18 10:04:38 +08:00
Krzysztof Kotlarek
c5dd50aa02
FIX: don't purge users who were deactivated by the system (#26656)
In a previous PR, we skipped users deactivated by admins from being automatically purged - https://github.com/discourse/discourse/pull/26478.

However, users deactivated by `discourse-auto-deactivate` plugin are deactivated by the system user. Those users should not be purged as well.

https://github.com/discourse/discourse-auto-deactivate/blob/main/plugin.rb#L62
2024-04-18 09:53:43 +10:00
Krzysztof Kotlarek
98fc614162
FEATURE: mandatory fields for group site setting (#26612)
Automatically add `moderators` and `admins` auto groups to specific site settings.

In the new group-based permissions systems, we just want to check the user’s groups since it more accurately reflects reality

Affected settings:
- tag_topic_allowed_groups
- create_tag_allowed_groups
- send_email_messages_allowed_groups
- personal_message_enabled_groups
- here_mention_allowed_groups
- approve_unless_allowed_groups
- approve_new_topics_unless_allowed_groups
- skip_review_media_groups
- email_in_allowed_groups
- create_topic_allowed_groups
- edit_wiki_post_allowed_groups
- edit_post_allowed_groups
- self_wiki_allowed_groups
- flag_post_allowed_groups
- post_links_allowed_groups
- embedded_media_post_allowed_groups
- profile_background_allowed_groups
- user_card_background_allowed_groups
- invite_allowed_groups
- ignore_allowed_groups
- user_api_key_allowed_groups
2024-04-18 08:53:52 +10:00
Kris
1dbceb1a70
UX: when reopening collapsed composer, reset height (#26661) 2024-04-17 17:28:18 -04:00
Jarek Radosz
84efa66cc1
DEV: Apply flex-direction: column on .d-header (#26658)
This doesn't change anything in 99.9% of cases - by default d-header has only one child element `.wrap`.

There are only two themes that I'm aware of that add another child:
1. discourse-categories-navbar - which I'm currently updating to use the new header APIs, and where the column layout makes more sense
2. a private theme, which was recently updated to use those APIs and that works around the current layout by applying `flex-wrap: wrap` to d-header (I'll remove that override as it conflicts with this change)
2024-04-17 23:00:55 +02:00
Daniel Waterworth
7ce5eac235
FIX: Don't put non-category in Site.categories (#26664) 2024-04-17 15:54:34 -05:00
Bianca Nenciu
6281f5d768
DEV: Merge two similar category serializers (#26653)
CategoryBadgeSerializer and TopicCategorySerializer are too similar and
are used in similar contexts. This commit merges the two into a single
CategoryBadgeSerializer.
2024-04-17 18:52:34 +03:00
Bianca Nenciu
9638ce17fa
FIX: Serialize categories for bookmarks (#26606)
This is necessary when "lazy load categories" feature is enabled to make
sure the categories are rendered for topics and posts.
2024-04-17 17:23:47 +03:00
Bianca Nenciu
c9a46cfdda
FIX: Use ILIKE for searching categories (#26619)
Full text search does not return ideal results for category dropdown.
Usually, in category dropdowns we want to search for categories as we
type. For example, while typing "theme", the dropdown should show
intermediary results for "t", "th", "the", "them" and finally "theme".
For some of these substrings (like "the"), full text search does not
return any results, which leads to an unpleasant user experience.
2024-04-17 17:20:25 +03:00
David Taylor
840ac6bd0a
DEV: Avoid using @tracked as a decorator in RenderGlimmer object literal
Decorators in object literals are non-standard, and we're working to remove them.
2024-04-17 15:19:23 +01:00
Joffrey JAFFEUX
552859b0ff
DEV: converts discard-draft modal to gjs (#26637) 2024-04-17 13:11:50 +02:00
Krzysztof Kotlarek
df373d90fe
FEATURE: direct link to components for admin sidebar (#26644)
To add a components link to the sidebar refactoring was required to create unique URLs for themes and components. Before the query param was used. After changes, we have two URLs `/admin/customize/themes` and `/admin/customize/components`.
2024-04-17 11:45:59 +10:00
Daniel Waterworth
56c4804440
DEV: Always pass ancestors to category-link (#26638)
We want to remove uses of Category.findById. This change pushes the fetching up the chain of responsibility.
2024-04-16 15:28:36 -05:00
dependabot[bot]
57d29b6f3b
Build(deps-dev): Bump ember-cli from 5.7.0 to 5.8.0 (#26641)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 5.7.0 to 5.8.0.
- [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.7.0...v5.8.0)

---
updated-dependencies:
- dependency-name: ember-cli
  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-16 17:42:33 +01:00
Joffrey JAFFEUX
4f7cd7b78e
FIX: correctly unshrink composer when re-editing post (#26650)
Prior to this fix we were manually expanding the composer but not setting the correct height. This commit adds a new `unshrink` function on the composer service to correctly set the state and the height on the composer model.
2024-04-16 14:49:51 +02:00
Joffrey JAFFEUX
8fbdce36a4
FIX: prevents open to happen too early (#26649)
In discourse-assign the assign menu in the modal is using this `expandedOnInsert` option and  was sometimes not opening correctly resulting in a broken state until you click two times on it. This should prevent this issue.
2024-04-16 13:58:06 +02:00
Jarek Radosz
99391277d4
DEV: Remove an unused hbr template (#26620) 2024-04-16 12:58:18 +02:00
David Taylor
1be488e4fb
DEV: Consolidate message-bus ajax implementation (#26646)
Previously it was split across multiple functions, and had multiple logic branches. This commit consolidates it into a single `mbAjax` function
2024-04-16 11:16:04 +01:00
Natalie Tay
1fea2bf1c5
FEATURE: Merge user associated accounts, favouring the target user upon conflict (#26645) 2024-04-16 17:37:33 +08:00
Joffrey JAFFEUX
bbe62d88d2
FIX: prevents showing discard modal on re-edit (#26639)
This commit will now change two behaviors:

- If composer is already opened on a specific post and we click on edit again for the same post, we will do nothing and not show the discard draft modal
- if composer is shrinked and we click on edit for the same currently edited post, we will just open the composer and not show the discard draft modal
2024-04-16 10:34:32 +02:00
Martin Brennan
7a083daf27
Revert "FIX: Post uploads setting access_control_post_id unnecessarily (#26627)" (#26643)
This reverts commit cdc8e9de1b.

It's made things worse internally and on meta.
2024-04-16 14:10:25 +10:00
Martin Brennan
cdc8e9de1b
FIX: Post uploads setting access_control_post_id unnecessarily (#26627)
This commit addresses an issue for sites where secure_uploads
is turned on after the site has been operating without it for
some time.

When uploads are linked when they are used inside a post,
we were setting the access_control_post_id unconditionally
if it was NULL to that post ID and secure_uploads was true.

However this causes issues if an upload has been used in a
few different places, especially if a post was previously
used in a PM and marked secure, so we end up with a case of
the upload using a public post for its access control, which
causes URLs to not use the /secure-uploads/ path in the post,
breaking things like image uploads.

We should only set the access_control_post_id if the post is the first time the
upload is referenced so it cannot hijack uploads from other places.
2024-04-16 10:37:57 +10:00
dependabot[bot]
f8d6d58658
Build(deps-dev): Bump sass from 1.74.1 to 1.75.0 (#26625)
Bumps [sass](https://github.com/sass/dart-sass) from 1.74.1 to 1.75.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.74.1...1.75.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-04-16 00:28:46 +02:00
Blake Erickson
9338a9f2dc
DEV: Update constants (#26580)
I needed to run `rake javascript:update_constants` for my previous
commit: 72ac675e4e

The change in this commit though was completely unrelated, so I saved it
for it's own commit.
2024-04-15 15:17:45 -06:00
Martin Brennan
8640d3c82d
FIX: Wait for bookmark save before allowing menu button click (#26626)
This fixes a timing issue where, if a user (or the CI) was
on a slow network connection, clicking one of the bookmark
menu options would cause an error because we hadn't yet received
the response from the server after creating the bookmark.

It should be very smooth most of the times because (paraphrasing j.jaffeux):

a) Most likely when user clicks it’s already saved
b) If it’s not saved when user clicks, it should already be almost done so
   the perceived wait when click the reminder option should be rather short
2024-04-15 14:45:11 +02:00
Joffrey JAFFEUX
326da84373
FIX: deleting a groups was throwing an error (#26623) 2024-04-15 08:35:50 +02:00
Penar Musaraj
8f52fd1051
FIX: Ensure invalid timezone does not block critical emails (#26607)
See https://meta.discourse.org/t/invalid-user-timezone-jams-up-their-mail/303306

This ensures that "account silenced" and "account suspended" emails don't
fail to send if the user has an invalid timezone.
2024-04-12 10:53:44 -04: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
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
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
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
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
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
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
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]
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
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
Jarek Radosz
d16bc06b66
UX: Fix user menu ellipsis color (#26578) 2024-04-09 17:20: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
David Taylor
a601813a6c
DEV: Drop unused shims for Ember 3 deprecations (#26563)
These deprecation shims are no-ops under Ember 5.
2024-04-09 09:22:37 +01:00
David Taylor
2a5d4ede6d
DEV: Set samesite=lax on cookies set by client-side (#26559)
Chrome's default is already Lax, so this change is a no-op there.

Firefox will soon be follow them, and has started warning about cookies with no samesite attribute. That's the motivation for this commit.
2024-04-09 09:22:20 +01:00
Martin Brennan
d7f7915558
FIX: Bookmark clock icon not showing (#26572)
When choosing the "Custom..." option in the new bookmark
menu and then choosing a date + time in the modal for the
reminder, the bookmark icon on the post was not updating to
show the one with the clock to indicate the reminder.

This was just a data syncing issue between BookmarkFormData
and what the modal sets. Ideally all this would be refactored
because the data flow is messy...but hard to find time for
that right now.

Followup 67a8080e33
2024-04-09 16:14:59 +10:00
Alan Guo Xiang Tan
e2ced85757
DEV: Allow enum typed theme objects property to be optional (#26571)
This commit changes enum typed theme objects property to be optional.
Previously, an enum typed property is always required but we have found
that this might not be ideal so we want to change it.
2024-04-09 11:26:24 +08:00
Martin Brennan
0d0dbd391a
DEV: Rename with_secure_uploads? to should_secure_uploads? on Post (#26549)
This method name is a bit confusing; with_secure_uploads implies
it may return a block or something with the uploads of the post,
and has_secure_uploads implies that it's checking whether the post
is linked to any secure uploads.

should_secure_uploads? communicates the true intent of this method --
which is to say whether uploads attached to this post should be
secure or not.
2024-04-09 13:23:11 +10:00
Krzysztof Kotlarek
0085365459
FEATURE: confirmation when a public section is updated (#26546)
Display additional confirmation when:
- The public section is going to be updated;
- The public section is going to be deleted;
- The public section is going to be marked as private.
2024-04-09 09:58:30 +10:00
dependabot[bot]
a68bea26ce
Build(deps): Bump @glimmer/syntax from 0.91.2 to 0.92.0 (#26570)
Bumps [@glimmer/syntax](https://github.com/glimmerjs/glimmer-vm) from 0.91.2 to 0.92.0.
- [Release notes](https://github.com/glimmerjs/glimmer-vm/releases)
- [Changelog](https://github.com/glimmerjs/glimmer-vm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/glimmerjs/glimmer-vm/compare/v0.91.2...v0.92.0)

---
updated-dependencies:
- dependency-name: "@glimmer/syntax"
  dependency-type: direct:production
  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-09 01:15:12 +02:00
dependabot[bot]
80479fc23f
Build(deps-dev): Bump qunit-dom from 3.0.0 to 3.1.0 (#26569)
Bumps [qunit-dom](https://github.com/mainmatter/qunit-dom) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/mainmatter/qunit-dom/releases)
- [Commits](https://github.com/mainmatter/qunit-dom/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: qunit-dom
  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-09 01:15:03 +02:00
chapoi
fb41fccb20
UX: new default border radius (#26560)
* UX: remove border radius from PMs

* UX: add default 2px border radius
2024-04-08 22:21:57 +02:00
David Taylor
4712e8b035
DEV: Convert discourse-hbr to a regular package (#26562)
No need for this to be an ember addon. All we do is import `discourse-hbr/raw-handlebars-compiler` in a node environment.
2024-04-08 20:00:34 +01:00
Joffrey JAFFEUX
1060e4573a
DEV: allows fabricators to use faker (#26555)
The complexity of the situation is that we don't want to load faker into production by default but fabricators and styleguide are available on production.

This is made possible through app/assets/javascripts/discourse/app/lib/load-faker.js which contains a function to ensure faker is loaded asynchronously (loadFaker) and another function to access the loaded faker (getLoadedFaker).

Note 1: this commit also refactors fabricators to have access to context and use faker where possible
Note 2: this commit moves automation to admin bundle

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2024-04-08 21:00:09 +02:00
David Taylor
1801e3d64c
DEV: Rename 'bootstrap-json' addon to 'custom-proxy' (#26561)
It was originally named bootstrap-json because it contacted a 'bootstrap' API in rails to generate the ember-cli html response. However, it has since been overhauled to remove that 'bootstrap' system. Now it is a much simpler proxy server which transforms the HTML sent by Rails.
2024-04-08 19:53:02 +01:00
Jarek Radosz
8080ced95b
DEV: Remove unused code (#26556)
Left over from e3cfb1967d
2024-04-08 16:10:42 +02:00
Jarek Radosz
32e0a0a0d3
DEV: De-jQ click-interceptor (#26515)
Co-authored-by: David Taylor <david@taylorhq.com>
2024-04-08 13:38:46 +02:00
Bianca Nenciu
6c2c1a43ae
FIX: Load categories with post revisions (#26496)
When lazy load categories is enabled, categories should be loaded with
post revisions because the categories may not be preloaded on the client
side.
2024-04-08 11:33:33 +03:00
Joffrey JAFFEUX
bd7823cc70
FIX: prevents mobile DMenu modal to lock scroll (#26550)
The bug was due to the fact that the `<DModal />` is displayed inside a if block, when the condition was false to close the menu, the modal was just hidden without calling callbacks. The fix ensures we are correctly calling `modal.close()` before in this case.
2024-04-08 09:47:50 +02:00
Joffrey JAFFEUX
17c92b4b2a
UX: shows the bookmark menu improvements
This commit adds a new option `@modalForMobile` for `<DMenu />` which allows to display a `<DModal />` when expanding a menu on mobile.

This commit also adds a `@views` options to toasts which is an array accepting `['mobile',  'desktop']` and will control if the toast is show on desktop and/or mobile.

Finally this commit allows to hide the progressBar even if the toast is set to `@autoClose=true`. This is controlled through the `@showProgressBar` option.
2024-04-08 08:18:50 +02:00
Martin Brennan
fb5ae16630
FIX: Do not show edit sections button on admin sidebar (#26547)
Sections cannot be created or edited or deleted in
the admin sidebar. Also move the footer component into
a gjs file.
2024-04-08 15:21:24 +10:00
Alan Guo Xiang Tan
fbfeb5d6d0
DEV: Remove unused /u/<:username>/preferences/categories route (#26548)
This commmit removes the unused `/u/:username/preferences/categories`
route which was merged into the `/u/:username/preferences/tracking`
route in 2fc2d7d828.
2024-04-08 12:59:48 +08:00
dependabot[bot]
b4942b77b3
Build(deps): Bump @glimmer/syntax from 0.91.1 to 0.91.2 (#26541)
Bumps [@glimmer/syntax](https://github.com/glimmerjs/glimmer-vm) from 0.91.1 to 0.91.2.
- [Release notes](https://github.com/glimmerjs/glimmer-vm/releases)
- [Changelog](https://github.com/glimmerjs/glimmer-vm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/glimmerjs/glimmer-vm/compare/v0.91.1...v0.91.2)

---
updated-dependencies:
- dependency-name: "@glimmer/syntax"
  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-08 07:02:51 +08:00
Blake Erickson
8da49b5664
FEATURE: Add message to bulk close topics (#26535)
This will allow you to type a single message when bulk closing topics
that will be applied to every topic, that way they all have the same
message.
2024-04-05 14:56:52 -06:00
Jarek Radosz
570e3f7a1a
UX: Tweak the mention padding (#26492)
…to prevent them from overlapping/touching when placed on consecutive lines of text
2024-04-05 22:23:37 +02:00
Daniel Waterworth
cafdc29806
DEV: Replace Category.findById with Category.asyncFindByIds in easy cases (#26270) 2024-04-05 11:59:10 -05:00
David Taylor
1df97e86c1
DEV: Introduce faker.js for use in tests & styleguide (#26533)
Available as a normal synchronous module in tests
Available as an async import in core, or via the `loadFaker` helper in themes/plugins (which cannot use async import directly)
2024-04-05 16:57:17 +01:00
Sérgio Saquetim
175d2451a9
DEV: Add topic_embed_import_create_args plugin modifier (#26527)
* DEV: Add `topic_embed_import_create_args` plugin modifier

This modifier allows a plugin to change the arguments used when creating
 a new topic for an imported article.

For example: let's say you want to prepend "Imported: " to the title of
every imported topic. You could use this modifier like so:

```ruby
# In your plugin's code
plugin.register_modifier(:topic_embed_import_create_args) do |args|
  args[:title] = "Imported: #{args[:title]}"
  args
end
```

In this example, the modifier is prepending "Imported: " to the `title` in the `create_args` hash. This modified title would then be used when the new topic is created.
2024-04-05 12:37:53 -03:00
Mark VanLandingham
552203aa1d
DEV: Add appEvents for composer / DEditor toolbar events (#26517) 2024-04-05 08:35:25 -05:00
David Battersby
f75d119cd3
FEATURE: add progress bar to toast notifications (#26483)
This change adds a progress bar to toast notifications when autoClose is enabled (true by default).

The progress bar allows users to visually see how long is left before the notification disappears.

When hovered on desktop, the progress and autoclose timer will be paused, it will resume again once the mouse is moved away from the toast notification.
2024-04-05 18:29:11 +08:00
Jean
38d39b6c34
FIX: update topic property access in raw topic-status view (#26528) 2024-04-05 03:07:22 -04:00
Bianca Nenciu
19eb0a7055
FIX: Load category info for about page (#26519) 2024-04-05 09:38:54 +03:00