Default the move dialog's promotion to the target kind, and link the new page - #1365
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 needsmediawiki.jqueryMsg, now a declared module dependency rather than something the page happened to have loaded.Considered, omitted
Manual Browser Check
On a dev wiki, from the Data tab of
Rijksmuseum, Move on an attendance Subject: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.