EmailToken.confirm is called in a number of contexts (hence the need for
the `scope`) and this is sometimes needed in `user_confirmed_email`
callbacks to distinguish those contexts.
Here we correctly focus a mid-stream post for screenreaders so they know
where to start, but once focus is removed NVDA becomes unmoored and will
jump back up the post stream to a previous post if someone tries to
navigate with the arrow keys.
Retaining the focus prevents this and shouldn't have any major
side-effects.
Tested using Chrome and NVDA
The zero width space added here as a layout fix seems to get noticed by
screenreaders (tested in NVDA) and gets "read" as text.
This means that instead of falling back to the button title, which is
the normal behavior for textless buttons, the screenreader reads the
blank space. This results in buttons like the post controls being read
simply as "button" with no other description.
Wrapping the space in `aria-hidden` corrects this, and results in the
button title being read properly.
Having them under `mobile/` means they're loaded for all users. Better
to put them in the admin-only bundle, and scope with `.mobile-view`
See also: ffdc97f37296e9568d7a5dcec4d1e90e973a6893
This reverts commit 38de3d7bd1f503743c5d0237bc8a8d9d89effb8e. This
changed seemed to be blocking our own AI helper as well if it has the
“Search” tool.
This commit fixes an issue where if you tried to post
2 chat messages in quick succession which only contained
uploads (both `message` fields would be `""`), then we
would show the "You posted an identical message too recently."
error.
We should not do this for upload-only messages, they
are not identical messages.
Followup b5147a4634f0fd5c98262f949a8c766bfd73d290
When we aliased `leave` to `remove` and renamed
the method in `DirectMessageChannel` in the previous
commit, this inadvertantly caused an error when
unfollowing group channels in the channel list.
When clicking the X in the channel list, we hit
ChannelsCurrentUserMembershipFollowsController for the
current user and the channel, which is supposed to only
unfollow the channel for all channel types including DMs.
Group DMs have a different Leave behaviour vs Unfollow.
Leaving the channel altogether is done from the channel
settings page, the "Leave channel" button, and that
deletes the user's membership and DM user record from that
channel.
So, we were trying to do the leave channel behaviour in the
unfollow channel controller, which was returning the wrong
record for the serializer (a User not a Membership)
This fixes the issue and removes a bit of delegate/alias indirection
which was making the code a bit harder to fllow and search, even
though it was more succinct. Also adds missing specs that would
have caught this regression.
When secure uploads are enabled, we need to send images that are rendered in the digest e-mail as attachments. Before this change, we would indiscriminately attach all images in the relevant topic's first post, whether they were rendered the e-mail body or not.
This change fixes that by only attaching images that are referenced in the e-mail body.
This change detects if a crawler is trying to load a search results page, and returns a simple response that should indicate to them that there's no content of interest available there.
In modern embroider, `app-js` files need to be exported by the module.
We need to keep the separate `app/` directory because this v2 addon
doesn't have a build step, and therefore the relative imports in the
`src/helpers` files would break if loaded as-is into the app bundle.
These files are managed automatically via crowdin, so they should never
be edited locally. Adding them to `.ignore` will stop them polluting
search results in IDEs which support `.ignore` (e.g. VSCode)
This commit introduces a new `Calendar` control for form-kit. This
control will render a date picker and a time input. On mobile the date
picker will be replaced by a native input of type date.
The following validation options have also been added:
- `dateAfterOrEqual`
- `dateBeforeOrEqual`
The control has two options:
- `includeTime` - show or hide the time input (default true)
- `expandedDatePickerOnDesktop` - show an expanded datepicker on
desktop, or not (default true)
This commit allows admins to limit the post created/edited trigger
execution to a specific post user group.
It's for example useful if you want to auto tag all the topics created
by member of a specific group.
This introduces a helper class for password validation logic, and
replaces the mixin in the create-account modal component class. All
properties that impact password validation in that class are also
converted to autotracked properties and getters - the 1 remaining mixin
here (UserFields) doesn't reference properties through `this.model` so
no need to make changes in that mixin.
Always double check we are going to need to
rewrite a json object prior to doing the work
Pathological cases such a Null could end up
doing JSON rewrites on the most of the notification
table
In one of the discourse narrative bot tutorial steps, we show the user a
few links and ask them to copy one and paste it in a reply to teach them
about oneboxes. In order to prevent the links from getting oneboxed in
the bot's post, we enclose them in `<>` which makes the links render
as-is without oneboxing.
However, if an admin attempts to customize via site texts the tutorial
step about onebox, the links enclosed in `<>` get removed completely
from the step content because they're interpreted as HTML tags when the
text override goes through sanitization (see [relevant
code](424da95128/app/models/translation_override.rb (L73-L74))).
To prevent that, this commit changes the default content for the onebox step
to use the `[]()` syntax which doesn't get sanitized and also doesn't
get oneboxed.
Internal topic: t/147912.
When an email is sent by sendgrid to an email address with an invalid
host, the webhook payload does not contain the "status" field:
```
[
{
"bounce_classification": "Unclassified",
"email": "noemail@this.does.not.exist.tld",
"event": "bounce",
"reason": "unable to get mx info: failed to get IPs from PTR record: lookup <nil>: unrecognized address",
"sg_event_id": "Ym91bmNlLTQtNTA0ODUxOTUtZXVvMmlLeGRTYXlQRjRZRTQtLUk3QS0w",
"sg_message_id": "euo2iKxdSayPF4YE4--I7A.recvd-5f54b5d587-pczjm-1-67BADEEA-6.0",
"smtp-id": "<870b3a2a-160c-4fc8-bc9a-bd0d5b943b81@forum.umbraco.com>",
"timestamp": 1740300320,
"tls": 0,
"type": "blocked"
}
]
```
When the `status` field is missing, it results in a `NoMethodError
(undefined method `[]' for nil:NilClass)`
error in the controller method. In this commit, we will specifically
handle the webhook event from sendgrid when the email address's domain
is invalid.
Co-Authored-By: @nul800sebastiaan
As part of the theme/color palette overhaul project, we're redesigning
the UI for the editing color palettes. This commit introduces a new
`ColorPaletteEditor` component that encapsulates all the logic and
interface for editing color palettes in the redesigned admin interface.
This component isn't used anywhere at this moment, but it will be once
we start introducing the rest of the redesigned interface.