diff --git a/extension.json b/extension.json index 0dc34247a..7acff3436 100644 --- a/extension.json +++ b/extension.json @@ -425,7 +425,6 @@ "BeforeCreateEchoEvent": "\\MediaWiki\\Extension\\DiscussionTools\\Hooks\\EchoHooks::onBeforeCreateEchoEvent", "EchoGetBundleRules": "\\MediaWiki\\Extension\\DiscussionTools\\Hooks\\EchoHooks::onEchoGetBundleRules", "EchoGetEventsForRevision": "\\MediaWiki\\Extension\\DiscussionTools\\Hooks\\EchoHooks::onEchoGetEventsForRevision", - "MinervaNeueTalkPageOverlay": "\\MediaWiki\\Extension\\DiscussionTools\\Hooks\\MobileHooks::onMinervaNeueTalkPageOverlay", "RevisionDataUpdates": "dataupdates", "LoadExtensionSchemaUpdates": "installer", "GetDoubleUnderscoreIDs": "parser", diff --git a/includes/Hooks/HookUtils.php b/includes/Hooks/HookUtils.php index db3497a66..ff9ef0b9e 100644 --- a/includes/Hooks/HookUtils.php +++ b/includes/Hooks/HookUtils.php @@ -456,8 +456,7 @@ class HookUtils { $dtConfig = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'discussiontools' ); if ( $isMobile ) { - // Enabling mobile removes MobileFrontend's reply and new topic tools, so always - // enable these tools as a replacement. + // DiscussionToolsEnableMobile controls all features on mobile return ( $dtConfig->get( 'DiscussionToolsEnableMobile' ) || static::determineUserABTestBucket( $output->getUser(), 'mobile' ) === 'test' diff --git a/includes/Hooks/MobileHooks.php b/includes/Hooks/MobileHooks.php deleted file mode 100644 index ac65dbd23..000000000 --- a/includes/Hooks/MobileHooks.php +++ /dev/null @@ -1,26 +0,0 @@ -addBodyClasses( 'ext-discussiontools-init-new-topic-opened' ); - // Minerva doesn't show a new topic button by default, unless the MobileFrontend - // talk page feature is enabled, but we shouldn't depend on code from there. + // Minerva doesn't show a new topic button. $output->addHTML( Html::rawElement( 'div', [ 'class' => 'ext-discussiontools-init-new-topic' ], ( new ButtonWidget( [ @@ -244,7 +243,7 @@ class PageHooks implements 'flags' => [ 'progressive', 'primary' ], 'infusable' => true, ] ) ) - // For compatibility with Minerva click tracking (T295490) + // For compatibility with MobileWebUIActionsTracking logging (T295490) ->setAttributes( [ 'data-event-name' => 'talkpage.add-topic' ] ) ) ); } diff --git a/modules/dt.init.less b/modules/dt.init.less index 76a59359b..f0c677050 100644 --- a/modules/dt.init.less +++ b/modules/dt.init.less @@ -47,12 +47,6 @@ h1, h2, h3, h4, h5, h6 { display: none; } - // No support for reply links in the mobile talk overlay - // stylelint-disable-next-line selector-class-pattern - .talk-overlay & { - display: none; - } - .ext-discussiontools-init-replylink { &-reply { cursor: pointer; @@ -389,13 +383,6 @@ h1, h2, h3, h4, h5, h6 { > h2 { flex-grow: 1; } - - // stylelint-disable-next-line selector-class-pattern - .client-js .skin-minerva--talk-simplified&.section-heading > h2 { - font: inherit; - margin: 0; - padding: 0; - } } .ext-discussiontools-visualenhancements-enabled { @@ -636,10 +623,8 @@ h1, h2, h3, h4, h5, h6 { } .skin-minerva.ext-discussiontools-emptystate-shown { - // The Minerva "Add topic" button is very eye-catching. + // The mobile "Add topic" button is very eye-catching. // No need to show it when the empty state banner is shown. - // stylelint-disable-next-line selector-class-pattern - .minerva-talk-add-button, .ext-discussiontools-init-new-topic { display: none; } @@ -748,18 +733,10 @@ h1, h2, h3, h4, h5, h6 { } } -// DiscussionToolsEnableMobile disables the Minerva simplified talk page -// (SkinMinerva::isSimplifiedTalkPageEnabled). This is enabled on all pages -// in the talk namespace (with wikitext content model, but this file is not -// loaded on non-wikitext pages). -// // DiscussionToolsEnableMobile enables multiple features, including the reply tool. -// -// Whenever we detect that DiscussionToolsEnableMobile is disabling the Minerva -// simplified talk page, hide the lede section, and show a "Read as wiki page" button +// When we detect that it's enabled, hide the lede section, and show a "Read as wiki page" button // to reveal it. -// -// The button will disable all DT features byt remove feature CSS classes. +// The button will disable all DT features by removing feature CSS classes. // stylelint-disable-next-line selector-class-pattern .skin-minerva.ns-talk.ext-discussiontools-replytool-enabled { &.ext-discussiontools-init-lede-hidden { diff --git a/modules/mobile.js b/modules/mobile.js index 05a8dded9..396d448d7 100644 --- a/modules/mobile.js +++ b/modules/mobile.js @@ -25,7 +25,7 @@ function onViewportChange() { } function init( $container ) { - // For compatibility with Minerva click tracking (T295490) + // For compatibility with MobileWebUIActionsTracking logging (T295490) $container.find( '.section-heading' ).attr( 'data-event-name', 'talkpage.section' ); // Keyboard body classes @@ -92,7 +92,7 @@ function init( $container ) { ) { // eslint-disable-next-line no-jquery/no-global-selector newTopicButton = OO.ui.infuse( $( '.ext-discussiontools-init-new-topic-button' ) ); - // For compatibility with Minerva click tracking (T295490) + // For compatibility with MobileWebUIActionsTracking logging (T295490) newTopicButton.$element.attr( 'data-event-name', 'talkpage.add-topic' ); // eslint-disable-next-line no-jquery/no-global-selector var $newTopicWrapper = $( '.ext-discussiontools-init-new-topic' ); @@ -135,7 +135,7 @@ function init( $container ) { }, 200 ) ); } if ( !$readAsWikiPage ) { - // Read as wiki page button, copied from renderReadAsWikiPageButton in Minerva + // Read as wiki page button, copied from old MobileFrontend/Minerva feature (removed in T319145) $readAsWikiPage = $( '