Improves the styles for the [details] caret pseudo-element on the rich
editor.
Additionally, having `summary` have no `pointer-events` is important so
Firefox doesn't mess with our caret positioning when clicking it.
### Description
When accessing a category via
`<baseUrl>/c/<categoryId>.json?page={pageNumber}`, it issues a redirect
to `<baseUrl>/c/<categorySlug>/<categoryId>.json?.....`. During this
redirect, any numeric occurrence matching the categoryId in the query
string is also rewritten - including the page parameter - causing
incorrect behavior (e.g., `page=5` becoming `page=community/5`).
This PR fixes the logic ensuring that the query parameters remain
intact.
### How to reproduce?
Try opening this link https://meta.discourse.org/c/10.json?page=10 in
the browser. It will throw a 400 Bad Request error. When we inspect the
url, we will notice the page number has been replaced by the
`slug/categoryId`
Removes the composer educational tips for:
- upload avatar
- sequential replies
- reviving old topic
We are also removing the associated site settings that are now
redundant:
- Disable avatar education message
- Sequential replies threshold
- Warn reviving old topic age
This commit adds a `@resizable` argument to `<AceEditor />`
and sets it to true always for the FormKit code control.
This allows the user to vertically resize the editor inside
FormKit forms. Horizontal resizing is not allowed at this
time, it's more unpredictable for layout, and the vertical
resizing is mostly what's needed anyway.
Also changes the FormKit code control to use min-height of
250px so the inline style height takes precedence, before
it was a hardcoded !important height.
Currently, if a batch "copy" of an import step results in all rows being
skipped, the `after_commit_of_skipped_rows` callback is never triggered.
This happens because the callback is nested inside a block that only
runs when at least one row is inserted.
This change ensures the DB copy operation returns both inserted and
skipped rows, allowing the caller to respond appropriately in either
case.
---------
Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
Uses a getter to reactively re-render the search context (eg. "in
messages").
Also fixes an issue where although the in:messages suggestion appeared,
it didn't work to add the PM context.
Starts defining a more generic API, so a different toolbar instance can
be used as a replacement on the main toolbar as well as a foundation for
rendering the same toolbar as a floating element.
This toolbar reuse started here for the link toolbar:
https://github.com/discourse/discourse/pull/32583, then got extracted to
this PR.
---------
Co-authored-by: Sérgio Saquetim <1108771+megothss@users.noreply.github.com>
Restores the category text/foreground color field that was removed in
#32015.
We are also retaining the auto text color selection that was introduced
and applying on background color change rather than when the form is
saved. The text color algorithm has been changed from color brightness
to use color difference instead, which appears to be more reliable.
Algorithm for color difference:
https://www.w3.org/TR/AERT/#color-contrast
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
The changes are:
- Chat Thread SDK can query up to 500 messages
- If you are above this number, we don't raise an error anymore but we
clamp it to 500
- The controller using this service is forced into the old limit of 50
to avoid abuses
Application code should not be used in migrations since we want
migrations to be idempotent. Since these migrations were added 4 years
ago, the application code is safe to be removed.
This will allow me to make changes to the
`FileStore::S3Store#update_upload_ACL` without having to worry about
these migrations.
By default, rails makes timestamp columns (`created_at` and
`updated_at`) non-nullable, we also have some required core and plugins
columns we wouldn't necessarily want to enforce in the intermediate DB
schema. It'll be better to set the default values for these during
import instead of enforcing these at the converter level.
This change adds support for globally modifying a column’s `nullable`
state, defaulting all `created_at` columns to be `nullable` while
allowing for table level overrides.
---------
Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
This reverts commit 1af8ef60ed0f9fe094994f4a503ad6a0e765e638. It caused
multiple oneboxes to lose spacing between them. Reverting while we
investigate.
…otifications and mentions shown in emails (#32848)"
This reverts commit e147d2afe6682a85070aecc0775050774f2f81f6. The
original commit has a bug, it replaces multiple usernames mentioned in a
post with the name of the first user in email templates.
Reverting temporarily, will need to re-roll a fix.
When we first introduced the `discourse-details` plugin, the `<details>`
element was not supported in all browsers, so this `display: none`-based
polyfill had to be used.
Nowadays, there is no need for this. And in fact, the `details[open] >
summary:first-of-type ~ *` selector is showing as our most expensive CSS
selector during repaints.
Removing this `display: none` also means that browser find-in-page will
now be able to correctly find content inside `<details>` in discourse.
