Commit Graph

59388 Commits

Author SHA1 Message Date
c4ff6bd40e DEV: remove old themes/components code (#32875)
Recently, themes page was rebranded and put
`/admin/config/customize/themes`. In this PR, old
`/admin/customize/themes` was removed. In addition, when an admin visits
an old URL, they are redirected to the new one.
2025-05-26 09:21:15 +08:00
7a297a531a Build(deps): Bump snaky_hash from 2.0.2 to 2.0.3 (#32901)
Bumps [snaky_hash](https://github.com/oauth-xx/snaky_hash) from 2.0.2 to
2.0.3.
- [Release notes](https://github.com/oauth-xx/snaky_hash/releases)
-
[Changelog](https://github.com/oauth-xx/snaky_hash/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/oauth-xx/snaky_hash/compare/v2.0.2...v2.0.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-26 00:59:10 +02:00
b8368d1618 Build(deps): Bump json from 2.12.0 to 2.12.2 (#32902)
Bumps [json](https://github.com/ruby/json) from 2.12.0 to 2.12.2.
- [Release notes](https://github.com/ruby/json/releases)
- [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md)
- [Commits](https://github.com/ruby/json/compare/v2.12.0...v2.12.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-26 00:58:52 +02:00
1e3df0b5d1 Build(deps-dev): Bump @discourse/lint-configs from 2.19.1 to 2.20.0 (#32900)
Bumps
[@discourse/lint-configs](https://github.com/discourse/lint-configs)
from 2.19.1 to 2.20.0.
- [Commits](https://github.com/discourse/lint-configs/commits)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-05-26 00:58:44 +02:00
1f11aeab6b Build(deps): Bump diff from 8.0.1 to 8.0.2 (#32870)
Bumps [diff](https://github.com/kpdecker/jsdiff) from 8.0.1 to 8.0.2.
-
[Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md)
- [Commits](https://github.com/kpdecker/jsdiff/compare/v8.0.1...v8.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-24 15:22:18 +10:00
318cc6108c UX: Match theme install icon with component icon (#32894)
Just a small update to make the theme install icon match the one we use
for components.
2025-05-23 19:57:36 -06:00
0f8248d889 UX: Remove background from nav pill hover (#32893) 2025-05-23 16:19:22 -05:00
fc9703a92b FIX: allows zooming of images in chat (#32891) 2025-05-23 21:33:50 +02:00
199e120e20 UX: More border radius application (#32892) 2025-05-23 13:54:37 -05:00
bdc95398a2 UX: switch sidebar focus to focus-visible (#32882)
Reported here:
https://meta.discourse.org/t/dmenu-for-more-in-sidebar-selects-first-item-even-if-it-is-not-the-current-page/367344

focus-visible will make the focus state only appear when needed (like
when navigating with your keyboard), rather than appearing on menu open


![image](https://github.com/user-attachments/assets/9a6288a6-f67b-4493-a63c-aaaeb4214652)
2025-05-23 14:31:16 -04:00
7b6c6e6082 UX: Establish a larger default border radius (#32889) 2025-05-23 11:03:05 -05:00
4ac54c17ee DEV: Add className to flag name in flagging modal (#32888)
There is currently no selector on this `div` and we need a better
selector than `strong` for a CSS customizations.
2025-05-23 10:13:12 -05:00
7974ed508b UX: Improve intermediate state in social signup flow (#32887)
Before
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/5a060536-a32c-451c-b6dd-5b0f7e5b4124"
/>

After
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/49b680cf-ff9c-453b-9268-3d28f107b613"
/>
2025-05-23 10:39:30 -04:00
67bc9df272 FIX: fix label and description not working in type objects for site settings (#32868)
`label` and `description` did not work in `type: objects` in site
settings; this PR fixes that.

In theme settings, it is still working as expected(added tests for it ).
2025-05-23 11:39:19 -03:00
8a9397f53c UX: Fix positioning of loading spinner (#32885) 2025-05-23 09:06:09 -05:00
588f1d4a42 FEATURE: allow minimizing composer when no text (#32880)
This change updates the minimize button to always minimize the composer
so we don’t inadvertently delete user input.

Internal ref: /t/129123
2025-05-23 18:06:01 +04:00
92312eec7b FIX: Fix category title link to update when category changes, add tests (#32840)
The component was importing `@ember/component` but not marking the
category arg as tracked. Changed to `@glimmer/component` so the category
arg is tracked, and cleaned up the rest of the component to match.

Related to [this issue on
meta](https://meta.discourse.org/t/category-headers-missing-the-titles/361954).

Apparently a few customers with themes using the CategoryTitleLink
component got hit with the category title not updating correctly when
the category changed.
2025-05-23 08:51:30 -05:00
aa77c45576 REFACTOR: move mobile list-controls.scss to common (#32862)
This creates a new `/common/base/list-controls.scss` file and pulls
relevant styles from `_topic_list.scss` into it along with the mobile
`list-controls.scss`
2025-05-23 09:50:06 -04:00
c0b76d1c64 DEV: signup/login spec cleanup (#32867) 2025-05-23 09:17:37 -04:00
80df219fef A11Y: Update accessible headings for more flexible translations (#32863)
Follow-up to ca658a8bb093c82410927d1fa29e5ef1940260b7

The original attempt at this wasn't flexible enough for some languages
where adjectives may depend on context, so this requires more
translation but allows for full context in each string

Discussed here:
https://meta.discourse.org/t/translating-filter-in-headings-for-discovery-routes/363520
2025-05-23 09:15:44 -04:00
b4990ccb71 DEV: Compile and serve rtl versions of theme CSS (#32881) 2025-05-23 13:48:57 +01:00
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
c880aa78ce FIX: Avoid double redirect after installing a theme (#32876)
Clearing of params is now happening in the addTheme callback in the call site. Calling it in the component in willDestroy results in a double redirect which breaks the redirection to the components tab.
2025-05-23 16:53:45 +08:00
a24bd6789c Build(deps-dev): Bump ruby-prof from 1.7.1 to 1.7.2 (#32872)
Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.7.1 to
1.7.2.
-
[Changelog](https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES)
-
[Commits](https://github.com/ruby-prof/ruby-prof/compare/1.7.1...1.7.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-23 16:24:04 +10:00
Sam
c1b0e8b30b DEV: track client ids published to message bus (#32878)
Allow tracking of client ids published to message bus. 

Required for when you are targeting publishing at a single browser
2025-05-23 14:23:50 +10:00
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
01969e49f0 DEV: Improve tests for composer by checking for visibility (#32874)
This is a follow up to 6da091a2b1aa4940fdfb6c42ed0c59fea17ab7e3
2025-05-23 10:05:26 +08:00
10f8dba819 Revert "UX: Refactor the edit topic title UI" (#32873) 2025-05-22 20:07:19 -05:00
6cda3c728a DEV: refactor select-kit utils mixin to property-utils lib (#32665)
Follow up to refactoring the generic utils mixin used in select-kit
components in https://github.com/discourse/discourse/pull/32594.

This PR follows a different approach as the util functions related to
properties here aren't easily extracted without a major change to the
interface due to the dependency on `this.selectKit`. These util
functions are instead declared on the prototype with a class decorator
which ensures the same behaviour is maintained without relying on a
mixin.

It's largely a lift-and-shift with some minor refactoring of the
conditional logic to reduce nesting and improve readability of the
functions.
2025-05-23 09:03:10 +08:00
368900555d UX: re-add similar topics styles (#32866)
Before

![image](https://github.com/user-attachments/assets/f83e1d17-32f6-42a8-b7f8-21c1bf500136)

After

![image](https://github.com/user-attachments/assets/a81f7ddc-4001-47b4-b913-246d066673cc)
2025-05-22 16:53:35 -03:00
6da091a2b1 FIX: fullscreen composer regression (#32864)
Undoes the CSS nesting done inadvertently on
https://github.com/discourse/discourse/pull/32843.

Everything below `.fullscreen-composer` shouldn't be nested within
`.similar-topics`.
2025-05-22 16:24:42 -03:00
1a5377cf93 DEV: Add ability to hide shortcut in title (#32860)
## 🔍 Overview
This update add an _optional_ attribute to the `toolbar.addButton()` API
so that we can conditionally hide the shortcut showing up in the title.

Although for most cases, showing the shortcut in the title is fine. For
complex uses of `toolbar.addButton` where it triggers a menu, it isn't
ideal. For example, in Discourse AI, the toolbar API is used to show a
menu for the AI composer helper. The shortcut in the API is used to
trigger the proofreading item, but not necessarily for all other items.
As such, we want the shortcut hidden in the title.

## 🛠️ Usage

```diff
        withPluginApi((api) => {
          api.onToolbarCreate((toolbar) => {
            toolbar.addButton({
              id: "smile",
              group: "extras",
              name: "smile",
              icon: "far-face-smile",
              title: "cheese",
              shortcut: "ALT+S",
+              hideShortcutInTitle: true,
            });
          });
        });
``` 

### ← Before

Title shows:

> Cheese (Ctrl + Alt + S)

### → After

Title shows:

> Cheese
2025-05-22 09:36:48 -07:00
3867c879ab DEV: Make outletArgs available as regular arguments (#32819) 2025-05-22 14:55:28 +01:00
e2fe5671ed DEV: Resolve mixed-decls misconfiguration (#32858)
Marking mixed-decls as silenced & fatal simultaneously is causing a
warning "Ignoring setting to silence mixed-decls deprecation, since it
has also been made fatal"

The intention is for it to be silenced for themes/plugins, but fatal for
core.
2025-05-22 13:52:20 +01:00
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
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
3e8c293fe9 Build(deps): Bump snaky_hash from 2.0.1 to 2.0.2 (#32853)
Bumps [snaky_hash](https://github.com/oauth-xx/snaky_hash) from 2.0.1 to
2.0.2.
-
[Changelog](https://github.com/oauth-xx/snaky_hash/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/oauth-xx/snaky_hash/compare/v2.0.1...v2.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-22 12:02:07 +02:00
03ea73c550 Build(deps-dev): Bump @swc/core from 1.11.24 to 1.11.29 (#32850)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.11.24 to
1.11.29.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/swc-project/swc/compare/v1.11.24...v1.11.29)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-22 12:01:25 +02:00
e1984f886e FIX: forgotten background (#32857) 2025-05-22 12:00:52 +02:00
1fcb3a8b33 DEV: Port install theme button modal to new themes page (#32834)
We recently added a new themes and components page. We didn't port over the code that enables the Install theme button on Meta. It works by looking for certain query parameters and opening a special version of the install modal.

This PR is a lift-and-shift of that code from the old themes page.
2025-05-22 17:24:37 +08:00
5458e6ad2e FIX: Themes and components page title (#32856)
We removed a duplicate translation key, but it was being used here. Update the title token to use the canonical one.
2025-05-22 16:27:34 +08:00
11a0ad933a DEV: do not convert (tm) and (TM) to emoji (#32713)
This regressed because with recent emojis changes, the base name is now
`trade_mark` and not `tm`. `tm` is just an alias emoji.
2025-05-22 10:26:23 +02:00
0a156380cb UX: new styling for composer tips (#32843)
* Removed backgound from composer tips popup
* Added more spacing
* Made links the default link colour, so it's clear they are links.
* Applied `d-border-radius-large` var



![CleanShot 2025-05-21 at 17 26
14@2x](https://github.com/user-attachments/assets/2fbdcdce-5a51-4e71-8b85-c66aaf9aa257)

![CleanShot 2025-05-21 at 17 25
47@2x](https://github.com/user-attachments/assets/c52dfe70-d5b9-4c89-8b04-810a599281ac)

![CleanShot 2025-05-22 at 09 20
23@2x](https://github.com/user-attachments/assets/9f469d6c-498d-45f1-a6d5-450b7e20f264)
2025-05-22 09:22:12 +02:00
84179ec51a Build(deps): Bump drb from 2.2.1 to 2.2.3 (#32852)
Bumps [drb](https://github.com/ruby/drb) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/ruby/drb/releases)
- [Changelog](https://github.com/ruby/drb/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/drb/compare/v2.2.1...v2.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-22 16:48:43 +10:00
206dff5e13 FIX: bring back sidebar filter (#32837)
In this PR, filter was removed and replaced by search.

#32485

However, moderator should still be able to filter sidebar. Also, plugins like doc-category should have filterable sidebar.
2025-05-22 13:44:25 +08:00
386553d98b Build(deps-dev): Bump rubocop from 1.75.6 to 1.75.7 (#32851)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.75.6 to
1.75.7.
- [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.75.6...v1.75.7)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-22 12:42:10 +08:00
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
93e1ba365f DEV: Use ampersand for themes and components admin section (#32855)
We use ampersand to concatenate sidebar sections, e.g. Login & authentication, Logs & screening, etc.

This updates Themes & components to have the same.
2025-05-22 11:08:51 +08:00
2b6efa56f3 DEV: Add site description to crawler homepage view (#32845)
In some cases, Google crawlers don't output the meta description but
rather they output the first bit of text in the UI. Sometimes that is a
mix of table headings, topic titles and excerpts, which don't reflect
the site's mission. Adding the description to the homepage header might
help.

Internal ticket t/154372
2025-05-22 08:33:59 +10:00
b3a39ccdf6 UX: Update unsaved changes popup (#32849)
This PR slightly updates the unsaved changes popup in the admin panel.

# New
| desktop | mobile | 
|--|--|
| ![CleanShot 2025-05-21 at 16 18
18@2x](https://github.com/user-attachments/assets/923468a5-49a3-431c-823f-b5e2b67b0585)|
![CleanShot 2025-05-21 at 16 20
30@2x](https://github.com/user-attachments/assets/297f7804-2fe0-431b-9091-4d914618481b)|


# Old

| desktop | mobile | 
|--|--|
| ![CleanShot 2025-05-21 at 16 18
32@2x](https://github.com/user-attachments/assets/d471aef4-df89-450c-ab3f-d11781959cf8)
| ![CleanShot 2025-05-21 at 16 19
33@2x](https://github.com/user-attachments/assets/6db7f98f-93a5-4aeb-8e43-167da445fddd)
|
2025-05-22 08:11:39 +10:00