Skip to content

Conversation

@chrions
Copy link
Collaborator

@chrions chrions commented Aug 2, 2025

init

dbattersby and others added 30 commits July 29, 2025 16:24
…rse#33929)

Small cleanup from discourse#33495 to remove translations that are no longer
used.
Currently we don't display quote controls if you're ignoring the quoted
user:

<img width="500" alt="image"
src="https://github.com/user-attachments/assets/05f6b0b9-6f2a-4377-9c0e-0c9de4a71329"
/>

Previously in the non-glimmer post stream, we would show the controls.
The expand button was useless and showed no content, but the navigate to
post button could still be useful for finding the ignored post.

<img width="500" alt="image"
src="https://github.com/user-attachments/assets/5de052ed-b68a-45ec-87dd-80fc1823ad54"
/>

This PR restores the jump to post button in the glimmer post stream, so
someone can use it if they choose to:

<img width="500" alt="image"
src="https://github.com/user-attachments/assets/1af7a92e-672b-4c50-b42e-101c41f9336b"
/>
…ourse#33910)

The link we were using only applied to newly moved plugins, so wasn't
the best fit for all of them. This unlinks it.

I've also removed the plugin install banner and inlined it in the page
description. The blue banner was kind of intense for a message that's
always visible on the page. We need to retain the class there so it can
be hidden for sites on our hosting.

Before:
<img width="1802" height="988" alt="image"
src="https://github.com/user-attachments/assets/d101e0e0-9476-4077-9815-3427e0db69f4"
/>


After:
<img width="1778" height="804" alt="image"
src="https://github.com/user-attachments/assets/e04309e5-1d14-4f97-b43f-7f6ba7b8a483"
/>
…ourse#33932)

Because Horizon has a different drawer-composer interaction as default
(discourse#33677) this means that certain floating elements such as the
`fk-d-menu[data-identifier="usercard"]` and the
`chat-message-actions-container` need an adjusted z-index to remain
visible.

Scoped to chat-drawer for safety.
Slightly longer, but clearer if you're new and don't know what the
default theme's name is yet

Before:
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/518e1548-a188-4dea-bdee-5f00d403945e"
/>


After:
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/36d98a55-a6fe-4f0a-b916-46517c2e1a10"
/>
…e#33928)

This commit reimplements inline footnotes to use our standard FloatKit
tooltip system, which also allows us to enable them in the markdown
composer preview.
…rse#33931)

When the y-axis value is 0 and the column type is percent, display 0%
instead of replacing it with an em dash. Only show an em dash when the
value is null or undefined.
…se#33938)

This fixes a width blowout in theme settings (caused by
discourse@8fea4ea),
and improves width restriction so it doesn't apply on narrower screens
where it may not be needed. This behavior is unified behind a reusable
`--admin-content-max-width` variable.


Before: 
<img width="2262" height="1586" alt="image"
src="https://github.com/user-attachments/assets/a69a435c-1880-4b02-adf8-ff3e6cc98a69"
/>


After: 
<img width="2248" height="1582" alt="image"
src="https://github.com/user-attachments/assets/8a666bdc-797a-40f0-8ae8-b857e48c554a"
/>


Before: 
<img width="1654" height="1714" alt="image"
src="https://github.com/user-attachments/assets/12e45ae5-2e93-40d1-8eac-56f5d9735a10"
/>


After:
<img width="1920" height="1684" alt="image"
src="https://github.com/user-attachments/assets/aae98eb2-3967-4c20-87aa-110696c8852d"
/>
Missed a couple things re: custom inserts upon splitting the
`*.text/html.erb`s into partials.

Before (custom text shows up _after_ popular topics section):
<img width="829" height="370" alt="Screenshot 2025-07-28 at 5 02 35 PM"
src="https://github.com/user-attachments/assets/e1d0ab13-085d-4eb3-8433-1cac105cea7e"
/>

After (custom text shows up _before_ popular topics section):
<img width="754" height="308" alt="Screenshot 2025-07-28 at 5 02 00 PM"
src="https://github.com/user-attachments/assets/83380f1d-c0d4-4a7f-9e6b-c23556573ed7"
/>

<img width="747" height="241" alt="Screenshot 2025-07-29 at 8 25 11 AM"
src="https://github.com/user-attachments/assets/e3550210-94e7-4efe-acb1-aadd034cb683"
/>
<img width="751" height="217" alt="Screenshot 2025-07-29 at 8 25 15 AM"
src="https://github.com/user-attachments/assets/bb51ce21-4117-4d7b-a8a0-a9dde1d8485c"
/>
Replaces the `...` button with a more recognizable superscript number.
This matches the styling of footnotes in the new rich-text-editor.
We have to revert the `mention` mixin back from `inline-flex` to`
inline-block`, due it also being used within text, and without
`inline-block`, the alignment with text is impossible to get right.

Other than that this commit also:
* replaced some of the spacing units with the new vars
* removed unused `hashtag` css (replaced by `hashtag-raw` and
`hashtag-cooked`)
* streamlines sizing to using `.93em` everywhere and making sure
elements don't get a double dose sizing by also applying `font-down-1`
* try to simplify the logic between icon-square-emoji

This should look like:
### Hashtag autocomplete
<img width="688" height="536" alt="CleanShot 2025-07-29 at 16 07 36@2x"
src="https://github.com/user-attachments/assets/9430da6b-a132-4285-8cc0-c5f6dd2d6d1a"
/>

### Hashtag cooked
<img width="1510" height="192" alt="CleanShot 2025-07-29 at 16 08 27@2x"
src="https://github.com/user-attachments/assets/1b63c036-9333-4c76-bc98-30983cfc5bea"
/>
…ourse#33930)

Editing category localizations was missed out in
discourse#33790.

This PR fixes the bug.
This commit helps set us up for set us up for
<https://meta.discourse.org/t/content-localization-and-automatic-translations-for-your-community/370000#p-1792778-community-translation-progress-dashboard-7>,
so that we make sure the Posts, Topics, and Categories to be backfilled
have the same criteria as the ones shown on the translation progress
dashboard.
This commit refactors the post update logic in the post stream and store
services to minimize unnecessary UI rerenders:

- In `StoreService`, properties are selectively updated: only changed
values are applied, preventing redundant updates and improving render
efficiency.
- Uses `untrack` to avoid creating unwanted Glimmer tracking contexts
during property comparisons, reducing computation errors.
- All property updates are batched to trigger a single rerender.

This PR is improves discourse#33864
which was reverted by discourse#33917
due to the possibility of tracking errors in edge cases.
A followup to discourse#33795

1. the hover effect was broken in Safari (because it was trying to
emulate a background by setting a box-shadow of a small child element)
<img width="45" height="47" alt="image"
src="https://github.com/user-attachments/assets/53deaa3c-d4f5-4b02-ad74-ec464cd12d38"
/>
2. in <= 400px height viewports elements were overlapping eachother and
icons moved on hover
<img width="40" height="64" alt="Screenshot 2025-07-26 at 12 17 21"
src="https://github.com/user-attachments/assets/950ef5f0-6d80-418f-b522-78a58730174f"
/>
3. changing `--user-menu-border-width` had issues: at 0px and at >= 3px
icons would move on hover, and increasing the value would make tabs
overlap with the border
<img width="49" height="93" alt="image"
src="https://github.com/user-attachments/assets/4e514f02-437c-4bfd-8d98-f0dffdfccac5"
/>
…#33913)

## 🔍 Overview
Previously, it was possible to see gaps in usage charts despite data
being present, due to the user's timezone. This update ensures that the
AI usage report is timezone aware rather than using UTC and converting
when generating reports.
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.13.2 to
1.13.3.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
-
[Commits](swc-project/swc@v1.13.2...v1.13.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [json](https://github.com/ruby/json) from 2.13.1 to 2.13.2.
- [Release notes](https://github.com/ruby/json/releases)
- [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md)
- [Commits](ruby/json@v2.13.1...v2.13.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This PR introduces a modern floatkit-based autocomplete system for the
core composer (both rich text / markdown modes), intended to replace the
legacy jQuery-based implementation. This will be enabled via a site
setting for now. All tests that cover the legacy implementation are
duplicated with the site setting enabled to ensure they keep functional
parity.

### What's changed:

* The autocomplete menu remains open between searches while typing
within a search term, instead of closing and reopening (this looks like
the menu flickering, especially if the searches are quickly resolving).
* Flip behaviour now works (the autocomplete menu should never overlap
with the header, and will appear below the cursor if there's not enough
space to appear fully in the viewport)
* On any mouse-down event outside the menu, the menu will immediately
close (previously, it stayed open during the grippie drag up/down of the
composer drawer, and closes on mouse-up)
* Preserves exact CSS structure and selectors for existing
themes/plugins
* Better use of native browser APIs
*
[scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)
API is used for handling scroll within the hashtag autocomplete menu
instead of manual calculation
*
[requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame)
API is used to better time the opening of the autocomplete menu with
repaint during pasting of autocompletable terms
* `position: absolute` CSS was removed - this didn't seem to affect the
old autocomplete during testing, and keeping it broke positioning for
the Floatkit-based autocomplete

### What's the same:

* All templates specific to the different types of autocomplete (user &
group / hashtag / emoji) remain exactly the same
* we update the selected class that's used to highlight the item in the
autocomplete menu while navigating it via keyboard the same way we do in
the old autocomplete - it's fairly imperative, but allows us to avoid a
deeper refactor (including an entirely new set of templates)
Using ENTER on the composer link modal was having unwanted consequences
because of a misplaced preventDefault.
dependabot bot and others added 13 commits July 30, 2025 02:19
)

Bumps [@rollup/browser](https://github.com/rollup/rollup) from 4.46.1 to
4.46.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v4.46.1...v4.46.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…discourse#33952)

Bumps [mime-types-data](https://github.com/mime-types/mime-types-data)
from 3.2025.0722 to 3.2025.0729.
-
[Changelog](https://github.com/mime-types/mime-types-data/blob/main/CHANGELOG.md)
-
[Commits](mime-types/mime-types-data@v3.2025.0722...v3.2025.0729)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 6.5.0 to
6.6.0.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
-
[Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli/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>
The previous form template validator did not detect non-existent tag
group names, which would result in the page being saved normally when an
incorrect name was entered, but causing the interface to crash during
preview and a 500 error to be thrown when the user used it.

This commit adds detection for non-existent tag group names and fixes
this issue
this migration was fragile, avoid it. will only impact ancient instances that have not updated in 8 years.
This is a continuation of discourse#33895, implements automatic resetting of
topic bump date when a last reply is unhidden, so the topic will back to
the correct place it belongs on /latest based on its last public post.
Introduced in 497bfec.

This test was flaky due to the page having multiple uploaders on the same page, so the `have_css(".uploaded-image-preview.input-xxlarge")` check will always be true for the entire page. It would sometimes work correctly depending on if the uploader managed to finish quickly enough.
The `choices` are actually expected to be sorted alphabetically, and the tag fabricator might generate three tags like `["tag9", "tag10", "tag11"]` while we expect it to also sort alphabetically as `["tag10", "tag11", "tag9"]`
If a user had the composer mode set to RTE or Markdown,
and started a new post or topic, the composer remembered
this preference and used it in the editor.

However, when the user navigated to their messages and started
a New Message, the composer mode was not being remembered.

This was happening because we fetch the user when opening the
inbox, and this ends up replacing the currentCurrent user service
object in memory. We only added `composition_mode` to the
`CurrentUserSerializer` originally, so we lost this property when
fetching the user again.

The fix here is to just add `composition_mode` to the
`UserOptionSerializer`
There's a race condition in this test that could cause the composer value to not have been updated before the test tries to read the value.

The composer page object makes use of the `has_field?()` test, which will wait until the value has been updated properly.
…iscourse#33968)

Prevents flaky tests related to the AI Bot homepage's persona selector.

```
AI Bot - Homepage when glimmer_post_stream_mode=enabled when ai_bot_enable_dedicated_ux is enabled allows navigating to a specific LLM and persona

Capybara::ElementNotFound:
  Unable to find css ".select-kit-header[data-name='Test Persona']" within #<Capybara::Node::Element tag="details" path="/HTML/BODY[1]/SECTION[1]/DIV[1]/DIV[3]/DIV[2]/DIV[2]/DIV[1]/DIV[1]/DIV[1]/DETAILS[1]">
```

```
AI Bot - Homepage when glimmer_post_stream_mode=enabled when ai_bot_enable_dedicated_ux is enabled includes persona in selector when allow_personal_messages is enabled

Capybara::ElementNotFound:
  Unable to find css ".select-kit-collection li[data-name='Test Persona']" within #<Capybara::Node::Element tag="details" path="/HTML/BODY[1]/SECTION[1]/DIV[1]/DIV[3]/DIV[2]/DIV[2]/DIV[1]/DIV[1]/DIV[1]/DETAILS[1]">
```
/t/159725
…3969)

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.
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: discourse#33927
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.