mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-23 16:06:53 +00:00
Move "Return to comment" below sticky header when present
Also ensure that when we click the button, we scroll the widget fully into view below the sticky header. Bug: T318474 Change-Id: I394f02912cd6ab2773552a7364691ef89a17369c
This commit is contained in:
parent
fb7a25ce91
commit
688cdc24ae
|
@ -4,7 +4,7 @@
|
||||||
"stylelint-config-wikimedia/mediawiki"
|
"stylelint-config-wikimedia/mediawiki"
|
||||||
],
|
],
|
||||||
"rules": {
|
"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
|
"unit-disallowed-list": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,11 @@ var
|
||||||
logger = require( './logger.js' ),
|
logger = require( './logger.js' ),
|
||||||
dtConf = require( './config.json' ),
|
dtConf = require( './config.json' ),
|
||||||
CommentItem = require( './CommentItem.js' ),
|
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' ),
|
defaultEditMode = mw.user.options.get( 'discussiontools-editmode' ) || mw.config.get( 'wgDiscussionToolsFallbackEditMode' ),
|
||||||
defaultVisual = defaultEditMode === 'visual',
|
defaultVisual = defaultEditMode === 'visual',
|
||||||
featuresEnabled = mw.config.get( 'wgDiscussionToolsFeaturesEnabled' ) || {},
|
featuresEnabled = mw.config.get( 'wgDiscussionToolsFeaturesEnabled' ) || {},
|
||||||
|
|
|
@ -52,6 +52,10 @@
|
||||||
transform: translate( -50%, -150% );
|
transform: translate( -50%, -150% );
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
|
||||||
|
.vector-sticky-header-visible & {
|
||||||
|
top: 50px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-scrollback-bottom {
|
&-scrollback-bottom {
|
||||||
|
@ -60,6 +64,7 @@
|
||||||
left: 50%;
|
left: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// stylelint-disable-next-line no-descending-specificity
|
||||||
&-scrollback-top,
|
&-scrollback-top,
|
||||||
&-scrollback-bottom {
|
&-scrollback-bottom {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
Loading…
Reference in a new issue