Follow up from https://github.com/discourse/discourse/pull/31559.
We expect some standard headers to be added from
`Rails.application.config.action_dispatch.default_headers` for
responses, however these were found to be removed in some error paths.
For more detail on this behaviour, refer to https://github.com/discourse/discourse/pull/31619#issuecomment-2699644232.
This PR adds those headers back if they aren't there, with the caveats
that we don't add headers that are irrelevant for non-HTML responses,
and neither do we add X-Frame-Options which is intentionally removed for
embeddables.
* Added a subtle left border to the indented field to improve visual
hierarchy
* Updated the caret to align with other expandable elements for
consistency
This change ensures that queued posts that have ended up in the review queue due to matched a watched word display correctly.
It also improves the data checking to ensure that any other reviewables with watched words don't break the review queue, either.
We are developing our new composer, and it would be useful
if we could know how posts are being created by members.
To this end, we are going to start storing the following
on post_stats, which are created at the same time as a post
is created:
* writing_device - Based on `BrowserDetection.device`, which in
turn is based on user agent. Will store .e.g iphone, android,
mac, windows etc.
* writing_user_agent - Stores the full user agent (truncated at
400 chars) of the device/browser the member used to write the post.
* composer_version - Either `1` for our old composer, or
`2` if the new rich composer is enabled in site settings and
the user has toggled it on
Only notable changes is that we added
internal support for TimeWithZone which
was absent from previous release
We also improved error messages for T_OBJECT
- Update Meta topic URLs
- Add theme/plugin identification to deprecation
- Enable admin warning banner
- Enable overriding of gjs component templates, to unblock core upgrade
work between now and final removal of the template override feature
https://meta.discourse.org/t/355668
Continues the work done on
https://github.com/discourse/discourse/pull/30815.
Adds a `table` node and its descendants – `table_head`, `table_body`,
`table_row`, `table_header_cell`, `table_cell` –, its Markdown
serializing/parsing logic, and a plugin to use the first body **row** of
a head-less table as the **header** when pasting `text/html`.
Continues the work done on
https://github.com/discourse/discourse/pull/30815.
Adds a `quote` node, its Markdown serializing/parsing logic, and a
plugin to select the node when the quote header is clicked.
Continues the work done on
https://github.com/discourse/discourse/pull/30815.
Replaces the ProseMirror's default `link` mark to support
Discourse-specific features, its Markdown serializing/parsing logic, a
`[caption](link)` input rule, and a plugin to auto-linkify URLs when
they're pasted as `text/plain` or `text/html`.
Continues the work done on
https://github.com/discourse/discourse/pull/30815.
Adds an `image` node, its Markdown serializing/parsing logic, and a
plugin to auto-resolve `upload://hash` short urls.
Continues the work done on
https://github.com/discourse/discourse/pull/30815.
Adds an `emoji` node, its Markdown serializing/parsing logic, and input
rules for `:emoji:`s and `:-)` emoticon replacements.
[prosemirror-markdown's
heading](99b6f0a6c3/src/schema.ts (L30))
only allows `(text | image)*` content, we override it to allow `inline*`
to be compatible with all our inline (including emoji) nodes.
This PR adds a destroy:posts rake task that can be used to hard-delete a list of posts. Useful for dealing with large amounts of spam that has been soft deleted and needs to go.
Notes:
Works on both non-deleted and soft-deleted posts. (We might want to change this to work on only soft-deleted posts?)
Works exclusively on post IDs. We can't mix topic and post IDs as they might clash, and we have no way of resolving that ambiguity.
Accepts either a rake-style array of IDs or, more conveniently, you can pipe the argument in through STDIN.
Added a confirmation step since it's a fairly destructive operation.
Currently, after creating an API key, there is no way in the UI to see what scope the key has. To do this we need to first store the selected scope mode when creating a new key.
In this PR we:
- Convert scope_mode from a transient attribute to a database backed enum.
- Ship the possible values through the javascript:update_constants rake task instead of hard coding in front-end.
In follow-up PRs we will:
- Backfill existing API keys based on their associated api_key_scopes records.
- Start showing the scope mode in the UI.
When a post is flagged due to matching watched words, it can be difficult to know what you're looking for, particularly if you have a lot of watched words built up over a long period of time.
This change stores the list of matched words, and later displays them in the review queue, listing which Watched Words were responsible for the flag. Because watched words can change, this is recorded at the time the post is flagged. For posts that were flagged prior to this feature landing, it tries to guess the relevant words based on the current Watched Words set.
Admin sidebar links can have either a `href` or a
`route`, and the admin search was not handling
this properly. Also, we should always use `getURL()`
on the href in case the link is internal, for subfolder
sites.
This is hard to test right now, I plan on adding more extensive
links for admin-search-data-source in another PR.
## 🔍 Overview
This update adds a new value transformer to the `queryParams` property
on the `AdminReportsShowController`. This is necessary so that plugins
can add additional `queryParams` to the route and have it reflected when
the route is transitioned.
Followup 76e58a55edb18a22760273b8787240a18b7b2be3
Gemfile.lock wants the ruby version, and it's blocking
the build. Not sure why this didn't come up in the
original PR.
This is not a hard requirement, other ruby versions satisfying
~> 3.3.0 will still work
Redesigned page to update site logos. `AdminBrandingLogoFormComponent`
is attached to the old logos page and the new branding page. In the next
steps, branding will replace the logos page.
A new `AdminConfigAreaCardSection` component was added hidden and less
frequently used settings.
An image placeholder was also needed because many additional logos have
a fallback to the site logo.
Finally, `twitter_summary_large_image` was renamed to
`x_summary_large_image`.
Desktop

Mobile

This bumps the core ruby version requirement
to at least 3.3.0, and moves this version check
into the Gemfile per
https://bundler.io/guides/gemfile_ruby.html
We are doing this because generally our gems
are using a higher version, it's about time
for a bump anyway.
1. remove the margin (it's displayed inline with text, so having a left
margin didn't make sense)
2. use em unit in min-height
3. slighty tighten the button (inline padding 0.5em -> 0.4em) so it's
more proportional