Commit Graph
60373 Commits
Author SHA1 Message Date
Kris 6280db7b44 FIX: filter route views- error, "views" is ambiguous (#34033)
When using the `/filter` route a filter like... `created_by:foo
views-min:2` causes an error `column reference "views" is ambiguous`

<img width="1280" height="674" alt="image"
src="https://github.com/user-attachments/assets/cd578481-24c5-48e8-b1c2-114038b2f4e8"
/>



This fixes it. 

<img width="1872" height="398" alt="image"
src="https://github.com/user-attachments/assets/a37f6fe7-ca8b-47b0-bcba-eea0a557c1cb"
/>
2025-08-01 15:50:08 -04:00
Renato Atilio eecb0729f2 FIX: debounce resolution of image urls on rich editor (#34035)
Refactors the `shortUrlResolver` ProseMirror plugin to batch multiple
urls into a single resolution call.
2025-08-01 16:28:11 -03:00
Juan David Martínez Cubillos ce668c1af8 DEV: Add plugin outlet to login form (#33609)
**Description**
Currently, we don't have a way to customize the login template layout,
this change will allow for easier customization through plugins and
themes.
2025-08-01 10:56:21 -05:00
David Taylor ac3428f930 FIX: Handle LOAD_PLUGINS=0 in assemble_ember_build.rb (#34029) 2025-08-01 14:49:27 +01:00
David Battersby 7efc992ced FIX: allow here as a valid mention (#34028)
Allows the `@here` mention to retain the mention node and styling in
Composer's rich text mode.
2025-08-01 17:14:39 +04:00
Ted Johansson e2a615d03e FEATURE: Add new edit_tags_allowed_groups setting (#34000)
Break down tag admin into more fine grained permissions using a new setting listing groups that can edit (but not create or delete) tags.
2025-08-01 15:19:20 +08:00
David Battersby 9e59e38e9f FIX: add mention warnings for composer rich text (#33857)
This change adds composer warning messages within rich text mode by
tapping into the existing `appEvents` service.
2025-08-01 10:05:01 +04:00
Selase Krakani 8e1e54cbc1 FIX: Ensure imported category slug is deduplicate (#34012)
This change ensures the incoming category slug doesn't already exist
2025-08-01 00:06:34 +00:00
Yuriy KurantandJoffrey JAFFEUX ae27cac392 UX: enhances messages dropdown with unread count (#33889)
Enhances inbox messages dropdown with unread icon/count per each inbox option.

Dropdown implementation is switched from `select-kit` to `float-kit`.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-08-01 07:19:04 +08:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 551966712e Build(deps): Bump memfs from 4.24.0 to 4.26.0 (#34018)
Bumps [memfs](https://github.com/streamich/memfs) from 4.24.0 to 4.26.0.
- [Release notes](https://github.com/streamich/memfs/releases)
-
[Changelog](https://github.com/streamich/memfs/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/streamich/memfs/compare/v4.24.0...v4.26.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 00:53:07 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 035cb98a53 Build(deps-dev): Bump lint-to-the-future-eslint from 3.1.0 to 3.2.0 (#34017)
Bumps
[lint-to-the-future-eslint](https://github.com/mansona/lint-to-the-future-eslint)
from 3.1.0 to 3.2.0.
- [Release
notes](https://github.com/mansona/lint-to-the-future-eslint/releases)
-
[Changelog](https://github.com/mansona/lint-to-the-future-eslint/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/mansona/lint-to-the-future-eslint/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 00:52:15 +02:00
Kris 2fdf4d9cc0 FIX: remove unneeded overflow in horizontal-scroll-sync (#34016)
Follow-up to 459a58f

Had an extra overflow style causing an issue with dropdowns, it's
unnecessary because we have overflow handled on a descendant


Before:
<img width="1106" height="602" alt="image"
src="https://github.com/user-attachments/assets/3f156f68-53c1-4bf0-8f28-04e1e07e56af"
/>


After:
<img width="1652" height="810" alt="image"
src="https://github.com/user-attachments/assets/a2e5163b-c183-4a0c-a25b-99039974c1fb"
/>
2025-07-31 17:58:29 -04:00
David Taylor 59764e43c9 FEATURE: Fetch pre-build JS assets by default (#34009)
Followup to fcaa068b87

Meta announcement: https://meta.discourse.org/t/376700
2025-07-31 17:00:55 +01:00
Kris a46293c202 UX: improve wrapping and styling in email logs (#34011)
Some additional improvement following
459a58f3e1, there were some cases that
became clearer after seeing live data in production

This helps avoids issues like this:

<img width="440" height="176" alt="image"
src="https://github.com/user-attachments/assets/d1c23d47-15bd-4a23-b54f-cb825c9d861f"
/>

<img width="402" height="402" alt="image"
src="https://github.com/user-attachments/assets/bb8d6be1-2dcc-4276-98ad-f3a825c2f932"
/>
2025-07-31 11:40:04 -04:00
Kris 57bc5466f4 REFACTOR: move the pinned button to DMenu (#33869)
The pinned button feels a little sad next to the updated notification
button. This also improves how it works on mobile.


before:

<img width="1316" height="206" alt="image"
src="https://github.com/user-attachments/assets/6e5f718d-803f-4121-967b-d51d8f9d6e2f"
/>

<img width="1360" height="330" alt="image"
src="https://github.com/user-attachments/assets/8b6662fb-c515-4b8b-a20a-81862b0218aa"
/>



after: 

<img width="1272" height="220" alt="image"
src="https://github.com/user-attachments/assets/87846f56-c7aa-47b8-9c01-45b4cddc3f38"
/>

<img width="1262" height="432" alt="image"
src="https://github.com/user-attachments/assets/6f4dba4a-2673-4a17-86b7-e2075a16467d"
/>
2025-07-31 10:47:20 -04:00
Osama Sayegh 26778dbd02 DEV: Clear serializers cache between tests (#34008)
In our serializers, we have a method `cache_fragment` that we use for
caching chunks of JSON that are expensive to generate. We currently
don't clear this cache between tests, which causes tests to become flaky
since a cached fragment from one test can leak to another test and make
it fail.
2025-07-31 17:21:22 +03:00
Discourse Translator Bot e3d1e75c76 Update translations (#34004) 2025-07-31 16:18:53 +02:00
David Taylor fcaa068b87 DEV: Publish and enable use of pre-built JS assets (#33973)
Building the Discourse ember app is resource-intensive process. This
commit introduces a framework for us to build these assets centrally,
and make them available for people to download.

On every commit to `main`, a new GitHub actions workflow will build
development & production versions of the core assets, and publish them
as a github release under the `discourse/discourse-assets` repository. A
separate repository is being used to avoid polluting the main
`discourse/discourse` repository with one-git-tag-per-release.

The `assemble_ember_build.rb` script is updated to fetch the relevant
asset bundle. Requests are made to `get.discourse.org`, which then
redirects to GitHub releases. This redirection service is being used so
that we have the option to switch away from GitHub releases in future
without breaking existing Discourse installations.

For now, this behavior can be enabled by setting
`DISCOURSE_DOWNLOAD_PRE_BUILT_ASSETS=1`. In the near future, we hope to
make this the default, with opt-out via
`DISCOURSE_DOWNLOAD_PRE_BUILT_ASSETS=0`.
2025-07-31 14:22:51 +01:00
Kris 459a58f3e1 UX: better handling of admin email log overflow (#33988)
This improves the admin email log overflow by: 

* allowing tables to horizontally scroll if needed
* ensuring `code` has pre-wrap to avoid very long lines
* making all links have overflow-wrap to avoid very long email address
and link issues

I've also removed some truncation CSS, because this is data we ideally
need to see all of, even if it has to wrap.

The horizontal scrolling is implemented by
horizontal-scroll-sync-wrapper.gjs, this is a new component I pulled out
of the existing responsive-table.gjs and updated. The component adds a
top scrollbar to horiztonally overflowing areas and syncs it up with the
bottom scrollbar to make scrolling a little easier.

These templates are quite old and can use some more general
improvements, but this gets them to a place where they aren't breaking
the layout.


Before (whole page scrolls, note the header and missing nav):
<img width="2302" height="1626" alt="image"
src="https://github.com/user-attachments/assets/551973cb-e4cc-4881-a0d9-33bb1237403b"
/>


After (only table scrolls): 
<img width="2350" height="1354" alt="image"
src="https://github.com/user-attachments/assets/739b1f37-ae39-424e-8603-715bbc872e31"
/>
2025-07-31 09:21:21 -04:00
Kris ed6ed00fa7 UX: unify filters for colors, themes, and components (#33863)
I'd like to unify our admin filtering around a central component that
achieves some simple styling. It looks like this:

<img width="2190" height="328" alt="image"
src="https://github.com/user-attachments/assets/ae223ab9-e12f-4e99-a2b8-968aa3a51805"
/>

This sort of filter has already been implemented in the AI plugin, for
the plugin index, and for color palettes. These implementations haven't
been all tied up into a single component yet.

In this PR I've put some stand-alone filters through the new
`AdminFilterControls` component.

This includes: 

* Filtering by theme (when you have 8 or more themes). We didn't have a
filter here yet, but it's useful in some extreme cases (including
development!)

* Filtering by color palette. This existed already, but now uses the
shared component.

* Filtering by component. We already had a filter here, but it wasn't
using this new unified style. This was a little trickier because it's
not unusual for sites to have many components, so we paginate and filter
these server-side. I've added support for callbacks in
`AdminFilterControls` so it can support either client or server based
filtering.

<img width="2206" height="1108" alt="image"
src="https://github.com/user-attachments/assets/6ce6d2f1-1ed1-4168-a6fc-77760fd34384"
/>


<img width="2204" height="1182" alt="image"
src="https://github.com/user-attachments/assets/b0409bc3-9da0-4ae1-b1a3-dd3dcde2a0b3"
/>

<img width="2224" height="1156" alt="image"
src="https://github.com/user-attachments/assets/f82ef6dd-f5d4-46f0-9a57-00349522ef8f"
/>
2025-07-31 09:20:50 -04:00
Penar Musaraj 63328ede08 DEV: Do not preload assignments when discourse-assign is disabled (#33985) 2025-07-31 09:11:26 -04:00
chapoi 651e2bbddf UX: apply consistent spacing and correct emoji size to track-link in posts (#33982)
* wrapped text + optional emojis in span to avoid odd flex layout
* emoji size changed to 1em
* added spacing around emoji

| Before | After |
|--------|--------|
| <img width="548" height="121" alt="CleanShot 2025-07-30 at 16 56 10"
src="https://github.com/user-attachments/assets/a3a32f17-7cbe-4bca-9782-ecf64d4f176c"
/> | <img width="548" height="121" alt="CleanShot 2025-07-30 at 16 55
16"
src="https://github.com/user-attachments/assets/8e5a1cc3-b6c6-4875-8c95-1db8b826d46c"
/> |
| <img width="386" height="123" alt="CleanShot 2025-07-31 at 11 53 33"
src="https://github.com/user-attachments/assets/17583784-453a-4ce8-9848-9c0a429f322b"
/> | <img width="387" height="80" alt="CleanShot 2025-07-31 at 11 55 30"
src="https://github.com/user-attachments/assets/d4207b19-c7c1-463c-897b-266b81707fdb"
/> |
2025-07-31 12:57:47 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 7cdf68ddcf Build(deps-dev): Bump rubocop from 1.79.0 to 1.79.1 (#34002)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.79.0 to
1.79.1.
- [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.79.0...v1.79.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 12:50:25 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 272e3f7564 Build(deps): Bump rack-mini-profiler from 4.0.0 to 4.0.1 (#34003)
Bumps
[rack-mini-profiler](https://github.com/MiniProfiler/rack-mini-profiler)
from 4.0.0 to 4.0.1.
- [Release
notes](https://github.com/MiniProfiler/rack-mini-profiler/releases)
-
[Changelog](https://github.com/MiniProfiler/rack-mini-profiler/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/MiniProfiler/rack-mini-profiler/compare/v4.0.0...v4.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 12:49:39 +02:00
Alan Guo Xiang Tan a102be7b02 DEV: Configure skip_default_job_logging for Sidekiq (#34001)
By default, Sidekiq logs the `start` and `done` messages at the `info`
log level
when a sidekiq job executes. These log messages are not necessary in
production and is bloating our log files. Even in other environments, I
don't see how the messages are useful so we are going to just disable
this.

### Reviewer notes

See https://github.com/sidekiq/sidekiq/pull/6200
2025-07-31 15:44:14 +08:00
dependabot[bot] dec0bb7fee Build(deps): Bump @floating-ui/dom from 1.7.2 to 1.7.3 (#33989) 2025-07-31 08:46:23 +02:00
dependabot[bot] c3429bd733 Build(deps): Bump memfs from 4.23.0 to 4.24.0 (#33990) 2025-07-31 08:45:22 +02:00
Osama Sayegh d01526f915 FEATURE: Color mode preference (#33875)
This commit adds a new dropdown preference to set the default color mode for
the user and change the color mode for the current device. It works the same way
as the interface color selector in the sidebar footer (or header), but it also allows
setting the default mode for the user that gets used when the user logs in on a
new device. It remains possible to set a color mode per device using the
sidebar/header selector or this new preference.

Internal topic: t/159358.
2025-07-31 08:17:02 +03:00
Renato Atilio 6c0c86a39e A11Y: composer toolbar dropdown title (#33993)
Adds a `title` attribute to the composer toolbar items that are used to
trigger a dropdown menu.
2025-07-31 15:12:31 +10:00
Gary Pendergast 927a17f062 DEV: Fix a flaky AI composer helper test (#33998)
There was a race condition in this test, where the mini tag chooser may not have had time to update after a tag was selected.
2025-07-31 13:55:44 +10:00
Gary Pendergast 8c17d68e97 DEV: Fix a flaky deprecated settings test (#33996)
Some of the deprecated settings tests set our site settings to be global settings. When the settings are reloaded between tests (see `stub_deprecated_settings!()`), the setting loader (`SiteSettingExtension.setting()`) will check to see if there's a global setting that would override the site setting, and use that value from previous tests.

To fix this, we need to un-global the site setting after the test finishes.
2025-07-31 13:16:04 +10:00
Gary Pendergast ede6f7eadc DEV: Fix a flaky system test for customising themes (#33997)
These tests have a race condition when updating their models, they're using a `expect(page).to_not have_css(...)` check that may look at the DOM before the model update has been reflected in the DOM.

Switching to using `expect(page).to have_no_css(...)` lets Capybara wait until the DOM has finished updating.
2025-07-31 13:15:30 +10:00
Ted Johansson d33bf177f4 DEV: Fix up TopicGuardian#can_delete_topic? (#33965)
In a previous PR I had to work with TopicGuardian#can_delete_topic? and I had to whip out pen and paper to untangle the single conditional that governs it. Now that that task is done, I'm going back to it to clear it up.

Commit by commit:

1. Move the tests to topic_guardian_spec.rb.
2. Add missing test cases for trashed- and category topics.
3. Break the conditional into individual code paths using guard clauses.
2025-07-31 10:41:00 +08:00
Ted Johansson 8a50fc034f DEV: Remove now-redundant is_staff guardian check (#33852)
The edit_all_post_groups used to have TL4 as the default setting. This update:

- Adds in admins and moderators as well as makes those mandatory values.
- Gets rid of now-redundant is_staff? check.
- Makes use of the magic #edit_all_post_groups_map method.
2025-07-31 10:39:38 +08:00
Sam e358aa73c8 FIX: CSV bulk invites broken when S3 uploads enabled (#33995)
CSV bulk invites need to be uploaded direct to the controller, otherwise
uploadUrl is not respected and upload never heads to the correct place
2025-07-31 11:21:57 +10:00
Gary Pendergast 55bf697976 DEV: Fix a flaky AI bot upload test (#33994)
##  What's This?

Ref: t/158747

This test is ensuring that uploads work correctly when starting a new
conversation with a bot.

There's a race condition where the test can try to send a message before
the uploads have finished process, this fix waits until the uploads have
completed before continuing.
2025-07-31 10:59:23 +10:00
Osama Sayegh 99abfb21f0 FIX: Mention with a status should open the user card (#33979)
Currently, clicking on a mention of user who has set a custom status
causes the user card to fail to load. This happens because when the
username is extracted from the mention `<a>` element, the space between
the username and the status emoji is captured with the username and is
sent to the server which fails to lookup the user due to the erroneously
appended space.

To fix this, we should cleanup the captured username and remove
surrounding spaces using `trim()`.
2025-07-31 02:32:24 +03:00
Rafael dos Santos Silva b81e80a6e2 FIX: Optimize shortcomings from topic truncation from a27e20c (#33983)
On a27e20c we made an emergency perf fix to speedup generating text from
a topic for embeddings generation.

This introduced some issues, like missing separators between posts,
including to line breaks per included post all at the top of the
generated text, and resulted in using a lot less content per topics,
as we count the cooked size before stripping all the HTML tags.

This commit helps alleviate by:

  - removing the "\n\n" * quantity of posts at the top
  - adding a space between posts
  - generating text 3 times longer than the max allowed lenght, since
    it's getting shrinked after it's built by the Nokogiri.text call.
2025-07-30 17:09:05 -03:00
David Taylor 14de547589 FIX: element-classes implementation on older browsers (#33981)
`Iterator.filter` only exists on Safari 18+. Need to convert to an array
first
2025-07-30 14:57:10 +01:00
chapoi 1d1276fcfd UX: Horizon > messages page – change box-shadow to inset (#33976)
The topic-cards on the messages page are laid out differently than on
the main topiclist page and lack spacing. This causes the box-shadow on
selected-highlight to be cutoff:

<img width="690" height="374" alt="image"
src="https://github.com/user-attachments/assets/4318acf8-1ec0-4f8f-8a00-15d8fb5c9d23"
/>

This commit uses an inset box-shadow to avoid that, on this page
specifically:
<img width="2178" height="1146" alt="CleanShot 2025-07-30 at 13 33
27@2x"
src="https://github.com/user-attachments/assets/7af241fe-9d85-48e1-b2aa-2b465a4ba991"
/>
2025-07-30 15:29:22 +02:00
Renato Atilio 22c3240f17 FIX: tabbing out of the markdown editor (#33940)
Ensures the textarea version of indentSelection only returns true when
the replaceText/selectText actions are applied. This is important
because its return is used to determine if itsatrap/prosemirror will
preventDefault or not when tabbing/shift-tabbing inside the editor.
2025-07-30 09:54:58 -03:00
Jarek Radosz ce6368ca98 DEV: Enable ember/no-classic-components (#33978)
…and apply lint-to-the-future
2025-07-30 14:54:24 +02:00
chapoi 53753a1034 UX: Horizon > chat message popup zindex followup (#33977)
followup fix for #33932 
fix wrong css selector
2025-07-30 14:12:43 +02:00
Jarek Radosz fc9eff6f3c DEV: Convert user-notes components to glimmer (#33974) 2025-07-30 13:58:30 +02:00
Natalie Tay 81c35611e1 FIX: Extend cache key due to user locale (#33975)
If an anon Japanese user views Jane's summary page, then subsequently an
anon German user views Jane's summary page, the German user will see
topic titles in Japanese.

This commit prevents cache poisoning on the user summary page when content
localization is enabled.
2025-07-30 19:51:26 +08:00
David TaylorandMartin Brennan f6766f01b2 DEV: Fix & tidy html/body classes in chat (#33972)
Followup to 5873ea104d

Also remove the `scrollTop()`, which is now handled by `services/route-scroll-manager`.

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-07-30 12:38:27 +01:00
Jarek Radosz f7f7a19097 UX: Fix github repo oneboxes in chat (drawer) (#33955)
no more 2000px tall oneboxes
2025-07-30 13:27:44 +02:00
David Taylor 6620499035 DEV: Bump glint to latest alpha (#33970) 2025-07-30 12:10:52 +01:00
Natalie Tay dfd0c5208c FIX: Completion rate double-count and normalize (#33963)
This PR fixes 2 things. 

1. If a `post` was written in `ja` (Japanese) and for some reason also
had a `post_localization` that is `ja`, it becomes 200%
2. When getting completion progress for "English (US)", if there exists
a "English (UK)" localization, we want to include that
3. Previously the completion count was also getting `post_localization`
from posts that are not candidates. If the user switches
`ai_translation_backfill_limit_to_public_content` from false to true, it
would include previously localized PMs when it should not.

Follow up: https://github.com/discourse/discourse/pull/33927
2025-07-30 18:09:09 +08:00
David Taylor 5873ea104d DEV: Fix interaction between htmlClass and bodyClass (#33969)
If both helpers were used simultaneously to set the same class name on
the body and the html element, then classes would not be removed
properly.
2025-07-30 11:06:19 +01:00