Commit Graph
4051 Commits
Author SHA1 Message Date
Discourse Translator Bot 59367ac03f Update translations (#33409) 2025-07-02 22:36:37 +02:00
Martin Brennan d92de3e4d0 FIX: Admin search not including plugin pages (#33356)
Followup 4fe85fdb53

It's not ideal, but currently the admin-sidebar modifies ADMIN_NAV_MAP,
and the admin search data source relies on this modification to include
plugin pages in search.

This commit removes the cloneJSON added in the previous one and adds a
test to ensure this doesn't regress.

A followup commit will do some refactoring to stop this behaviour of
modifying the global ADMIN_NAV_MAP.
2025-06-26 13:35:13 +10:00
Blake Erickson 32aec6fca7 FIX: Chat video thumbnails on iOS (#33349)
Turns out we do need the iOS check, not just the safari check.

Follow up to: #33199
2025-06-25 14:00:28 -06:00
chapoi 5e8b92b789 UX: Updated gear to plus icon in discobot tutorial (#33343)
Discobot advanced tutorial needed the gear icon replaced by the new plus
icon.
Related to #32918
2025-06-25 12:07:23 +02:00
Discourse Translator Bot 541c6cc1d7 Update translations (#33326) 2025-06-24 16:29:13 +02:00
Martin Brennan f69dbcd2c1 FIX: Make Ctrl+K shortcut work consistently in RTE, and not always show chat channel switcher
Followup fb7fa2902c,
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.
2025-06-24 12:20:00 +10:00
Joffrey JAFFEUX e241de51cd FIX: correctly follow enable_emoji_shortcuts in chat (#33297)
Prior to this fix, this setting would have no effect in chat.
2025-06-23 17:42:24 +02:00
Loïc Guitaut 3fbb2954cb DEV: Refactor Chat::ListChannelMessages service a bit
- 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
2025-06-23 14:18:49 +02:00
Martin Brennan 00942ddffd FIX: Admin search labels doubled up with parent label (#33308)
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.
2025-06-23 16:21:29 +10:00
David Battersby bb5c2e7a00 FIX: chat message inline onebox url target (#33288)
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.
2025-06-20 18:04:37 +04:00
David Battersby f138f78f50 DEV: add channel hashtag style type (#33284)
Adds the missing `style_type` that is used to decorate hashtags in core.

All chat channels currently use an icon by default, so declaring the
style type on the channel hashtag data source makes this more complete.
2025-06-20 10:04:36 +04:00
Joffrey JAFFEUX c9425c93cc FIX: ensures empty fields don't store an empty array (#33274)
This is a follow-up to
https://github.com/discourse/discourse/commit/299d28cb739e1a0b3ca41355269d93b4cf334d19
to apply it to more fields.
2025-06-19 20:46:48 +02:00
Jordan Vidrine 35d9688aa3 UX: Add tertiary-25 color variable (#33273) 2025-06-19 13:05:55 -05:00
Joffrey JAFFEUX 299d28cb73 FIX: ensures empty tags field is not storing an empty array (#33270)
This would happen in the following scenario:
- select a tag
- save the automation
- unselect the tag
- save the automation

You would end up with a field having `[]` as value instead of `nil`.
This can cause issues in the logic of scripts and triggers as they might
consider the value as present.
2025-06-19 17:06:22 +02:00
David Battersby af11b23309 FIX: add channel hashtag color when lazy load is disabled (#33269)
When category lazy loading was disabled, chat channel CSS classes were
not being inserted into the page markup. This meant that they would not
be styled correctly in the markdown editor preview.
2025-06-19 18:54:11 +04:00
Joffrey JAFFEUX 4f2a8d39da FIX: correctly refreshes associated fields after update (#33246)
The `on_update` callback of triggers is called with previous fields and
new fields, values. However since a recent change:
https://github.com/discourse/discourse/pull/32810 this relationship is
cached and would cause previous fields to equal new fields. This commit
ensures we are refreshing the relationship before calling the
`on_update` callback.
2025-06-18 14:01:09 +02:00
Discourse Translator Bot 0b6155a8d8 Update translations (#33235) 2025-06-17 23:07:42 +02:00
David Taylor aab7b9fc68 DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
Martin Brennan c00c522530 DEV: Adds hasNoPreferredMode to chat state manager (#33213)
This commit introduces a new property `hasNoPreferredMode` to the
chat state manager, which represents a user who has not purposely
set chat mode to drawer or full page, meaning they have no LocalStorage
value set.

This can be useful for themes to change the chat mode but only
if the user has no preference already.

c.f.
https://meta.discourse.org/t/full-screen-chat-as-default-for-collaboration-setup/369849
2025-06-17 13:22:42 +10:00
Jarek Radosz fb9343891c DEV: Rename codemodded class names (#33198) 2025-06-16 16:31:57 +02:00
Blake Erickson 2268f06b04 FIX: Chat video thumbnails in Safari (#33199)
When uploading videos in chat using Safari the thumbnail isn't being
displayed
so we need to trick the browser to by adding the timestamp property so
that it
will fetch the metedata the html5 video tag needs to render the
thumbnail.
2025-06-13 13:04:35 -06:00
Joffrey JAFFEUX 3d9a05f9c0 UX: redirect message actions wheel event to channel (#33172)
When your mouse was over the message actions container, not only it
wouldn't scroll your channel, but it would scroll the whole page, this
redirect ensures we correctly scroll the scroller associated with this
message actions container.
2025-06-12 11:11:33 +02:00
Discourse Translator Bot 25c62b184e Update translations (#33145) 2025-06-10 23:27:48 +02:00
Renato Atilioandchapoi 512a31339a UX: composer toolbar changes (icon, style, placement) (#32918)
Changes the gear icon for the more menu to a circle-plus icon.

Changes the emoji icon to its outline version, to make it less similar
to the circle-plus icon.

Changes the styles (eg. icon sizes) of the toolbar, using a flexbox
instead of a grid, with some tweaks and animations to the toggle switch,
which occupies a smaller width now.

Removes the gray button-bar bottom border.

Moves the Insert Date/Time item to the more menu, and changes its icon
to a clock.

### Before, hovering more menu

<img width="758" alt="image"
src="https://github.com/user-attachments/assets/84d8f5aa-519e-40a2-ba44-d58d7294f6b0"
/>

### After, hovering more menu

![image](https://github.com/user-attachments/assets/b54eac09-9dd0-4b7f-b93c-82d452cc5ded)

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2025-06-10 12:16:19 -03:00
Chris Alberti b1f5d2e4b9 FIX: Stop blocking auto scroll on iOS (#33129)
Previously on iOS the chat would explicitly not scroll down to the bottom when a new message was added.
2025-06-09 15:00:06 -05:00
Yuriy Kurant c1946425fa FIX: chat: shows placeholder instead of timer for empty chats (#33105)
For empty chats, a dummy message is created with `id=null` (an
unsaved Ember model). 

The timer or placeholder's display is determined by the message ID's presence now (not the `createdAt` prop).
2025-06-09 15:59:04 +08:00
Sérgio SaquetimandDavid Taylor efd01c18cf DEV: Modernize the remaining of the post stream to Glimmer components (#32653)
Co-authored-by: David Taylor <david@taylorhq.com>
2025-06-05 19:48:29 -03:00
Kris f66339338e A11Y: SVG icons should be hidden unless a label is provided (#33059)
This is fairly minor because usually SVGs aren't focusable, but this
adds `aria-hidden='true'` to all SVGs by default unless either an
`aria-label` or `label` is provided. This gets reported to us in
automated tests from time to time.

So now:

1. SVG: `aria-hidden="true"` (new behavior, safe default when no label
is provided)
2. SVG with `label` param: `aria-hidden="true"` and `sr-only` label is
provided
3. SVG with `aria-label` param: `aria-hidden="false"` and `aria-label`
is provided
2025-06-04 08:21:36 -04:00
Renato Atilio 25e80511f7 UX: rich editor [details] caret hover and padding (#33057)
Improves the styles for the [details] caret pseudo-element on the rich
editor.

Additionally, having `summary` have no `pointer-events` is important so
Firefox doesn't mess with our caret positioning when clicking it.
2025-06-03 15:23:21 -03:00
Joffrey JAFFEUX 8873a33b7a FIX: uses text selection when using hide details (#33049)
When hiding details if the user has currently a text selection we want
to use it as the content of the details element.

/t/-/154716/30
2025-06-03 19:53:45 +02:00
Discourse Translator Bot b08d5ad7b7 Update translations (#33052) 2025-06-03 17:37:13 +02:00
Joffrey JAFFEUX cd4b6b8fab DEV: allows chat thread sdk to query more messages (#32914)
The changes are:
- Chat Thread SDK can query up to 500 messages
- If you are above this number, we don't raise an error anymore but we
clamp it to 500
- The controller using this service is forced into the old limit of 50
to avoid abuses
2025-06-02 09:29:24 +02:00
Kris 8660630e01 UX: avoid presence layout shift (#33022)
The space reserved for presence was just slightly too short, which was
causing a layout shift when the indicator appears, this fixes it.


![image](https://github.com/user-attachments/assets/d729c941-09c2-42ec-8e26-11b598697c94)
2025-05-30 17:30:44 -04:00
David Taylor a55ce02cb9 PERF: Remove <details> polyfill (#33020)
When we first introduced the `discourse-details` plugin, the `<details>`
element was not supported in all browsers, so this `display: none`-based
polyfill had to be used.

Nowadays, there is no need for this. And in fact, the `details[open] >
summary:first-of-type ~ *` selector is showing as our most expensive CSS
selector during repaints.

Removing this `display: none` also means that browser find-in-page will
now be able to correctly find content inside `<details>` in discourse.


![image](https://github.com/user-attachments/assets/e3d943f3-ec63-4c16-9096-44340a4f7df0)
2025-05-30 21:47:09 +01:00
SamandGary Pendergast 2261d3711b FEATURE: allow customizing default timezone for email. (#32964)
1. Changes default email format to llll (eg: Tue, May 8, 2018 2:00 AM)
from 2018-05-08T00:00:00Z UTC which is not nice on the eyes
2. Adds `discourse_local_dates_email_timezone` which allows configuring
default timezone in emails
3. Improved help text on site settings (format / timezone)

---------

Co-authored-by: Gary Pendergast <gary@pento.net>
2025-05-29 14:17:37 +10:00
Joffrey JAFFEUX a868c8225f FIX: removes shift which is not necessary anymore (#32979) 2025-05-28 20:07:05 +02:00
Chris Alberti 0b65360094 FIX: Make post created/edited automation trigger regexes more specific (#32944)
- For `with_images`, ignore `<img>` tags representing emoji or a quote
avatar
- For `with_links` and `with_uploads`, exclude tags starting with the
letter "a" other than `<a>` (like `<aside>`)
- For `with_code`, the `<pre>` tag wasn't being detected because it was
expecting an extra char before the ">"
2025-05-27 15:40:00 -05:00
Discourse Translator Bot ee14a81573 Update translations (#32939) 2025-05-27 22:11:24 +02:00
Gary Pendergast 8efd99da9e FEATURE: Improve emoji diversity rendering (#32909)
This change polishes the emoji diversity rendering behaviour in the emoji pickers. When a user changes their diversity setting, that setting will now be applied to favourites, chat default reactions, and in the  emoji picker section selectors.

If an emoji was previously stored with a skin tone in favourites or default reactions, the stored skin tone won't be overridden.
2025-05-27 11:34:24 +10:00
Krzysztof Kotlarek 1c1300d0e7 FIX: back to forum button should lead to forum and not chat (#32913)
Similar fix to https://github.com/discourse/discourse/pull/32911

Meta:
https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/15
2025-05-27 08:43:47 +08:00
David Battersby 487f610fc1 DEV: add user email to chat summary mailer (#32917)
Pass user email rather than relying on enrichment when sending summary
emails.
2025-05-26 19:19:16 +04:00
Joffrey JAFFEUX fa39af6526 FIX: prevents double load of automation.index (#32899)
Im not exactly sure of the reason, but I thought it was related to the
recent `addAdminPluginConfigurationNav`. I followed more closely what
has been made in chat for hooks and it seems to fix the problem.


/t/-/154466
2025-05-26 08:17:26 +02:00
Joffrey JAFFEUX fc9703a92b FIX: allows zooming of images in chat (#32891) 2025-05-23 21:33:50 +02:00
David Taylor b15c1d28c9 DEV: Introduce experimental viewport-based mobile mode (#32859)
Introduces the viewport_based_mobile_mode experimental site setting.
When enabled, user-agent-based mobile/desktop detection will be replaced
with viewport-width logic. 'mobile mode' is enabled for any viewport
less than our 'sm' breakpoint (40rem, or 640px at default font size).

When this mode is enabled, mobile/desktop toggle buttons are hidden,
since they are non-functional.

Tests are also updated to use a consistent method for force-enabling the
legacy mobile mode. All state is now stored in `lib/mobile`, and the
`Site` model references that via a getter.
2025-05-23 13:01:04 +01:00
Renato Atilio 49f6f5d083 UX: rich editor checklist undoable input rule (#32877)
Removes the rich editor checklist input rule `undoable: false`, which is
not needed.

Making it undoable allows a backspace to undo the input rule conversion,
so we can go from a check to a `[]` again
2025-05-23 14:20:27 +10:00
David Taylor 9ead2e6720 PERF: Introduce lazyHash and update PluginOutlet calls to use it (#32823)
This is a more efficient version of `{{hash`, where the values are only evaluated when they're actually accessed. Also enables a new lint rule which will ensure `{{hash` is not reintroduced on PluginOutlets
2025-05-22 12:07:22 +01:00
Loïc Guitaut f0fcac1243 DEV: Refactor Chat::LookupChannelThreads to follow best practices
- use `model` where possible
- extract threads fetching logic to its own action
- refactor specs to follow current guidelines/best practices
2025-05-22 12:06:54 +02:00
Arpit Jalan 58d14b075d FEATURE: trigger an event when chat channel is trashed (#32844)
Required for this PR:
https://github.com/discourse/discourse-livestream/pull/55
2025-05-22 09:48:32 +05:30
Jarek Radosz ae4ee7754f DEV: Update linting (#32836) 2025-05-21 12:02:52 +02:00
Discourse Translator Bot f2ed537559 Update translations (#32815) 2025-05-20 17:33:42 +02:00