From f53ada8196b63e1ab540128d32c543e35bc71ccf Mon Sep 17 00:00:00 2001 From: Nathan Schneider Date: Sun, 18 Jan 2026 16:59:56 -0700 Subject: [PATCH] User experience improvements to the focused mode --- bicorder-app/src/App.svelte | 125 ++++++------ .../AnalysisTransitionBanner.svelte | 4 +- .../src/components/HamburgerMenu.svelte | 186 ++++++++++++++++++ bicorder-app/src/components/HelpModal.svelte | 33 +++- 4 files changed, 279 insertions(+), 69 deletions(-) create mode 100644 bicorder-app/src/components/HamburgerMenu.svelte diff --git a/bicorder-app/src/App.svelte b/bicorder-app/src/App.svelte index c655772..b1b70cd 100644 --- a/bicorder-app/src/App.svelte +++ b/bicorder-app/src/App.svelte @@ -8,6 +8,7 @@ import HelpModal from './components/HelpModal.svelte'; import FormRecommendation from './components/FormRecommendation.svelte'; import AnalysisTransitionBanner from './components/AnalysisTransitionBanner.svelte'; + import HamburgerMenu from './components/HamburgerMenu.svelte'; import { BicorderClassifier } from './bicorder-classifier'; // Load bicorder data and model from build-time constants @@ -97,6 +98,32 @@ viewMode = viewMode === 'focused' ? 'list' : 'focused'; } + function toggleFormMode() { + data = { + ...data, + metadata: { + ...data.metadata, + shortform: !data.metadata.shortform + } + }; + // Force refresh of components + refreshKey++; + // Reset to first screen when toggling + currentScreen = 0; + } + + function showAnalysis() { + // Find the first analysis screen + const firstAnalysisIndex = screens.findIndex(s => s.type === 'analysis'); + if (firstAnalysisIndex !== -1) { + currentScreen = firstAnalysisIndex; + // Switch to focused mode if in list mode + if (viewMode === 'list') { + viewMode = 'focused'; + } + } + } + // Generate ASCII progress bar function generateProgressBar(current: number, total: number): string { const filled = '#'; @@ -412,7 +439,7 @@ class="toolbar-btn help-btn" on:click={openHelp} aria-label="About the Bicorder" - title="Help & Instructions" + title="About" > ? @@ -424,20 +451,13 @@
- -
@@ -654,10 +674,6 @@ {/if} - - diff --git a/bicorder-app/src/components/AnalysisTransitionBanner.svelte b/bicorder-app/src/components/AnalysisTransitionBanner.svelte index 42e47c3..a596d15 100644 --- a/bicorder-app/src/components/AnalysisTransitionBanner.svelte +++ b/bicorder-app/src/components/AnalysisTransitionBanner.svelte @@ -71,7 +71,7 @@
+ + {#if isOpen} + + {/if} +
+ + diff --git a/bicorder-app/src/components/HelpModal.svelte b/bicorder-app/src/components/HelpModal.svelte index af341c0..3887271 100644 --- a/bicorder-app/src/components/HelpModal.svelte +++ b/bicorder-app/src/components/HelpModal.svelte @@ -18,19 +18,22 @@ @@ -126,6 +129,20 @@ color: var(--accent-color); } + .divider { + margin: 2rem 0 1.5rem 0; + border: none; + border-top: 1px solid var(--border-color); + opacity: 0.5; + } + + .credits { + font-size: 0.85rem; + opacity: 0.7; + text-align: center; + line-height: 1.6; + } + @media (max-width: 768px) { .modal-content { max-height: 90vh;