Because of
2b63830496
`Which topic do you want to reply to rendering HTML` was rendering raw
HTML.
Added `htmlSafe` for now.
I'll work on testing for this feature.
The name "Staff Notice" was not quite right since TL4 users
can also add these notices. This commit changes the wording to
"Official Notice".
In addition to this, currently you have to go look into the staff
action logs to see who is responsible for a notice. This commit
stores the ID of the user who created the notice, then shows this
information on each notice to staff users.
Finally, I migrated the ChangePostNoticeModal component to gjs.
Follow-up to 7fc8d74f3eed52116add452b5321b41e02e04499.
This change moves the guardian check for whether an export has been generated too recently to the endpoint handler, since we only want this check to apply when generating an export.
The GDPR requires all users to be able to export their data, or request an export of their data. This is fine for active users as we have a data export button on user profiles, but suspended users have no way of accessing the data export function, and the workaround for admins to export data for suspended users involves temporarily unsuspending them, then impersonating the user to export the data as them.
Since suspended users no longer have access to their account, we can safely assume that the export request will be coming via a medium outside of Discourse (eg, email). This change is built with this workflow in mind.
This change adds a new "User exports" section to the admin user page, allowing admins to start a new export, and to download the latest export file.
Recently we introduced a new `PostList` component (d886c55f63). In this update, we make broader adoption of this component. In particular, these areas include using the new component in the user activity stream pages, user's deleted posts, and pending posts page. This update also takes the existing `posts` route and adds a barebones front-end for it to view posts all in one page.
---------
Co-authored-by: David Taylor <david@taylorhq.com>
We stop propagating the `touchmove` event in the composer to ensure that
the page doesn't scroll inadvertently. We should only do this if no text
is selected, otherwise we block making changes to the text selection on
the `textarea` element.
adds a hidden site setting, "prioritize_full_names_in_ux", whose effect is to prefer full names in user-menu notifications
Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
`replaceText` will replace some text, then call `selectText()` to
restore the cursor position. However, selectText was asynchronous, so
calling `replaceText()` multiple times in the same runloop iteration
would cause the cursor to jump to an unexpected place. This likely
explains some of the weird behavior we've seen with upload-markdown
replacement
We're embarking on a project for overhauling the color palette and theme
systems in Discourse. As part of this project, we're making each color
palette include light and dark modes instead of the status quo of
requiring 2 separate color palettes to implement light and dark modes.
This commit is a first step towards that goal; it adds a code path for
generating and serving `color_definitions` stylesheets using the
built-in dark variant of a color palette. All of this code path is
behind a default-off site setting `use_overhauled_theme_color_palette`,
so there's no change in behavior unless the setting is enabled.
Internal topic: t/141467.
The solution in (https://github.com/discourse/discourse/pull/30547)
using `em` units was causing readability problems for code blocks in
mobile. This reverts to the previous solution
(https://github.com/discourse/discourse/pull/30536) of using `font-size:
inherit` for code within heading elements.
The downside is that the code in heading won't be slightly smaller than
the other text like it is for inline code in paragraphs, but it seems
worth it to avoid causing other size issues.
Mini_racer was redesigned to keep all V8 vm integration on a dedicated
thread.
Previous attempts at upgrades had lots of stack poisoning across V8
owned
and Ruby owned threads that were leading to segfaults.
We will monitor the new design in production to see how robust the new
solution is.
Users can now decide if they want to send a message on:
- <kbd>enter</kbd>
- <kbd>meta + enter</kbd>
If you choose <kbd>meta + enter</kbd>, <kbd>enter</kbd> will add a
linebreak.
<img width="192" alt="Screenshot 2025-01-21 at 12 57 48"
src="https://github.com/user-attachments/assets/abfd6f8b-83b3-4e6f-be67-8f63d536ca8a"
/>
Related to https://github.com/discourse/discourse/pull/30893
As part of the theme overhauling project, we're making each theme fully
own/control its color palette which can be edited directly on the theme
page. To make this possible, we need to introduce a special type of
color palettes that are marked as "owned by a theme" in the database
which aren't displayed in the admin color palettes page and can't be
edited from it. This commit is the first step of this change; it adds a new
join table to associate a color palette with a theme. For now, we're
keeping the relationship one-to-one (hence the `UNIQUE` indexes), but we
may later change it to one-to-many.
Internal topic: t/141648.
In https://github.com/discourse/discourse-fonts/pull/15 we are
introducing special font properties for certain fonts,
specifically the `font-variation-settings` and `font-feature-settings`.
For now this will only apply to Inter, but we may do it for other
fonts in future.
This commit makes it so the color_definitions.css file includes
these special properties for each font, either defined on the
root `html` element for the body font or on the `h1-h6` elements
for the heading font. This is done in this way because defining
them on `@font-face` is ignored by the browser.
This also ensures special CSS classes for the wizard container
e.g. wizard-container-font-FONTID are defined, this is so we can
use these special properties scoped to the font selected in the
wizard, which will affect the way the canvas preview is rendered.
Here is an example of before/after with special properties applied to
Inter,
in this case:
```css
font-variation-settings: 'opsz' 28;
font-feature-settings: 'calt' 0, 'ccmp' 0, 'ss02' 1;
```
When we initially turned on admin sidebar for new sites,
existing sites had the value set to -1. We need to show
the problem check to these sites too, but currently it only
checks if `admin_sidebar_enabled_groups` is empty.
"context" notation is not supported in iOS < 16.4, and we don't have any
post-processing on our CSS files which can automatically make that
conversion.
For now, changing the stylelint config to enforce the more-compatible
syntax, and updating all occurences.
```
Checking for expected text of nil is confusing and/or pointless
since it will always match. Please specify a string or regexp instead.
plugins/chat/spec/system/chat_message_interaction_spec.rb:51
```
This fixes an issue where topics could scroll horizontally on mobile:
https://meta.discourse.org/t/topic-page-layout-issue/348262?u=pmusaraj
It seems some recent core change impacted the read state size/position
This sets the size and position to more static values (not based on
global font changes) to avoid the issue, and removes the horizontal
scroll.
c171e3dc works well in Safari, because the browser ignores the
`user-scalable=no` directive. However, PWA/Hub do respect the directive,
which means that it stopped pinch-zooming from working.
This commit updates the strategy for those environments so that the
viewport is only locked briefly during a focusin event. The simpler
strategy is maintained for the real safari browser.