Skip to content

Default the move dialog's promotion to the target kind, and link the new page - #1365

Merged
JeroenDeDauw merged 2 commits into
masterfrom
feature/move-dialog-defaults
Sep 7, 2026
Merged

Default the move dialog's promotion to the target kind, and link the new page#1365
JeroenDeDauw merged 2 commits into
masterfrom
feature/move-dialog-defaults

Conversation

@JeroenDeDauw

Copy link
Copy Markdown
Member

Follows-up to #1356

The promotion default follows the target kind. Moving a Subject onto a page that does not exist yet is how a Subject created in-flow on another page gets a page of its own: that page is about the Subject and has no main Subject to demote, so the "Make it the main subject" checkbox now arrives checked for it. An existing target page keeps its main Subject and leaves the box unchecked, as before. The default is applied whenever the target changes, so a manual tick or untick stands until the user picks a different page.

The success notification links the page. After the move, that page is where the user is headed, so the notification names it as a link to its Data tab instead of as plain text. The message is built with parseDom, which takes the link as a node and leaves the subject name beside it escaped; that needs mediawiki.jqueryMsg, now a declared module dependency rather than something the page happened to have loaded.

Considered, omitted

  • Prefilling the page lookup with the Subject's label.
  • An Undo action in the notification.
  • Navigating to the target page automatically after the move.

Manual Browser Check

On a dev wiki, from the Data tab of Rijksmuseum, Move on an attendance Subject:

  • typing a title no page has and picking "Use … as a new page" checks the box, with no demotion notice;
  • picking an existing page instead unchecks it; picking the new-page option again re-checks it;
  • confirming the move shows Moved "Rijksmuseum attendance 2020" to <a href="/w/index.php?title=Attendance_scratch_1&action=subjects">Attendance scratch 1</a>., and that link opens the new page's Data tab with the Subject as its main Subject.

AI-authored — Claude Code, Opus 5 (max); written spec from @JeroenDeDauw's Fable session, no revisions; diff not yet human-reviewed; vitest (1930 tests), build and lint run locally plus the browser check above; CI pending.

JeroenDeDauw and others added 2 commits September 7, 2026 17:08
Moving a Subject onto a page that does not exist yet is how a Subject created
in-flow on some other page gets a page of its own. Such a page is about that
Subject and has no main Subject to demote, so it now arrives with the promotion
checked. Moving onto a page that already exists still leaves it unchecked.

The default is applied whenever the target changes, so a manual choice stands
until the user picks a different page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
After moving a Subject to another page, the page it landed on is where the user
is headed, so the notification names it as a link to its Data tab rather than as
plain text.

The message is built with parseDom, which takes the link as a node and leaves
the subject name beside it escaped. That needs mediawiki.jqueryMsg, which is now
a declared dependency rather than something the page happened to have loaded.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JeroenDeDauw
JeroenDeDauw marked this pull request as ready for review September 7, 2026 16:08
@JeroenDeDauw
JeroenDeDauw merged commit 50c1d89 into master Sep 7, 2026
20 checks passed
@JeroenDeDauw
JeroenDeDauw deleted the feature/move-dialog-defaults branch September 7, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant