mediawiki-extensions-Discus.../tests/cases/timestamp-format-switch/timestamp-format-switch-formatted-legacy.html
Bartosz Dziewoński 9c9512ecf5 Move [subscribe] links outside of <h2> tags
Place the "[subscribe]" links used when the 'VISUALENHANCEMENTS'
feature is disabled in the same DOM position as the "🔔 Subscribe"
buttons used when it is enabled.

Recent changes in MediaWiki core caused them to move inside the
`<span class="mw-headline">`, breaking some gadgets (T13555#9615648).
Moving them all the way outside should avoid problems.

I don't remember why we placed them inside the `<h2>` tags, but there
doesn't seem to be any reason to do it now. It must have been easier
that way before we introduced the `<div class="mw-heading">` wrappers.

Note that I'm keeping the `<!--__DTSUBSCRIBELINK__...-->` placeholder
comments in case it turns out there is a reason, and we need to revert
this change. If everything goes well, they can be cleaned up in change
Ie3348671c486de5bbd9f286772a8d145e3609bd5 later.

Bug: T13555
Change-Id: Idb23b0f5e438d35ed74569ff50302c7fad5ba688
2024-03-08 21:18:53 +01:00

69 lines
6.3 KiB
HTML

<div class="mw-parser-output">
<div class="mw-heading mw-heading2 ext-discussiontools-init-section"><span class="ext-discussiontools-init-section-subscribe mw-editsection-like"><span class="ext-discussiontools-init-section-subscribe-bracket">[</span><a href="/w/index.php?title=Talk:T304595&amp;action=dtsubscribe&amp;commentname=h-Matma_Rex-2022-07-10T00%3A00%3A00.000Z&amp;section=Test+past" class="ext-discussiontools-init-section-subscribe-link" role="button" tabindex="0" title="(discussiontools-topicsubscription-button-subscribe-tooltip)">(discussiontools-topicsubscription-button-subscribe)</a><span class="ext-discussiontools-init-section-subscribe-bracket">]</span></span><h2><span class="mw-headline" id="Test_past" data-mw-thread-id="h-Test_past-2022-07-10T00:00:00.000Z"><span data-mw-comment-start="" id="h-Test_past-2022-07-10T00:00:00.000Z"></span>Test past<span data-mw-comment-end="h-Test_past-2022-07-10T00:00:00.000Z"></span></span></h2><div class="ext-discussiontools-init-section-bar"><div class="ext-discussiontools-init-section-metadata"><span class='ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-timestampLabel'>(discussiontools-topicheader-latestcomment: <a href="#c-Matma_Rex-2022-07-10T00:00:00.000Z-Test_past">1657411200</a>)</span><span class='ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-commentCountLabel'>(discussiontools-topicheader-commentcount: 1)</span><span class='ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-authorCountLabel'>(discussiontools-topicheader-authorcount: 1)</span></div><div class="ext-discussiontools-init-section-actions"></div></div></div>
<p><span data-mw-comment-start="" id="c-Matma_Rex-2022-07-10T00:00:00.000Z-Test_past"></span>Hello from the past! <a href="http://localhost/wiki/User:Matma_Rex" title="User:Matma Rex">Matma Rex</a> (<a href="http://localhost/wiki/User_talk:Matma_Rex" title="User talk:Matma Rex">talk</a>) <a href="https://example.org/wiki/Talk:T304595#c-Matma_Rex-2022-07-10T00:00:00.000Z-Test_past" class="ext-discussiontools-init-timestamplink">00:00, 10 July 2022 (UTC)</a><span class="ext-discussiontools-init-replylink-buttons" data-mw-thread-id="c-Matma_Rex-2022-07-10T00:00:00.000Z-Test_past"><span class="ext-discussiontools-init-replylink-bracket">[</span><a class="ext-discussiontools-init-replylink-reply" role="button" tabindex="0" href="">(discussiontools-replylink)</a><span class="ext-discussiontools-init-replylink-bracket">]</span></span><span data-mw-comment-end="c-Matma_Rex-2022-07-10T00:00:00.000Z-Test_past"></span>
</p>
<div class="mw-heading mw-heading2 ext-discussiontools-init-section"><span class="ext-discussiontools-init-section-subscribe mw-editsection-like"><span class="ext-discussiontools-init-section-subscribe-bracket">[</span><a href="/w/index.php?title=Talk:T304595&amp;action=dtsubscribe&amp;commentname=h-Matma_Rex-20220715000000&amp;section=Test+future" class="ext-discussiontools-init-section-subscribe-link" role="button" tabindex="0" title="(discussiontools-topicsubscription-button-subscribe-tooltip)">(discussiontools-topicsubscription-button-subscribe)</a><span class="ext-discussiontools-init-section-subscribe-bracket">]</span></span><h2><span class="mw-headline" id="Test_future" data-mw-thread-id="h-Test_future-20220715000000"><span data-mw-comment-start="" id="h-Test_future-20220715000000"></span>Test future<span data-mw-comment-end="h-Test_future-20220715000000"></span></span></h2><div class="ext-discussiontools-init-section-bar"><div class="ext-discussiontools-init-section-metadata"><span class='ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-timestampLabel'>(discussiontools-topicheader-latestcomment: <a href="#c-Matma_Rex-20220715000000-Test_future">1657843200</a>)</span><span class='ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-commentCountLabel'>(discussiontools-topicheader-commentcount: 1)</span><span class='ext-discussiontools-init-section-metaitem ext-discussiontools-init-section-authorCountLabel'>(discussiontools-topicheader-authorcount: 1)</span></div><div class="ext-discussiontools-init-section-actions"></div></div></div>
<p><span data-mw-comment-start="" id="c-Matma_Rex-20220715000000-Test_future"></span>Hello from the future! <a href="http://localhost/wiki/User:Matma_Rex" title="User:Matma Rex">Matma Rex</a> (<a href="http://localhost/wiki/User_talk:Matma_Rex" title="User talk:Matma Rex">talk</a>) <a href="https://example.org/wiki/Talk:T304595#c-Matma_Rex-20220715000000-Test_future" class="ext-discussiontools-init-timestamplink">00:00, 15 July 2022 (UTC)</a><span class="ext-discussiontools-init-replylink-buttons" data-mw-thread-id="c-Matma_Rex-20220715000000-Test_future"><span class="ext-discussiontools-init-replylink-bracket">[</span><a class="ext-discussiontools-init-replylink-reply" role="button" tabindex="0" href="">(discussiontools-replylink)</a><span class="ext-discussiontools-init-replylink-bracket">]</span></span><span data-mw-comment-end="c-Matma_Rex-20220715000000-Test_future"></span>
</p>
</div>
<pre>
newestComment: {
"id": "c-Matma_Rex-20220715000000-Test_future",
"timestamp": "20220715000000",
"author": "Matma Rex",
"heading": {
"headingLevel": 2,
"name": "h-Matma_Rex-20220715000000",
"type": "heading",
"level": 0,
"id": "h-Test_future-20220715000000",
"replies": [
"c-Matma_Rex-20220715000000-Test_future"
],
"text": "Test future",
"linkableTitle": "Test future"
}
}
hasLedeContent
{
"wgDiscussionToolsPageThreads": [
{
"headingLevel": 2,
"name": "h-Matma_Rex-2022-07-10T00:00:00.000Z",
"type": "heading",
"level": 0,
"id": "h-Test_past-2022-07-10T00:00:00.000Z",
"replies": [
{
"timestamp": "2022-07-10T00:00:00.000Z",
"author": "Matma Rex",
"type": "comment",
"level": 1,
"id": "c-Matma_Rex-2022-07-10T00:00:00.000Z-Test_past",
"replies": []
}
],
"uneditableSection": true
},
{
"headingLevel": 2,
"name": "h-Matma_Rex-20220715000000",
"type": "heading",
"level": 0,
"id": "h-Test_future-20220715000000",
"replies": [
{
"timestamp": "20220715000000",
"author": "Matma Rex",
"type": "comment",
"level": 1,
"id": "c-Matma_Rex-20220715000000-Test_future",
"replies": []
}
],
"uneditableSection": true
}
]
}
</pre>