Skip to content

A platform for community discussion. Free, open, simple.

FIX: visual improvements to admin topic menu (#8638)

Krzysztof Kotlarek764e01b597ba
diff --git a/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6 b/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6
index 180ddc44977..56d06bb3c5a 100644
--- a/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6
+++ b/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6
@@ -73,6 +73,11 @@ createWidget("topic-admin-menu-button", {
hideAdminMenu() {
this.state.expanded = false;
this.state.position = null;
+
+ if (this.site.mobileView) {
+ $("#topic-progress-wrapper").css("z-index", "");
+ $(".header-cloak").hide();
+ }
},
showAdminMenu(e) {
@@ -98,6 +103,12 @@ createWidget("topic-admin-menu-button", {
if (this.attrs.fixed) {
position.left += $button.width() - 203;
}
+
+ if (this.site.mobileView) {
+ $("#topic-progress-wrapper").css("z-index", "auto");
+ $(".header-cloak").show();
+ }
+
this.state.position = position;
},
diff --git a/app/assets/stylesheets/common/base/topic-admin-menu.scss b/app/assets/stylesheets/common/base/topic-admin-menu.scss
index 386f7e8b603..6985f94ad6c 100644
--- a/app/assets/stylesheets/common/base/topic-admin-menu.scss
+++ b/app/assets/stylesheets/common/base/topic-admin-menu.scss
@@ -39,6 +39,18 @@
@include breakpoint(mobile-extra-large) {
width: 100%;
padding: 0;
+ padding-bottom: env(safe-area-inset-bottom);
+ z-index: 1000;
+
+ @keyframes slideUp {
+ 0% {
+ transform: translateY(100%);
+ }
+ 100% {
+ transform: translateY(0);
+ }
+ }
+ animation: slideUp 0.3s;
.header {
padding: 10px 0 0 10px;