Skip to content

Commit 77dd393

Browse files
committed
Add minimal guided upgrade flag (collapsed by default)
1 parent ed29198 commit 77dd393

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/frontend/src/lib/state/featureFlags.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,16 @@ export const GUIDED_UPGRADE = createFeatureFlagStore(
104104
},
105105
);
106106

107+
export const MIN_GUIDED_UPGRADE = createFeatureFlagStore(
108+
"MIN_GUIDED_UPGRADE",
109+
false,
110+
);
111+
107112
export default {
108113
DOMAIN_COMPATIBILITY,
109114
HARDWARE_KEY_TEST,
110115
DISCOVERABLE_PASSKEY_FLOW,
111116
ENABLE_ALL_LOCALES,
112117
GUIDED_UPGRADE,
118+
MIN_GUIDED_UPGRADE,
113119
} as Record<string, FeatureFlagStore>;

src/frontend/src/routes/(new-styling)/(channel)/authorize/(panel)/+layout.svelte

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
import { MigrationWizard } from "$lib/components/wizards/migration";
1414
import { handleError } from "$lib/components/utils/error";
1515
import Dialog from "$lib/components/ui/Dialog.svelte";
16-
import { GUIDED_UPGRADE } from "$lib/state/featureFlags";
16+
import { GUIDED_UPGRADE, MIN_GUIDED_UPGRADE } from "$lib/state/featureFlags";
1717
import { goto } from "$app/navigation";
1818
1919
const { children }: LayoutProps = $props();
2020
2121
let animationWrapperRef = $state<HTMLElement>();
2222
let isUpgradeCollapsed = $state(
23-
localStorage.getItem("ii-guided-upgrade-collapsed") === "true",
23+
localStorage.getItem("ii-guided-upgrade-collapsed") === "true" ||
24+
$MIN_GUIDED_UPGRADE,
2425
);
2526
let upgradePanelHeight = $state<number>(224);
2627
let isUpgrading = $state(false);
@@ -147,7 +148,7 @@
147148
onoutrostart={() =>
148149
animationWrapperRef?.setAttribute("aria-hidden", "true")}
149150
>
150-
{#if $GUIDED_UPGRADE}
151+
{#if $GUIDED_UPGRADE || $MIN_GUIDED_UPGRADE}
151152
{@render upgradePanel()}
152153
{/if}
153154
<AuthPanel
@@ -162,13 +163,15 @@
162163
{/key}
163164
{:else}
164165
<div class="relative col-start-1 row-start-1 flex flex-col gap-5">
165-
{#if $GUIDED_UPGRADE}
166+
{#if $GUIDED_UPGRADE || $MIN_GUIDED_UPGRADE}
166167
{@render upgradePanel()}
167168
{/if}
168169
<AuthPanel
169170
class={[
170171
"z-1",
171-
$GUIDED_UPGRADE && isUpgradeCollapsed && "rounded-t-none",
172+
($GUIDED_UPGRADE || $MIN_GUIDED_UPGRADE) &&
173+
isUpgradeCollapsed &&
174+
"rounded-t-none",
172175
]}
173176
>
174177
{@render children()}

0 commit comments

Comments
 (0)