feat: move discussion to the top of the more menu

Also clean up some related-styles
This commit is contained in:
alistair3149 2022-04-24 01:52:41 -04:00
parent 2cd9efa4d9
commit f05295195a
3 changed files with 70 additions and 61 deletions

View file

@ -94,6 +94,11 @@ final class PageTools extends Partial {
$actionshtml[ 'label-class' ] .= 'screen-reader-text'; $actionshtml[ 'label-class' ] .= 'screen-reader-text';
} }
if ( $namespaceshtml ) {
$namespaceshtml[ 'label-class' ] ??= '';
$namespaceshtml[ 'label-class' ] .= 'screen-reader-text';
}
$props = [ $props = [
'data-page-views' => $viewshtml, 'data-page-views' => $viewshtml,
'data-page-actions' => $actionshtml, 'data-page-actions' => $actionshtml,

View file

@ -84,17 +84,7 @@
} }
} }
ul { > .mw-portlet {
margin: 0;
list-style: none;
}
li {
margin: 0;
}
}
#p-views {
ul { ul {
display: flex; display: flex;
} }
@ -143,7 +133,19 @@
.mixin-screen-reader-text; .mixin-screen-reader-text;
} }
} }
}
ul {
margin: 0;
list-style: none;
}
li {
margin: 0;
}
}
#p-views {
// VE styles shouldn't be core but it is just a few lines :/ // VE styles shouldn't be core but it is just a few lines :/
#ca-ve-edit { #ca-ve-edit {
order: 98; // Before source edit order: 98; // Before source edit
@ -197,14 +199,15 @@
} }
@media ( min-width: @width-breakpoint-tablet ) { @media ( min-width: @width-breakpoint-tablet ) {
.page-actions-more-menu { .page-actions {
&-more-menu {
position: relative; position: relative;
right: unset; right: unset;
left: -172px; left: -172px;
width: 200px; width: 200px;
} }
#p-views { > .mw-portlet {
li > a { li > a {
font-size: @ui-menu-text; font-size: @ui-menu-text;
@ -214,6 +217,7 @@
} }
} }
} }
}
@media ( hover: hover ) { @media ( hover: hover ) {
.page-actions-more:hover { .page-actions-more:hover {

View file

@ -8,8 +8,8 @@
{{#data-page-views}}{{>Menu}}{{/data-page-views}} {{#data-page-views}}{{>Menu}}{{/data-page-views}}
<div class="page-actions-more"> <div class="page-actions-more">
<nav class="page-actions-more-menu"> <nav class="page-actions-more-menu">
{{#data-page-actions}}{{>Menu}}{{/data-page-actions}}
{{#data-namespaces}}{{>Menu}}{{/data-namespaces}} {{#data-namespaces}}{{>Menu}}{{/data-namespaces}}
{{#data-page-actions}}{{>Menu}}{{/data-page-actions}}
{{#data-variants}}{{>Menu}}{{/data-variants}} {{#data-variants}}{{>Menu}}{{/data-variants}}
{{#data-page-toolbox}}{{>Menu}}{{/data-page-toolbox}} {{#data-page-toolbox}}{{>Menu}}{{/data-page-toolbox}}
</nav> </nav>