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.
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.
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.
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.
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.
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.
## 🔍 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"
/>
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.
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.
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.
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
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:
- 
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.
## 🔍 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

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.
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
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.
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>