Hide the lede section on mobile when DiscussionTools is enabled (2nd attempt)

Previously this was reverted in I28a5c774f5f after the initial
commit I3736b488046 caused T312177.

Bug: T311760
Change-Id: Iba65615378b183f0c970afff565f45cc878f1d71
This commit is contained in:
Esanders 2022-07-06 13:05:39 +00:00 committed by Ed Sanders
parent 72bb4aed13
commit d6a8c75899

View file

@ -542,8 +542,24 @@ span[ data-mw-comment-start ] {
} }
} }
.skin-minerva { // DiscussionToolsEnableMobile disables the Minerva simplified talk page
&.ext-discussiontools-visualenhancements-enabled { // (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
// to reveal it.
//
// The button will disable all DT features byt remove feature CSS classes.
// stylelint-disable-next-line selector-class-pattern
.skin-minerva.ns-talk.ext-discussiontools-replytool-enabled {
.mf-section-0 { /* stylelint-disable-line selector-class-pattern */
display: none;
}
.ext-discussiontools-init-readAsWikiPage { .ext-discussiontools-init-readAsWikiPage {
display: block; display: block;
/* Not sticky per T309889 */ /* Not sticky per T309889 */
@ -555,4 +571,3 @@ span[ data-mw-comment-start ] {
text-align: center; text-align: center;
} }
} }
}