Prior to this change we would have different context for quick reactions
and for channels this commit just move everything into one context which
is less surprising.
We want to allow configuring fields that are both optional and editable to not show up in the signup form.
- Fields that are optional but not editable need to be on the signup form, or they can never be filled in.
- Fields that are not optional need to be on the signup form, or you can never sign up.
Allows admins to set the `calendar_event_display` site setting to decide
how full-calendar should render events.
It accepts the following values:
- auto
- block
- list-item
And will default to: auto
Allow table-level check constraints in the Intermediate DB
In https://github.com/discourse/discourse/pull/34339, I’ve worked on
distinguishing between `user_custom_fields` tied to `user_fields` and
arbitrary `user_custom_fields` entries.
To support this, I’ve made both `field_id` and `name` nullable, which
requires a table-level constraint to ensure each entry has either a
`field_id` (referencing `user_fields`) or an arbitrary `name` for the
value.
This first pass supports only named table-level `CHECK` constraints.
## Usage
```yaml
user_custom_fields:
columns:
exclude:
- "id"
modify:
- name: "name"
nullable: true
add:
- name: "field_id"
datatype: numeric
- name: "is_multiselect_field"
datatype: boolean
indexes:
# ...
constraints:
- name: "require_field_id_or_name"
condition: "field_id IS NOT NULL OR name IS NOT NULL"
- name: "disallow_both_field_id_and_name"
type: check # default, only `check` supported for now
condition: "NOT (field_id IS NOT NULL AND name IS NOT NULL)"
```
```sql
CREATE TABLE user_custom_fields
(
created_at DATETIME,
field_id NUMERIC,
is_multiselect_field BOOLEAN,
name TEXT,
user_id NUMERIC NOT NULL,
value TEXT,
CONSTRAINT require_field_id_or_name CHECK (field_id IS NOT NULL OR name IS NOT NULL),
CONSTRAINT disallow_both_field_id_and_name CHECK (NOT (field_id IS NOT NULL AND name IS NOT NULL))
);
```
There's an error that happens when there's a required user field on an
existing account,
```
Uncaught TypeError: can't access property "addEventListener", document.querySelector(...) is null
didInsertElement card-contents-base.js:114
didInsertElement card-contents-base.js:112
```
This should help avoid it
The AFL Grand Final is typically help on the last Saturday of September,
though there are occasional exceptions. Since 2015, the Friday before
the Grand Final is a public holiday in Victoria, Australia.
This change defines the typical date for the public holiday, but allows
exceptions to be defined where necessary.
When the LLM Triage automation script causes a post to be placed in the
review queue, it includes a message linking to the rule responsible.
The string for this message included a placeholder for `base_path`, but
didn't interpolate it in the `i18n` call.
This commit fixes the flaky "Admin Customize Themes Config Area Page
when there are components installed loads more components when scrolling
to the bottom"
system test by reducing the height of the window to totally prevent
infinite
loading from triggering until we scroll.
When visiting a channel's members info route directly, the add member
button will always be shown because the logic to show the button assumes
that chat messages have been loaded. Skip for now while we figure out a
fix.
This commit removes `spec/system/user_invites_spec.rb` added in
55bf0e21fb. The system tests are flaky
because of the use of an [arbitrary `invite_redemption_delay` in
`User#invited_by`](https://github.com/discourse/discourse/blob/936ed3d8e78dfb802f37c5c36f2184710ab56c3e/app/models/user.rb#L613-L616).
In system test, the user is always going to be
created before the delay.
Also I don't think a system test is required here since we have unit
tests for the `User#invited_by` method. Hence, I'm removing the system
test instead of just fixing it.
The Horizon theme was overriding `btn-default` styles for the new topic
button in the sidebar with custom CSS to achieve `btn-primary` styles.
Ideally we should be able to swap out the class and rely on that!
<img width="299" height="258" alt="image"
src="https://github.com/user-attachments/assets/3485fb0b-4714-49ce-9ac4-7e1ac6fb358b"
/>
So here I
1. Convert CreateTopicButton to Glimmer component
2. Add `@btnTypeClass` param - Allows parent components to specify the
button type
(`btn-primary`, `btn-default`, etc.)
3. Separate concerns:
* `@btnClass` handles general class name needs (and existing use)
* `@btnTypeClass` handles core visual style
Prevents pathological issues with crawlers querying topic lists with
very large page parameters. The new limit also allows us to tweak this
under specific instances or circumstances (high traffic, for example).
A `page` parameter above the limit will throw an `InvalidParameters`
400 error.
---------
Co-authored-by: Martin Brennan <martin@discourse.org>
Repro steps:
- enable the assign plugin
- check the `unassigned on close` and `reassign on open` site settings
- assign a topic with more than 5 posts to a user
- view the topic and scroll to post 5 or more
- close the topic
- open the topic
- repeat a few times (behaviour can be inconsistent)
Expected: topic reloads without scrolling away from the current post.
Current behaviour: topic scrolls to OP. Notice in the video that it also
scrolls to OP for any other clients that are on the same topic
(left-side browser is of a random user).
https://github.com/user-attachments/assets/0cc79bf2-a2e9-4a1e-b3e3-5f2b19763d8c
Why? The assign plugin passes `reload_topic: true, refresh_stream: true`
via MessageBus. On the frontend code, when we reload the topic we did
not pass the `post_number` to the request, and therefore the current
position was lost. Passing the current post number to the topic reload
fixes the issue because then in the frontend the topic model maintains
the right position.
Another option is to not trigger `refresh_stream=true` here. It feels
unnecessary to do so for assignments that are opened/closed. That said,
other plugins also use this option and may have a valid reason to do so.
The test is flaky because the route which we are asserting for leads to
a redirect. If the assertion is called before the redirect, the test
passes. If the assertion is called after the redirect, the test fails.
Instead, we can just assert for the final state which we want to see.
The intermediate route itself is not important.
…for autoprefixer. This fixes missing prefixed props (like
`-webkit-text-size-adjust`) in cases where e.g. desktop Safari doesn't
support a property at all (`text-size-adjust`) but mobile Safari does
(but prefixed)
When escaping the composer discard draft modal, this change allows users
to continue editing and auto save their draft as usual. With this
change, escaping the modal has the same functionality as the Keep
Editing button.
Internal ref: /t/-/162257
When both parent and child categories had the same style type, the icon
and emoji values would leak from the child to the parent when generating
the category badge html. When processing categories recursively in this
way we should unset these values to ensure they are taken from the
ancestor category directly rather than from an option.
### Before
<img width="459" height="81" alt="Screenshot 2025-09-03 at 3 30 39 PM"
src="https://github.com/user-attachments/assets/476b10ed-b9f9-4d84-bae2-6cd0dfbbf507"
/>
### After
<img width="461" height="73" alt="Screenshot 2025-09-03 at 3 30 24 PM"
src="https://github.com/user-attachments/assets/55960899-f0db-43d1-9831-c6087c42349e"
/>