Merge "Move "Return to comment" below sticky header when present"

This commit is contained in:
jenkins-bot 2022-09-27 19:16:20 +00:00 committed by Gerrit Code Review
commit 5d92f638f3
3 changed files with 11 additions and 2 deletions

View file

@ -4,7 +4,7 @@
"stylelint-config-wikimedia/mediawiki"
],
"rules": {
"selector-class-pattern": "^(ext|ve|mw|oo-ui|client|skin|mf)-",
"selector-class-pattern": "^(ext|ve|mw|oo-ui|client|skin|mf|vector)-",
"unit-disallowed-list": null
}
}

View file

@ -4,7 +4,11 @@ var
logger = require( './logger.js' ),
dtConf = require( './config.json' ),
CommentItem = require( './CommentItem.js' ),
scrollPadding = { top: 10, bottom: 10 },
scrollPadding = {
// eslint-disable-next-line no-jquery/no-class-state
top: 10 + ( $( document.body ).hasClass( 'vector-feature-sticky-header-enabled' ) ? 50 : 0 ),
bottom: 10
},
defaultEditMode = mw.user.options.get( 'discussiontools-editmode' ) || mw.config.get( 'wgDiscussionToolsFallbackEditMode' ),
defaultVisual = defaultEditMode === 'visual',
featuresEnabled = mw.config.get( 'wgDiscussionToolsFeaturesEnabled' ) || {},

View file

@ -52,6 +52,10 @@
transform: translate( -50%, -150% );
top: 0;
left: 50%;
.vector-sticky-header-visible & {
top: 50px;
}
}
&-scrollback-bottom {
@ -60,6 +64,7 @@
left: 50%;
}
// stylelint-disable-next-line no-descending-specificity
&-scrollback-top,
&-scrollback-bottom {
position: fixed;