Skip to content

Remove "prioritize_full_name_in_ux"#1

Open
mtancoigne wants to merge 325 commits intomainfrom
manu/remove-prioritize_full_name_in_ux
Open

Remove "prioritize_full_name_in_ux"#1
mtancoigne wants to merge 325 commits intomainfrom
manu/remove-prioritize_full_name_in_ux

Conversation

@mtancoigne
Copy link
Member

No description provided.

keegangeorge and others added 3 commits February 26, 2026 12:22
Merging this will trigger the creation of a `release/2026.2` branch on
the preceding commit.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
tannerabread and others added 20 commits February 26, 2026 08:08
Fixes a regression from the tagless component migration (6b000b0) that
broke `colspan` structure for topic-list-between ads

Set the attribute on the parent class that can attach to the `<td>`
element when it is used
)

We need to be able to filter the upcoming change list by
multiple site setting names at once so we can link from
notifications and from elsewhere and filter the list to
only those changes.

This commit adds a ?changeFilterNames=name_x,name_y query
parameter for this purpose. The AdminFilterControls component
has been updated to handle commas in the filter input, and a
"Reset filter" button is now shown even when there are results for
easier clearing:

<img width="1132" height="608" alt="image"
src="https://github.com/user-attachments/assets/13834cc5-3b00-485a-9958-33de38adc1c8"
/>

---------

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
…ategory creation (discourse#37964)

This is scoped to the upcoming change: simplified category creation.

This centers our category creation form and allows it to be a little
wider with a new formkit variable

`--form-kit-max-input: 75ch;`

This makes inputs and other related elements `75ch` wide, which is
maximum recommended line length for readability.

The form has also been updated to use a sticky footer that indicates
changes and provides an more readily available way to save.

I've also converted plugin additions to formkit and made setting changes
there reactive.

<img width="500" alt="image"
src="https://github.com/user-attachments/assets/255b5333-457b-4dfd-a92b-631f847def5b"
/><img width="500" alt="image"
src="https://github.com/user-attachments/assets/c48ddd5d-f54d-4a99-b459-90af0b29c8cf"
/>

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
Follow-up to follow-up 58564c5, there was a related spec that was
failing, this fixes it
Bumps discourse_ai-tokenizers from 0.4 to 0.4.1 for a fix for
tiktoken-rs stack overflow crash that aborts the Ruby process when
encoding large inputs
(discourse/discourse_ai-tokenizers#9)
…37763 (discourse#38039)

- Restores `data-discourse-plugin`, `data-preinstalled`, and
`data-official` attributes on plugin `<script>` tags that were lost when
discourse#37763 moved script tag generation from ember-cli to Rails
- Fixes `discourse-test-load-dynamic-js.js` where `script.dataset =
element.dataset` was a silent no-op (dataset is a readonly property),
preventing data attributes from being copied to dynamically created
script elements
- Without these attributes, `setup-tests.js` treats all test runs as
core tests and always enables `configureRaiseOnDeprecation()`, causing
private plugin tests to fail on deprecation warnings they should be
exempt from

---------

Co-authored-by: David Taylor <david@taylorhq.com>
…cies (discourse#38071)

`@computed` properties that depend on `@trackedArray` properties (e.g.,
`@computed('items')`, `@discourseComputed('items.[]')`) don't invalidate
when the array's contents are mutated in place via `push`, `splice`,
`pop`, etc. They only invalidate when the property reference itself
changes (`this.items = newArray`).

This happens because `@computed` and `TrackedArray` use two different
reactivity systems that aren't bridged. `ComputedProperty.get()` wraps
its getter in `untrack()`, so autotracking signals from `TrackedArray`
are completely ignored. Cache invalidation relies exclusively on classic
tag chains (`tagForProperty`), which only see reference changes.

## Core fix: `@trackedArray` decorator

The `@trackedArray` decorator in `tracked-tools.js` now bridges
`TrackedArray` content mutations to the classic computed property tag
system using `tagFor`, `track`, and `updateTag` from
`@glimmer/validator`. On each property access, the getter captures the
`TrackedArray`'s collection tag (via `value.length`, which triggers the
Proxy's `getValue(collection)`) and updates `tagFor(obj, key)` so that
any `@computed` watching this key sees the content change.

The value is read outside `track()` to avoid a self-referential tag
cycle — since `get.call(this)` consumes the property's own tag,
capturing that inside `track()` and then calling `updateTag` on the same
tag would create a cycle.

## Fixes for `new TrackedArray()` on POJOs

The core fix only covers properties decorated with `@trackedArray`.
Three cases where `new TrackedArray()` is assigned to plain objects or
controller models (from routes) needed individual fixes:

- **`UserActivityBookmarksController`** — replaced
`@equal("model.bookmarks.length", 0)` with a `@dependentKeyCompat`
getter that consumes the `TrackedArray`'s collection tag via `.length`
- **`AdminUserBadgesController`** — replaced `@sort("model",
"badgeSortOrder")` with a `@dependentKeyCompat` getter using the new
`arraySortedByProperties` utility
- **`TagInfo` component** — added a `@dependentKeyCompat` `synonyms`
getter to bridge `TrackedArray` content changes, used as a dependency in
`@discourseComputed("synonyms")` for `nothingToShow`. The classic
dependent keys for `tagInfo.tag_group_names` and `tagInfo.categories`
are preserved so those continue to track through classic chain
resolution.

## New utility: `arraySortedByProperties`

Added `arraySortedByProperties(array, sortDefinitions)` to
`array-tools.js` as a functional replacement for the `@sort` computed
macro. Accepts Ember-style sort definition strings (e.g.,
`["granted_at:desc"]`), supports dot-notation paths, and returns a new
sorted array without mutating the original.

## Testing

- Three new tests for `@trackedArray` + `@computed` compatibility:
content mutations via `push`/`splice` invalidate `@computed`, `.[]`
dependent keys work, and `null` values are handled
- Eight new tests for `arraySortedByProperties`: ascending/descending
sorting, multi-property with mixed directions, dot-notation paths,
non-array input, immutability, empty sort definitions, and default
direction
…iscourse#38078)

When `display_name_on_posts` is enabled and `prioritize_username_in_ux`
is disabled, quoting a post in markdown mode correctly attributes the
quote to the user's full name (e.g. `[quote="Robin Ward, post:1,
topic:2, username:eviltrout"]`). However, the rich text editor lost the
display name during the markdown→ProseMirror→markdown round-trip,
falling back to just the username.

The ProseMirror quote node only stored `username` in its attributes.
When BBCode with a `username:` param was parsed, the display name was
discarded. On serialization, only the username survived.

This commit:
- Adds a `displayName` attribute to the ProseMirror quote node spec
- Emits `data-display-name` on the markdown-it aside token so the
ProseMirror parser can pick it up
- Updates the serializer to output the display name and `username:`
param when present
- Fixes a latent issue where `displayName` remained as an array instead
of being joined into a string when the name contains no commas

https://meta.discourse.org/t/397049/12
We don't consider it security as we have the possibility to do so, but
we consider it's better to enforce it now and don't let any user have a
blank webhook secret.
We don't consider this a security issue as this is technically info that
was accessible before being deleted.

This commit adds the check in the service and ensures the service and
controller are properly tested.
…vice (discourse#38092)

This is not a big deal _per se_ because the required module doesn't
import any ProseMirror or `/static/` dependencies, but it would make it
easy to miss it being included in the bundle if a dependency was added
there.

This PR extracts wrap-utils from the `/static/` boundary so it can't
import ProseMirror dependencies anymore and loads the wrap modal
asynchronously.
Follows the same pattern of other places that `send_keys` repeatedly.
Currently, setting up a category for a specific use case (e.g. Q&A /
support) requires manually toggling multiple site settings and category
options. This is error-prone and not discoverable for admins.

Introduce a category type system that streamlines category creation by
letting admins pick a type (Discussion, Support, etc.) which
automatically applies sensible defaults.

Core framework:
- `Categories::Types::Base` — base class that defines a type's icon,
  configuration schema (site settings + category settings), and hooks
  for `enable_plugin`, `configure_site_settings`, `configure_category`
- `Categories::TypeRegistry` — singleton registry where core and plugins
  register their types, with ownership tracking to prevent conflicts
- `Categories::Configure` — service object that orchestrates type
  configuration in a transaction: enables the plugin, applies site
  settings, configures the category, and logs a staff action

Frontend:
- Type chooser modal shown when creating a new category (gated behind
`enable_simplified_category_creation` (UC) and
`enable_category_type_setup` site setting)
- `CategoryTypeChooser` service manages modal → route state transfer
- Plugin tabs registered with `primary: true` appear alongside General
  even when advanced settings are collapsed
- Dynamic page title reflects the selected type

Solved plugin integration:
- Registers a "Support" type that enables solved, sets filter/notify
  defaults, and configures accepted answers + auto-close on the category
- Adds a primary "Support" tab with FormKit fields driven by the type's
  configuration schema

Ref - t/174387
Ref - t/174388

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
Moves the assign code that was in Discourse Solved into the assigned
plugin, which now runs if Discourse Solved is enabled. Most of this is
just moving the code across but it also means moving site settings and
translations too.
The setting description was incorrect as it doesn’t hide user directory.
To disable user directory the recommended way at the moment is to
disable: `enable_user_directory`.
When backports fail, the PR comment will now include the actual stderr
output from the `cherry-pick` command, and will include instructions for
reproducing locally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment