From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Modrinth Enhanced Date: Mon, 14 Sep 2026 13:06:38 +0200 Subject: [PATCH] Hide Modrinth Servers in the sidebar and fold away the news Two sidebar preferences, both stored as feature flags so they survive a restart without needing a settings migration: * The Modrinth Servers button in the left sidebar is off by default and can be turned back on under Settings > Features > Sidebar. * The news section in the right sidebar collapses by clicking its heading, remembering the state the way the friends list does. --- apps/app-frontend/src/App.vue | 31 +++++++++++++++++-- .../ui/settings/display/FeaturesSettings.vue | 27 ++++++++++++++++ .../src/composables/use-app-settings.ts | 2 ++ packages/app-lib/src/state/settings.rs | 2 ++ 4 files changed, 59 insertions(+), 3 deletions(-) diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index 33c29ce..1cab873 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -11,6 +11,7 @@ import { import { ArrowBigUpDashIcon, ArrowLeftRightIcon, + ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CompassIcon, @@ -370,6 +371,21 @@ const hasPlus = computed( // ad cookie consent flow that only exists to serve it are both switched off. const showAd = computed(() => false) const adConsentAvailable = computed(() => false) + +// Whether the news section in the right sidebar is folded away. Kept in the +// feature flags so it survives a restart, the same way the friends list +// remembers its collapsed sections. +const newsCollapsed = computed(() => appSettings.getFeatureFlag('news_collapsed')) + +function setNewsCollapsed(collapsed) { + appSettings.featureFlags.news_collapsed = collapsed + getSettings() + .then((settings) => { + settings.feature_flags.news_collapsed = collapsed + return setSettings(settings) + }) + .catch(handleError) +} providePageContext({ hierarchicalSidebarAvailable: ref(true), showAds: showAd, @@ -2278,6 +2294,7 @@ provideAppUpdateDownloadProgress(appUpdateDownload)
-

+

-
+ + +
{ />
+
+
+

+ {{ formatMessage(messages.showHostingTitle) }} +

+

{{ formatMessage(messages.showHostingDescription) }}

+
+ +
+

{{ formatMessage(messages.quickInstancesTitle) }} diff --git a/apps/app-frontend/src/composables/use-app-settings.ts b/apps/app-frontend/src/composables/use-app-settings.ts index 0d58903..4f0b2aa 100644 --- a/apps/app-frontend/src/composables/use-app-settings.ts +++ b/apps/app-frontend/src/composables/use-app-settings.ts @@ -24,6 +24,8 @@ export const DEFAULT_FEATURE_FLAGS = { friends_pending_collapsed: true, dismissed_photosensitivity_filter_warning: false, localhost_sign_in: false, + show_hosting_in_sidebar: false, + news_collapsed: false, } export type FeatureFlag = keyof typeof DEFAULT_FEATURE_FLAGS diff --git a/packages/app-lib/src/state/settings.rs b/packages/app-lib/src/state/settings.rs index 20601b8..b02bbe0 100644 --- a/packages/app-lib/src/state/settings.rs +++ b/packages/app-lib/src/state/settings.rs @@ -88,6 +88,8 @@ pub enum FeatureFlag { FriendsPendingCollapsed, DismissedPhotosensitivityFilterWarning, LocalhostSignIn, + ShowHostingInSidebar, + NewsCollapsed, } impl Settings {