mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Change enable_sidebar query param to navigation_menu (#20368)
What does this change do? This commit the client to override the navigation menu setting configured by the site temporarily based on the value of the `navigation_menu` query param. The new query param replaces the old `enable_sidebar` query param. Why do we need this change? The motivation here is to allow theme maintainers to quickly preview what the site will look like with the various navigation menu site setting.
This commit is contained in:
committed by
GitHub
parent
509fee0f5a
commit
c47015b861
@@ -252,9 +252,9 @@ async function buildFromBootstrap(proxy, baseURL, req, response, preload) {
|
||||
url.searchParams.append("safe_mode", reqUrlSafeMode);
|
||||
}
|
||||
|
||||
const enableSidebar = forUrlSearchParams.get("enable_sidebar");
|
||||
if (enableSidebar) {
|
||||
url.searchParams.append("enable_sidebar", enableSidebar);
|
||||
const navigationMenu = forUrlSearchParams.get("navigation_menu");
|
||||
if (navigationMenu) {
|
||||
url.searchParams.append("navigation_menu", navigationMenu);
|
||||
}
|
||||
|
||||
const reqUrlPreviewThemeId = forUrlSearchParams.get("preview_theme_id");
|
||||
|
||||
Reference in New Issue
Block a user