Before this change, users were able to see their own whispers even if
they are no longer in the groups specified by the `whispers_allowed_groups` site setting.
This commit fixes that by disallowing users to see their own whispers if
they are no longer part of any `whispers_allowed_groups`.
...so I can override it in a customer plugin.
The goal here is to be able to create the same user data export but
provide the results by uploading to an s3 bucket instead of sending a PM
to the user.
This PR allows `bypass_time_window` to be passed to the
`SendPushNotification` job, to continue sending a PN, even if the user
has been active recently.
Previously, there was no way to edit post localizations, so the
`post.raw` was always returning the localized value. With localization
UI and endpoints now, we want to always return the original raw and the
composer to reflect the original value.
https://github.com/discourse/discourse/pull/33184 will handle the
decision to show the post edit composer or the post localization
composer.
Also fix some issues in the source, wasn't returning a promise
with the early return.
Saw this in the CI log failures:
> ℹ️ Hint: when the assertion failed, the Ember runloop was not in a
settled state. Maybe you missed an `await` further up the test? Or maybe
you need to manually add `await settled()` before your assertion?
(hasPendingTimers, hasRunLoop, isRenderPending)
This commit moves the humanization of site setting names from the client
side to the server side, since this is becoming more widely used and
will be useful for specs to be able to access the same humanized name
formatting without duplicating the logic on the server.
There are only a couple of places in the admin UI that we send this
down in the JSON, the `site.sitSettings` object does not include these
humanized names as they are not needed.
Followup fb7fa2902cf685ee9d4002e5448b4817f2dbef98,
prevent opening the chat channel selector with Ctrl/Meta+K
in any inputs except the chat composer, most of the time you
do not want this, but especially in the topic composer.
In that case, you want the link insert modal to open.
Before this change, topics with a hidden OP were still visible, we only
checked if all posts were hidden to change visibility of the topic.
With this change, if the OP is flagged and is hidden the topic will also
be hidden.
---------
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
All the way back in bc52bdfa1280ba08e6fb1931c26e18aa7fee9f7f we changed
the definition of new_user_posting_on_first_day? to return true if the
user was TL0 unconditionally. However this changes the logic of
the method, and essentially makes it "lie". Yes TL0 may be considered
a new user in other places, but in this method specifically we want
to check it's their "first day" of posting, not just that they are TL0.
The intent per these commits:
* 487c20959c874666db726d69c00abe139ba1aeab
* 5aa1272f05fc0de0b08577707d3370d10fafdd51
* 9834d1150300de26ffc35cb6af9a3ac91666e216
Was consider any user < TL2 who hadn't made their first post yet
as a new user posting on their first day. If they had made a post
>= 24 hours ago, they were no longer considered a new user posting
on their first day.
This commit restores that logic and also cleans up the spec and
guardian check to be clearer.
This PR introduces explicit state management for decorators as part of
the quote controls refactor. The legacy quote controls logic has been
migrated to a new Glimmer component, and state handling for decorator
functions associated with post content rendering is now formalized and
standardized.
### Key Points
- **Decorator State Introduction:**
- Introduces explicit state objects for use within post and cooked-html
decorators, replacing previous ad-hoc or implicit state tracking.
- Uses `TrackedMap` for state management, improving reactivity and
ensuring consistent, predictable updates when decorator state changes.
- **Component Refactor:**
- The quote controls logic is now fully encapsulated in a Glimmer
component, leveraging the new decorator state handling for cleaner, more
maintainable code.
- Legacy implementations have been removed to reduce technical debt.
- **Context and Data Handling:**
- Decorators and components now receive state and context as explicit
parameters, standardizing the interface and improving code readability.
- Direct properties (such as `post`, `highlightTerm`, and
`ignoredUsers`) replace the previous `data` object, simplifying context
management.
- **Other Improvements:**
- Enhanced error handling for async content.
- Improved extensibility by supporting custom wrapper elements in quoted
content.
- Added functionality to highlight original quoted text.
---------
Co-authored-by: David Taylor <david@taylorhq.com>
## 🔍 Overview
This update fixes a few issues related to keyboard shortcuts from the
toolbar API and the textarea text manipulation:
- it converts the keymap return value from `itsatrap` format to
`ProseMirror` format so that the default is prevented, thus allowing for
custom keyboard shortcuts to work inside the editor without triggering
system defaults.
- pushes a fix where the keyboard shortcut could get triggered even when
the `condition` value returned `false` whenever it had a custom
shortcut.
- fixes an issue in the markdown textarea editor where selecting text
and tabbing works but also focuses the next element
This PR relates to the locale setting in the composer and fixes 2
quirks:
- When replying to a post, the composer sets the locale of the new post
in composer to the locale of the post being replied. This PR defaults
the value to "none"
- When creating a new post, the composer sets the locale to the user's
locale. However we are seeing the behaviour that users do not write in
the locale they set their profile to. This PR defaults the value to
"none"
- improve the contract a little
- use `model` where possible
- extract message existence logic to a dedicated policy, allowing easier
testing.
- remove unused code
- refactor specs to follow current guidelines/best practices
Fixes an issue where the admin search results was showing
breadcrumbs with a double up of the parent label. For example,
we would show "Plugins > Plugins > AI > Usage" or
"Advanced > Advanced > Backups > Logs".
Also adds a missing translation for the chat incoming webhooks
page.
This change adds an API for retrieving the current value of a component within a FormKit form. It makes use of the existing `@onRegisterApi` parameter, adding a `get()` method to match the existing `set()` method.
The FormKit textarea component was using `@field.value` as inner content, preventing dynamic updates to the `textarea` value through the form API.
This change moves the `textarea` value to being set in the `value` attribute, instead.
Followup 30b0e38877af703606042cf1a2997a9a06582c32
Changes margin to padding for topic filter empty state to prevent the
"See X new or updated topics" banner from overlapping with the empty
state
when there are no topics in the filter.
This commit starts to introduce services to replace actions in the
ThemesController. We will start with the low langing fruit:
* Create
* Destroy
* BulkDestroy
* GetTranslations
Endpoints like #import and #update will be much harder.
Also, the https://github.com/discourse/discourse-theme-creator plugin
overrides some of these controller actions directly, so we need
to be careful.
In an upcoming pr #33092 that adds support for aws-sdk-mediaconvert it
requires
that we bump aws-sdk-core to 3.225.0
```
+ aws-sdk-mediaconvert (1.160.0)
+ aws-sdk-core (~> 3, >= 3.225.0)
```
but in doing so there are apparently some api changes and it requires
changes
in core to support the new version. I thought it would best to break out
these
changes in a separate PR as to not muddy up the mediaconvert pr that is
already
quite large.
Follow up from #33284 to add the missing style type value. This value
was originally meant for just categories but it makes things much easier
(and more complete) to add these values for other hashtag data types
like tags/channels etc, especially since they have default `icon` values
already.
Chat inline onebox links should open in a new tab with the help of chat
decorators by appending the `target="_blank"` attribute. I suspect this
may have been accidentally broken during a refactor in #31309
The issue was that the element that we pass into the decorator has
changed, meaning that the selector in the decorator would never find
inline links in cooked messages.