From b4b87454f24c156e5df8b5b0dec78e0c41068d1c Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Wed, 13 Jul 2022 13:40:12 +0800 Subject: [PATCH] DEV: Move mini profiler badge to the right (#17468) In the era where we have left aligned sidebar, the mini profiler badge gets in the way --- app/assets/javascripts/discourse/lib/bootstrap-json/index.js | 2 +- app/assets/stylesheets/common/base/discourse.scss | 2 +- config/initializers/006-mini_profiler.rb | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js index 92d5616c622..e6380259923 100644 --- a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js +++ b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js @@ -141,7 +141,7 @@ function bodyFooter(buffer, bootstrap, headers) { let v = generateUID(); buffer.push(` - `); diff --git a/app/assets/stylesheets/common/base/discourse.scss b/app/assets/stylesheets/common/base/discourse.scss index c01ffbd47e9..15216e789ac 100644 --- a/app/assets/stylesheets/common/base/discourse.scss +++ b/app/assets/stylesheets/common/base/discourse.scss @@ -380,7 +380,7 @@ table { border-radius: 50%; } -.profiler-results.profiler-left { +.profiler-results.profiler-right { top: var(--header-offset) !important; } diff --git a/config/initializers/006-mini_profiler.rb b/config/initializers/006-mini_profiler.rb index 297ccdfbdee..4997c5cc8a4 100644 --- a/config/initializers/006-mini_profiler.rb +++ b/config/initializers/006-mini_profiler.rb @@ -72,7 +72,6 @@ if defined?(Rack::MiniProfiler) && defined?(Rack::MiniProfiler::Config) # does not get clobbered. Rack::MiniProfiler.config.cookie_path = Discourse.base_path.presence || "/" - Rack::MiniProfiler.config.position = 'left' Rack::MiniProfiler.config.backtrace_ignores ||= [] Rack::MiniProfiler.config.backtrace_ignores << /lib\/rack\/message_bus.rb/ Rack::MiniProfiler.config.backtrace_ignores << /config\/initializers\/silence_logger/