Followup to 087e8e4bdb53f71930ec5c930c463c37dd2bd58d
- Fixes the variable-prefixer so it doesn't explode when the input is
unparseable
- Add URL polyfills so that postcss can print its errors properly
- Catch postcss errors in the same way as sass errors
If Jobs::DiscourseAutomation::Tracker fails during execution of a
pending automation, then the remaining automation were no longer
executed.
Automation may fail for various reasons: a person has PMs disabled, rate
limit is reached, etc.
This replaces the password validation mixin with a helper class in the
password-reset controller class.
Also removes the redundant flag `passwordValidationVisible` that is
already fully dependent on whether `passwordValidation` has a `reason`.
When a message is first sent, the original upload URL is used for a
split-second before it's replaced by the optimised thumbnail. Using
`didInsert` didn't re-run on any changes to the uploads. Switching to a
proper modifier, and checking the length of the uploads array within it,
will ensure that it is re-run whenever the uploads change.
This is a follow up to a9eefd1b4849573452581c113cfcbdd4420fb3c2.
### Reviewer notes
This rake task is quite annoying to test so I don't think the time
trying to figure out how to test it is worth it. This does not sit in a
critical path anyway so I think the lack of tests here is OK.
This introduces a helper class for password validation logic, and
replaces the mixin in the signup controller class. All properties that
impact password validation in that class are also converted to
autotracked ones.
This change adds a new `type_source` field to the `Reviewable` model, indicating whether the Reviewable type was registered by `core`, a plugin, or an `unknown` source.
When a plugin that registered a Reviewable type is disabled, this allows us to tell the user which plugin they need to re-enable to handle any orphan reviewable items.
The `toggle-summary` class is specific to our use in the AI plugin, so
I've moved it there in
https://github.com/discourse/discourse-ai/pull/1136...
This wrapper was occupying some space even though it was empty in the PM
topic map, so it's better to not have it.
This also allows us to remove some sub-optimal CSS that was adding a gap
based on content within it. Without the empty wrapper, we can always
have the gap present.
This commit improves a few aspects regarding group name validation:
- `min_username_length` and `max_username_length` are validated with the
shortest and longest names of users and groups
- skip validation of the group name when the group is an automatic one
This mode was introduced briefly in 2019, and allowed editing theme
settings/translations/extra-css from the admin panel UI. But then we
decided that making it possible to edit these fields via the UI
conflicted with our recommendation of using a proper IDE,
discourse_theme, and version-controlled themes. The feature was disabled
in core, and theme-creator uses a monkey-patch to expose it.
Even for the current use in theme creator, there are now major styling
and functionality issues, because this feature is not visible or tested
in core. For example: it doesn't allow editing 'extra JS' fields, which
are arguably the most common.
This commit removes the code for this 'advanced' mode, in advance of
some more extensive modernization of this component/model.
Both article images and section extraction were
not working for wikipedia oneboxes, this commit
fixes both and updates our spec fixture responses
to use the new HTML
Our language parser now incorrectly matches underscored locales:
```
[1] pry(main)> HttpLanguageParser.parse("zh-CN")
=> "zh_CN"
[2] pry(main)> HttpLanguageParser.parse("zh_CN")
=> "en_GB"
```
This commit makes sure the input can be agnostic of `-` or `_`
A follow-up to #31343.
```
WARNING: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.
More info: https://sass-lang.com/d/mixed-decls
```
When `revoke_ungranted_titles!` was invoked, the optional list of
`user_ids` was not passed from the argument list to the query. This
resulted in an exception because the placeholder `:user_ids` existed in
the query.
This sets the stage for being able to consolidate Like notifications
using full names. It also is crucial to this [Reactions plugin
PR](https://github.com/discourse/discourse/pull/31292).
The Like consolidation PR will come after these.
`consolePrefix()` is an expensive operation (it throws a synthetic
error, then parses the backtrace), so we should only do it when
absolutely necessary
On the topic-list page, this provides a 3-4% improvement in "init to
render" times.
Follows up: https://github.com/discourse/discourse/pull/31107
This PR replaces the use of the UsernameValidation mixin with the helper
class for the InvitesShowController and CreateAccount modal component,
and deletes the mixin.