Commit Graph

59687 Commits

Author SHA1 Message Date
249d9514c8 DEV: Import user title in generic_bulk 2025-06-15 15:56:36 +02:00
fb7fa2902c UX: suppress chat's Mod-K on rich editor (#33206) 2025-06-14 09:58:59 -03:00
d1932430c1 UX: Add classes to read/unread user menu messages items (#33203) 2025-06-13 16:47:28 -05:00
15ec15f2a5 UX: display URL on rich editor link toolbar (#33188)
Works better with changes from
https://github.com/discourse/discourse/pull/33187


![image](https://github.com/user-attachments/assets/cc69b796-6a2a-4461-b52b-bf9d94b43f06)


![image](https://github.com/user-attachments/assets/002a119f-3a18-41a3-8905-c0f461833c17)
2025-06-13 18:03:17 -03:00
777b80be6c UX: make all preference icons unique (#33202)
We repeat the user icon here, making the icons kind of pointless.

This changes the account and profile icons to potentially be a little
more useful.

Before:

![image](https://github.com/user-attachments/assets/2fce16fb-5ddf-4cd2-9053-c5a946f9500c)

After:

![image](https://github.com/user-attachments/assets/729962c9-c466-456a-95a6-04a767d95ed3)

Mentioned here:
https://meta.discourse.org/t/ux-improvements-on-header-dropdown-notifications/370110
2025-06-13 15:13:09 -04:00
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
bc4844cb93 FEATURE: allow date-based filters to accept a day count (#33197)
This allows date based filters to use a count of days as well as the
existing date string system (`YYYY-MM-DD`). This is convenient if you
want a dynamic list based on the current date, you could use:
`created-after:7` to return topics from the past week.

This will work for: 

 - created-before/after
 - activity-before/after
 - latest-post-before/after
 
This also makes filters consistent with our existing query params like
`?before=7`



This came up in:
https://meta.discourse.org/t/creating-a-custom-filter-homepage/370062
and is something that we mentioned internally while defining our domain
specific language for the /filter route, but never implemented.
2025-06-13 13:45:50 -04:00
038e511552 DEV: define CSS variables for button colors (#33162)
This adds sets of CSS button variables that can be overridden in themes.
This won't change any default styles, but just provides a less
problematic method of customization.

The current suggested way of doing this is with SCSS like so:

```scss
.btn-default {
  @include btn(
    $text-color: var(--tertiary),
    $bg-color: var(--secondary),
    $icon-color: var(--tertiary-high),
    $hover-text-color: var(--tertiary),
    $hover-bg-color: var(--tertiary-very-low),
    $hover-icon-color: var(--tertiary)
  );
}
```

The trouble with this is that it brings along _all_ the btn mixin
styles, so you also end up re-setting things like this, in addition to
changing colors:

```scss
.btn-default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  // and also the colors 
}
```

That can problematic because it can override existing button styles
(e.g., if you already altered a single instance of margin). With these
new CSS custom properties, you can avoid this by doing:

```css
:root {
  --d-button-default-text-color: var(--tertiary);
  --d-button-default-text-color--hover: var(--tertiary);
  --d-button-default-bg-color: var(--secondary);
  --d-button-default-bg-color--hover: var(--tertiary-very-low);
  --d-button-default-icon-color: var(--tertiary-high);
  --d-button-default-icon-color--hover: var(--tertiary);
}
```

So now you can override the button colors without bringing along other
styles from the btn mixin.

I also removed an old `.btn.hidden` style, as we already apply
`!important` to the `.hidden` class elsewhere. Comments have also been
updated to pass our new linting rules.
2025-06-13 11:32:58 -04:00
5c932410ba FEATURE: sharing link to PWA renders url in title in new Topic to leverage core link expansion (#32631)
Discourse has a fantastic feature whereby when installed as PWA (on
Android or Windows), you can share content to that Discourse from other
apps and browsers.

Currently when sharing a link to a Discourse PWA, it pre-populates a
draft Topic body with the link.

Whilst this is really nice already, we can improve this further.
Currently, sharing a link to the body misses out on the auto-magic core
feature of pasting a link in the title which simultaneously hydrates a
title from the og tag and creates a one-box in the body.

This PR remedies this whilst carefully maintaining the current behaviour
for text shares.

Documentation for the standard is here:


https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/How_to/Share_data_between_apps

Demo of this working change is implemented in this plugin:

https://github.com/merefield/discourse-share-to-link-oneboxer

I added a test to check presence of share target in manifest endpoint.
2025-06-13 11:25:13 -03:00
fcaeaf09fa UX: few composer and toolbar style changes (#33187) 2025-06-13 10:46:08 -03:00
19c1932144 Revert "FIX: import Horizon system theme" (#33196)
Reverts discourse/discourse#33193
2025-06-13 14:32:45 +01:00
5392c4d851 Build(deps-dev): Bump mime-types-data from 3.2025.0603 to 3.2025.0610 (#33189)
Bumps [mime-types-data](https://github.com/mime-types/mime-types-data)
from 3.2025.0603 to 3.2025.0610.
-
[Changelog](https://github.com/mime-types/mime-types-data/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/mime-types/mime-types-data/compare/v3.2025.0603...v3.2025.0610)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-13 14:16:36 +02:00
db540d5a2b Build(deps-dev): Bump puppeteer-core from 24.10.0 to 24.10.1 (#33192)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.10.0 to 24.10.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
-
[Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v24.10.0...puppeteer-core-v24.10.1)

---------

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-06-13 14:15:40 +02:00
fcf66dd8de DEV: Update URL for component-template-resolving deprecation (#33194) 2025-06-13 10:04:31 +01:00
7562bc2b15 FIX: import Horizon system theme (#33193)
System themes were introduced here -
https://github.com/discourse/discourse/pull/32681

In this PR, Horizon is imported.
2025-06-13 12:30:34 +08:00
2536768a43 FEATURE: system themes (#32681)
Introduction of system themes.  System themes are local themes which:
- Cannot be deleted;
- Cannot have “custom code” added, components only;
- Cannot have uploads;
- Cannot edit color palettes;
- Are updated on deploy, like core plugins.

This PR added the Foundation system theme, which is an empty theme like
Default. The Foundation theme will be added in the next PR.

In a development environment, when system theme files are
changed/added/deleted, the theme is reuploaded and the page is reloaded
to make it a good experience for the engineer working on improvements.

System themes are not visible until
`SiteSetting.experimental_system_theme` is enabled.
2025-06-13 10:36:31 +08:00
c6d926eee7 FEATURE: Clear bookmark reminders from bookmark menu (#33168)
This commit adds a new option in the bookmark menu for existing
bookmarks that allows users to clear the bookmark reminder without
having to delete the bookmark or edit it manually.
2025-06-13 10:37:08 +10:00
fbe754108f DEV: Try fix flaky search shortcut variation test (#33169)
We weren't checking for visibility enough before scrolling
I think
2025-06-13 10:06:54 +10:00
bd6cf79447 Revert "FIX: improves text selection of posts (#33143)" (#33190)
This reverts commit 876dbe66299a7f0d3df71ae9064890a79d228321.
2025-06-13 01:10:25 +02:00
7a9045fa86 DEV: Refactor flakey post stream spec (#33182)
Reorganized the post reply and edit test to mitigate flakiness
2025-06-12 19:26:49 -03:00
9f4ac9dbbf UX: Onebox margin-top of first child (#33088) 2025-06-12 13:47:08 -05:00
1b181d15d1 FIX: Include common_theme CSS in published pages (#33179)
Followup to 4d0a817f4040ed9dd11c87654e25df2b35f1d778


https://meta.discourse.org/t/published-page-css-not-showing-on-frontend/369642
2025-06-12 19:07:48 +01:00
0607c47597 DEV: Improvements to post language selector (#33178)
## 🔍 Overview
Sometimes users may overlook that there is a post translations selector
when writing posts. This could lead to the site's default locale being
used when a post is written in the user's preferred language.

This update ensures that:
- the user's `effective_locale` is used as the default for the
`PostLanguageSelector` in the composer
- when the user's `effective_locale` is not one of the
`experimental_content_localization_supported_locales`, we default to
blank so that the `post.locale` doesn't get set
- we also allow for setting a "none" option in the language selector for
cases where the user wants to post in a language that is not part of
`experimental_content_localization_supported_locales`

## 📷 Screenshots
<img width="216" alt="Screenshot 2025-06-12 at 07 03 56"
src="https://github.com/user-attachments/assets/651b9387-de57-408f-9445-92501bd47567"
/>
2025-06-12 08:10:57 -07:00
9bc8395575 UX: adjust bookmark hover and active states (#33177)
These were some old hover and active states, this updates to use the
proper color variables


Before (yellow active, blue hover):


![image](https://github.com/user-attachments/assets/f81afd39-0dca-49e3-b1e8-f44b2e035bdd)



![image](https://github.com/user-attachments/assets/013a8258-e6b6-49bf-8add-8ad57125de3b)



After (blue active, grey hover): 

![image](https://github.com/user-attachments/assets/081e9650-db71-49ce-bd7f-e5aebebdea84)


![image](https://github.com/user-attachments/assets/8e6fefaa-815b-4ebb-b111-dbebe7eaa93d)
2025-06-12 10:36:30 -04:00
c2b707306a DEV: add valueTransformer customization points to flag.gjs (#33113)
adds valueTransformers to the "Flag" button component:
flag-button-render-decision: whether to show the flag
flag-button-disabled-state: whether the flag button should be in a
disabled state
post-action-menu__flag create-flag: ability to add class to flag button.

also adds "like-button-render-decision" valueTransformer to Like button,
which determines whether to show or hide the like flag.
2025-06-12 10:24:13 -04:00
876dbe6629 FIX: improves text selection of posts (#33143)
This commit is applying different techniques to make selecting text of a
post less error prone:
- ensure we only ever show the toolbar when the common ancestor of a
range is cooked
- ensures the menu is not interfering with text selection
- do not compute the menu while selection is changing, only when pointer
is released

The situation was very bad on android but it should also improve other
situations.
2025-06-12 15:06:24 +02:00
be1782681f UX: Remove duplicate class from time-gap in post-stream widget (#33175)
Follow-up to 66564434330e52958cf3a4e90ca1b500b7f40f4c, to fix issue
reported here:
https://meta.discourse.org/t/super-long-line-in-topic-causing-page-to-be-sidescrolled-a-lot/369637

The addition of the class in the glimmer template resulted in
double-classes in the post stream widget. Removing the small-action
class fixes this in the widget post-stream without breaking the glimmer
post-stream.

Before (note the timegap line going through the timeline):

![image](https://github.com/user-attachments/assets/fefa9d5c-2352-4616-9689-0023d24b3cfe)



After (widget):

![image](https://github.com/user-attachments/assets/66b65943-a2d3-4514-a90d-376b024f0a9b)


After (glimmer):

![image](https://github.com/user-attachments/assets/0cb22ada-14bb-4a4d-92ae-f6b6786c762a)
2025-06-12 08:59:19 -04:00
b7d04a0d8c DEV: Raise error when select-kit resolved component is missing (#33173) 2025-06-12 12:57:36 +01:00
ce3b534ae2 FIX: Unread-icon-size (#33163)
Two applications of `--font-down-1` are making this icon *slightly*
smaller if it is unread. This should not be the case.
2025-06-12 21:22:27 +10:00
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
7b86dcd8fa Build(deps): Bump postcss from 8.5.4 to 8.5.5 (#33164)
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.4 to 8.5.5.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.4...8.5.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-12 10:26:43 +02:00
6aee048783 FIX: Add @enabled arg to <LoadMore /> component (#33122)
This commit adds an @enabled boolean to `<LoadMore />` to allow for
cases where the element is visible in the viewport but you don't want to
allow the `loadMore` behaviour. A use case for this is when our
controllers return some `canLoadMore` boolean. There is no use
attempting to load more from the server in this case, there will be
nothing else.

I also moved the CSS styles for the `<LoadMore />` component into
a new file.

This also fixes a bug in the users list shown here
https://meta.discourse.org/t/users-list-only-partial/368793
2025-06-12 15:50:24 +10:00
1d05f6b3f4 Build(deps): Bump rack-mini-profiler from 3.3.1 to 4.0.0 (#33165)
Bumps
[rack-mini-profiler](https://github.com/MiniProfiler/rack-mini-profiler)
from 3.3.1 to 4.0.0.
- [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/v3.3.1...v4.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-12 14:17:29 +10:00
3019b1b3b1 UX: add missing toolbar separator css (#33166)
Missing CSS from link UI PR
2025-06-11 21:51:04 -03:00
e39c7b4cbb DEV: Add Plugin modifier for reviewable creation (bot posts) (#33161)
I need reviewables to be created for bot users in a private plugin. This
allows me to do that.
2025-06-11 14:57:33 -05:00
5314b6aa82 DEV: Improve quoted post handling and enhance decorator stability (#33154) 2025-06-11 16:38:19 -03:00
4d380a28e7 FEATURE: Add post language on creating a new post (#33160)
This is a second attempt at:
https://github.com/discourse/discourse/pull/33001

We had to [revert the
commit](https://github.com/discourse/discourse/pull/33157) because it
was performing a site-setting check at boot time, which is prone to
issues and not allowed.

This PR:
- re-introduces the changes in the original PR
- a fix by not performing a site-setting check at boot time (verified
by: `SKIP_DB_AND_REDIS=1 DISCOURSE_DEV_DB="nonexist" bin/rails runner
"puts 'booted'"` locally and should be caught by the new CI check
introduced here: https://github.com/discourse/discourse/pull/33158)
- adds a fix to the translation editor to not show the original post
locale in the dropdown, as well as adding an indicator of what the
original post locale is in a small badge in the header:
- ![Screenshot 2025-06-11 at 08 42
36](https://github.com/user-attachments/assets/5f0944c5-ec4d-40b3-b97f-25b1fcab8329)
2025-06-11 10:39:01 -07:00
73e9ab1caf UX: Properly center-align buttons in login-required screen (#33159)
Hard to take a screenshot, the "Log In" button having a right margin
forced the rest of the block to be slightly misaligned. It's not visible
on the default screen, but quite visible when adding other
centre-aligned elements to the page.
2025-06-11 12:08:59 -04:00
25f6984006 DEV: Add SKIP_DB_AND_REDIS bootability check to CI (#33158) 2025-06-11 16:25:24 +01:00
d5b72a54ae Revert "FEATURE: Add post language on creating a new post (#33001)" (#33157)
This reverts commit b55af383f779d01d983a3ccf1149438aee9c6725.
2025-06-11 08:01:56 -07:00
b55af383f7 FEATURE: Add post language on creating a new post (#33001)
## 🔍 Overview
Previously we added the ability to translate existing posts in different
languages: https://github.com/discourse/discourse/pull/32564. In this
update we add the ability to set a post language upon initially creating
a post.

Internally, we also clean-up/improve a few things, like:
- adding a `PostLanguageSelector` component
- Adding a `available_content_localization_locales` onto `SiteSetting`
so it's available in the service (without needing to parse the JSON to
access it)
- fix issues with the translation-editor not working due to some
regressions from here: https://github.com/discourse/discourse/pull/32869
- ensure everything works for replies/drafts/edits

## 📷 Screenshots
![Screenshot 2025-06-05 at 12 03
24](https://github.com/user-attachments/assets/ff334575-ba30-4c52-9e9a-4054f69795ec)
2025-06-11 07:29:05 -07:00
1f2efa7954 FEATURE: Add utilities for importing and exporting backups (#32992)
This commit introduces new features and utilities related to the backup
and restore system that make use of remote URLs:

- `discourse restore` accepts a URL to a backup file

- `discourse backup_url` generates a URL of a backup file (S3 only)

- `discourse import_backup_url` downloads a backup file from a URL to
the configured backup store

This can be used to move content between two Discourse instances by
backing up the entire site, copying the backup URL, importing or
restoring it on the other instance.
2025-06-11 15:44:10 +03:00
fd4890b5d3 FEATURE: rich editor link ui for editing it (#32583) 2025-06-11 08:51:27 -03:00
80970f6818 Build(deps-dev): Bump @swc/core from 1.11.31 to 1.12.0 (#33151)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.11.31 to
1.12.0.
- [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.31...v1.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-11 12:40:04 +02:00
f7a2702f2b Build(deps-dev): Bump @discourse/lint-configs from 2.21.0 to 2.22.0 (#33027)
Bumps
[@discourse/lint-configs](https://github.com/discourse/lint-configs)
from 2.21.0 to 2.22.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>
2025-06-11 20:30:58 +10:00
ebbea74d94 Build(deps): Bump rack from 2.2.13 to 2.2.17 (#33152)
Bumps [rack](https://github.com/rack/rack) from 2.2.13 to 2.2.17.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.13...v2.2.17)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-11 17:22:47 +10:00
976886ab7c FEATURE: Indicate if a localization might be outdated based on version number (#33148)
We will not update localization on every edit for now. To compensate,
the existing indicator will also add information if a translation might
be outdated.

Related: https://github.com/discourse/discourse-ai/pull/1422

/t/156185
2025-06-11 11:04:05 +08:00
829b1bd6fd FIX: Allow setting blank secret on an existing webhook (#33096)
We had a regression where you can no longer update an existing webhook to have a blank secret field.

The problem is the blank field will return a value of undefined, which is ignored by the store when sending the request to the back-end.

This fixes that by using the nullish coalescing operator to replace undefined with an empty string.
2025-06-11 09:53:12 +08:00
c651983877 DEV: Refactor grippie resizer from composer into Modifier (#33046)
This commit takes the dragging behaviour of the grippie
element (the blue bar) at the top of the composer and makes
it into an ember Modifier for use in more places.

The first usage is to add a grippie resizer to the bottom of AceEditor
to followup f819b1ec4dc96e78de075e15df37d114851f785c, since
the `@resizable` option allows the user to vertically resize
the code editor.

Custom composer-related behaviour is now done via callbacks from
the modifier. The .grippie CSS class has been hoisted so the style
applies everywhere, then AceEditor modifies the appearance to blend
a bit better.

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2025-06-11 11:08:11 +10:00
8efee7d875 Revert "DEV: Improve quoted post handling and enhance decorator stability (#33111)" (#33153)
This reverts commit cf9e4dec90884505b6dead93685dc00628e737b1.
2025-06-10 21:49:54 -03:00