feat(help): in-app help center with per-screen guides and pictures

A help icon on every screen opens a panel with the screen's overview, its
sub-screens, task guides with a framed picture per step, search across guides
and the wiki, and a switch to any other screen's help. Guides exist for the
dashboard, Vacay, Atlas, Collections, Journey (list, journal, studio), Settings
(all tabs), Admin (all tabs) and the trip frame; the trip's own screens are
in progress. Pictures are produced by Playwright (client/e2e/help), texts in
all 23 languages.
This commit is contained in:
Maurice
2026-09-21 23:20:27 +02:00
parent 151e32107f
commit 4346d7f2c1
483 changed files with 47654 additions and 33 deletions
+5
View File
@@ -10,6 +10,8 @@ import BackupPanel from '../components/Admin/BackupPanel'
import GitHubPanel from '../components/Admin/GitHubPanel'
import AddonManager from '../components/Admin/AddonManager'
import PackingTemplateManager from '../components/Admin/PackingTemplateManager'
import HelpAnchor from '../components/Help/HelpAnchor'
import { getHelpContext } from '../help/registry'
import AuditLogPanel from '../components/Admin/AuditLogPanel'
import AdminMcpTokensPanel from '../components/Admin/AdminMcpTokensPanel'
import AdminPluginsPanel from '../components/Admin/AdminPluginsPanel'
@@ -79,8 +81,11 @@ function AdminPageDesktop(): React.ReactElement {
})),
]
// Every tab is its own help screen; a tab without one falls back to the admin overview.
const helpId = getHelpContext(`admin-${activeTab}`) ? `admin-${activeTab}` : 'admin'
return (
<PageShell background="var(--bg-secondary)">
<HelpAnchor id={helpId} />
<div className="w-full px-4 sm:px-6 lg:px-8 py-8">
{/* Header */}
<div className="flex items-center gap-3 mb-6">
+7 -1
View File
@@ -16,11 +16,17 @@ import AtlasCountrySearch from './atlas/AtlasCountrySearch'
import AtlasLayerToggle from './atlas/AtlasLayerToggle'
import { useToast } from '../components/shared/Toast'
import { getApiErrorMessage } from '../types'
import HelpAnchor from '../components/Help/HelpAnchor'
export default function AtlasPage(): React.ReactElement {
// ViewportRoute in App.tsx picks the branch now, so the phone screen is a
// chunk of its own instead of a dead limb in this one.
return <AtlasPageDesktop />
return (
<>
<HelpAnchor id="atlas" />
<AtlasPageDesktop />
</>
)
}
function AtlasPageDesktop(): React.ReactElement {
+7 -1
View File
@@ -20,12 +20,18 @@ import BulkAssignLabelModal from '../components/Collections/BulkAssignLabelModal
import { useCollections } from './collections/useCollections'
import EmptyState from '../components/shared/EmptyState'
import '../styles/dashboard.css'
import HelpAnchor from '../components/Help/HelpAnchor'
import '../styles/collections.css'
export default function CollectionsPage(): React.ReactElement {
// ViewportRoute in App.tsx picks the branch now, so the phone screen is a
// chunk of its own instead of a dead limb in this one.
return <CollectionsPageDesktop />
return (
<>
<HelpAnchor id="collections" />
<CollectionsPageDesktop />
</>
)
}
function CollectionsPageDesktop(): React.ReactElement {
+2
View File
@@ -10,6 +10,7 @@ import PlaceAvatar from '../components/shared/PlaceAvatar'
import EmptyState from '../components/shared/EmptyState'
import { Skeleton, SpotlightSkeleton, TripCardSkeleton } from '../components/shared/Skeleton'
import MobileTopBar from '../components/Layout/MobileTopBar'
import HelpAnchor from '../components/Help/HelpAnchor'
import { useDashboard } from './dashboard/useDashboard'
import {
type DashboardTrip, type HeroBundle, type TravelStats, type UpcomingReservation,
@@ -150,6 +151,7 @@ function DashboardPageDesktop(): React.ReactElement {
styling instead of inheriting the dashboard scope's font and the
`.trek-dash button` reset (which shifted the bell icon + menu items). */}
<Navbar />
<HelpAnchor id="dashboard" />
<div className="trek-dash trek-dash-shell">
{demoMode && <DemoBanner />}
<div className="trek-dash-scroll">
+7 -1
View File
@@ -25,11 +25,17 @@ import { GalleryView } from '../components/Journey/JourneyDetailPageGalleryView'
import { EntryEditor } from '../components/Journey/JourneyDetailPageEntryEditor'
import { AddTripDialog } from '../components/Journey/JourneyDetailPageAddTripDialog'
import { JourneySettingsDialog } from '../components/Journey/JourneyDetailPageSettingsDialog'
import HelpAnchor from '../components/Help/HelpAnchor'
export default function JourneyDetailPage() {
// ViewportRoute in App.tsx picks the branch now, so the phone screen is a
// chunk of its own instead of a dead limb in this one.
return <JourneyDetailPageDesktop />
return (
<>
<HelpAnchor id="journey-detail" />
<JourneyDetailPageDesktop />
</>
)
}
function JourneyDetailPageDesktop() {
+7 -1
View File
@@ -8,6 +8,7 @@ import {
import type { Journey } from '../store/journeyStore'
import { computeJourneyLifecycle } from '../utils/journeyLifecycle'
import { useJourney } from './journey/useJourney'
import HelpAnchor from '../components/Help/HelpAnchor'
const GRADIENTS = [
'linear-gradient(135deg, #0F172A 0%, #6366F1 45%, #EC4899 100%)',
@@ -25,7 +26,12 @@ function pickGradient(id: number): string {
export default function JourneyPage() {
// ViewportRoute in App.tsx picks the branch now, so the phone screen is a
// chunk of its own instead of a dead limb in this one.
return <JourneyPageDesktop />
return (
<>
<HelpAnchor id="journey" />
<JourneyPageDesktop />
</>
)
}
function JourneyPageDesktop() {
+7 -1
View File
@@ -1,4 +1,5 @@
import StudioShell from '../components/Studio/StudioShell'
import HelpAnchor from '../components/Help/HelpAnchor'
/**
* TREK Studio, the Journey book designer.
@@ -10,5 +11,10 @@ import StudioShell from '../components/Studio/StudioShell'
* user never sees it.
*/
export default function JourneyStudioPage() {
return <StudioShell />
return (
<>
<HelpAnchor id="journey-studio" />
<StudioShell />
</>
)
}
+5
View File
@@ -10,6 +10,8 @@ import NotificationsTab from '../components/Settings/NotificationsTab'
import IntegrationsTab from '../components/Settings/IntegrationsTab'
import AccountTab from '../components/Settings/AccountTab'
import AboutTab from '../components/Settings/AboutTab'
import HelpAnchor from '../components/Help/HelpAnchor'
import { getHelpContext } from '../help/registry'
import OfflineTab from '../components/Settings/OfflineTab'
import PluginSettingsTab from '../components/Settings/PluginSettingsTab'
import { usePluginStore } from '../store/pluginStore'
@@ -26,6 +28,8 @@ function SettingsPageDesktop(): React.ReactElement {
// Page = wiring container: addon/version loading + active-tab state in the hook.
const { hasIntegrations, appVersion, activeTab, setActiveTab, managed } = useSettings()
const hasPlugins = usePluginStore(s => s.plugins.length > 0)
// Every tab is its own help screen; a tab without one falls back to the settings overview.
const helpId = getHelpContext(`settings-${activeTab}`) ? `settings-${activeTab}` : 'settings'
const tabs: PageSidebarTab[] = [
{ id: 'display', label: t('settings.tabs.display'), icon: SlidersHorizontal },
@@ -53,6 +57,7 @@ function SettingsPageDesktop(): React.ReactElement {
<PageShell background="var(--bg-secondary)">
<div className="w-full px-4 sm:px-6 lg:px-8 py-8">
{/* Header */}
<HelpAnchor id={helpId} />
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 rounded-xl flex items-center justify-center bg-surface-tertiary">
<Settings className="w-5 h-5 text-content-secondary" />
+16
View File
@@ -35,6 +35,8 @@ import { lazyWithRetry } from '../utils/lazyWithRetry'
import { getDayBookendHotels } from '../utils/dayOrder'
import TripWarningsBanner from '../components/Planner/TripWarningsBanner'
import Navbar from '../components/Layout/Navbar'
import HelpAnchor from '../components/Help/HelpAnchor'
import { getHelpContext } from '../help/registry'
import { useToast } from '../components/shared/Toast'
import { Map, X, PanelLeftClose, PanelLeftOpen, PanelRightClose, PanelRightOpen, Ticket, PackageCheck, Wallet, FolderOpen, Users, Train } from 'lucide-react'
import { useTranslation } from '../i18n'
@@ -245,6 +247,11 @@ function ListsContainer({ tripId, packingItems, todoItems }: { tripId: number; p
)
}
/** The tab ids are historical; the help screens carry the names the tabs show. */
const TRIP_TAB_HELP: Record<string, string> = {
transports: 'transports', buchungen: 'bookings', listen: 'lists', finanzplan: 'costs', dateien: 'files', collab: 'collab', roadtrip: 'roadtrip',
}
export default function TripPlannerPage(): React.ReactElement | null {
// ViewportRoute in App.tsx picks the branch now, so the phone screen is a
// chunk of its own instead of a dead limb in this one.
@@ -380,8 +387,17 @@ function TripPlannerPageDesktop(): React.ReactElement | null {
const mapInsetLeft = leftPanelPx ? leftPanelPx + 10 : 0
const mapInsetRight = rightPanelPx ? rightPanelPx + 10 : 0
// The trip is a family of help screens: the frame, then one per tab, and on
// the plan one per overlay that is open. A screen that has no help yet falls
// back to the frame.
const helpFor = (id: string) => (getHelpContext(id) ? id : 'trip')
const helpId = activeTab === 'plan'
? helpFor(roadtripActive ? 'trip-roadtrip' : selectedPlace ? 'trip-place' : showDayDetail ? 'trip-day-detail' : 'trip')
: helpFor(`trip-${TRIP_TAB_HELP[activeTab] ?? activeTab}`)
return (
<div style={{ position: 'fixed', inset: 0, display: 'flex', flexDirection: 'column', overflow: 'hidden', ...fontStyle }}>
<HelpAnchor id={helpId} />
<Navbar tripTitle={trip.title} tripId={tripId} showBack onBack={() => navigate('/dashboard')} onShare={() => setShowMembersModal(true)} />
<div className="bg-surface-elevated border-b border-edge-faint" style={{
+7 -1
View File
@@ -9,12 +9,18 @@ import VacayStats from '../components/Vacay/VacayStats'
import VacaySettings from '../components/Vacay/VacaySettings'
import { Plus, Minus, ChevronLeft, ChevronRight, Settings, CalendarDays, AlertTriangle, Eye, Pencil, Trash2, Unlink, ShieldCheck, SlidersHorizontal } from 'lucide-react'
import Modal from '../components/shared/Modal'
import HelpAnchor from '../components/Help/HelpAnchor'
import { useVacay } from './vacay/useVacay'
export default function VacayPage(): React.ReactElement {
// ViewportRoute in App.tsx picks the branch now, so the phone screen is a
// chunk of its own instead of a dead limb in this one.
return <VacayPageDesktop />
return (
<>
<HelpAnchor id="vacay" />
<VacayPageDesktop />
</>
)
}
function VacayPageDesktop(): React.ReactElement {