This could cause assets (e.g. fonts) to try and load from
`www.example.com`, which led to an error. In the case of theme-qunit
tests this actually caused the run to fail. Not entirely sure why...
font failures shouldn't be catastrophic... but this is a good fix
regardless.
This is a very narrowly scoped migration to update badges.icon for two
deprecated names `smile` and `share-alt`. Following on from this PR that
updated the Badge seed fixture used as part of site creation:
https://github.com/discourse/discourse/pull/30942
The migration logic closely follows that of the [previous DB
migrations](https://github.com/discourse/discourse/pull/30100) that
updated all deprecated FA icon names, just that we reduce the mappings
to only look for `smile` and `share-alt`.
This commit fixes an SQL syntax error in
`UserBadge.update_featured_ranks!` when
the `user_ids` param is an empty array `[]`.
This was causing the `Jobs::BackfillBadge` job to raise the following
exceptions:
```
Job exception: ERROR: syntax error at or near ")"
LINE 6: AND user_id IN ()
```
This commit fixes the same error in
`UserState.update_distinct_badge_count` as well
Follow-up to 3e4eac0fed05daedcdea50d6275e143469d55eda
This will update properties that are used by the UsernameValidation
mixin to autotracking and also updates the use of Input component in
these templates to native inputs. This will help the refactor of the
mixin to a helper class that uses the modern Ember reactivity system.
As we start to translate more pages, we'll need a way for other sites to
link back to our translated topics.
This commit gives us the ability to use the "lang" URL param to define what
language a site should be in.
Related: https://github.com/discourse/discourse-translator/pull/199
This update makes some small improvements to the posts route front-end.
Specifically, it adds a title to the page, and it improves the
positioning of expand/collapse caret.
We are scrubbing the `Client-Ip` request header at the nginx proxy
because it is not a request header which we have decided to trust. Our
application should only use the `X-Fowarded-For` request header instead.
This change helps to resolve
`ActionDispatch::RemoteIp::IpSpoofAttackError`
errors from being raised by the `ActionDispatch::RemoteIp` when
the request headers contains both `Client-Ip` and `X-Forwarded-For`.
At the time of writing,
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
also states that "The HTTP X-Forwarded-For (XFF) request header is a
de-facto standard header for identifying the originating IP address of a
client connecting to a web server through a proxy server."
This commit updates the `Jobs::BadgeGrant` scheduled job to enqueue on
`Job::BackfillBadge` regular job for each enabled badge on the site.
The rationale for this change is that we started seeing the
`Jobs::BadgeGrant` job taking hours on sites with lots of enabled badges
as well as users because the job was backfilling all enabled badges
serially within the job. This is bad as it means that a `mini_scheduler`
thread is tied up
by this job thus reducing the overall capacity of `mini_scheduler` for
hours.
This PR raises an error on any deprecated icon names being converted by
`icon-library.js`, which will result in any deprecated icons introduced
in JS-land to fail qunit/system tests.
We'll do the same for `svg_sprite.rb` once I've resolved pre-existing
deprecated icons in core/plugins that's caught by the same exception
logic.
Followup to 7fc8d74f3eed52116add452b5321b41e02e04499
We need to check that the user export data exists before creating a model, since having an empty model will cause the UI to incorrectly think there's a user export to display.
This change shows the correct message, instead.
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"
/>