feat(help): ten more screens of a trip, registered with their guide scripts

Place details, Day details, Map, Transports, Bookings, Lists, Costs, Files,
Collab and Road Trip: 77 guides over 360 steps, each one a task a reader can
follow, with the Playwright script that will photograph it. The fixtures they
need go in beside ensureDaysFixtures, and every screen is a child of the trip,
so the panel folds them under it.

The capture now pins the browser's clock to the day the seeded trip ends. A
picture has to look the same whoever takes it and whenever: a day later the
trip is over, My Trips moves it out of the boarding pass, What's Next has
nothing left to list, and a forecast for a day in the past is not a forecast.
Only `Date` is pinned, so timers keep running.

trip-days is green end to end after its locators were checked against the
running app; its route guides read day 6, whose two stops sit next to each
other, because day 1's are separated by the flight and have no leg of their own.
This commit is contained in:
Maurice
2026-09-21 23:47:45 +00:00
parent 30a7cfd483
commit 0ed0d98c32
49 changed files with 6993 additions and 149 deletions
+37
View File
@@ -0,0 +1,37 @@
import { defineScreen } from '../defineScreen'
/**
* Help for the Bookings tab of a trip: the places to stay, the tables, the
* tickets and everything else that was booked, what a card says about one, how
* one is made by hand or read out of the confirmation that arrived, and how it
* is tied to the plan, to a document and to a cost. Flights, trains and the
* other ways of getting about belong to the Transports tab and never show here.
* A screen under `trip`; the step actions live in `e2e/help/trip-bookings.guide.ts`.
*/
const BOOKINGS = 'Reservations-and-Bookings'
const CREATE = { slug: BOOKINGS, anchor: 'creating-a-reservation' }
const SECTIONS = { slug: BOOKINGS, anchor: 'pending-and-confirmed' }
const CHANGE = { slug: BOOKINGS, anchor: 'editing-and-deleting' }
const IMPORT = { slug: BOOKINGS, anchor: 'import-from-booking-confirmation' }
export const { context: tripBookingsContext, guides: tripBookingsGuides } = defineScreen({
id: 'trip-bookings',
parent: 'trip',
route: '/trips/:id?tab=buchungen',
icon: 'ticket',
bullets: 6,
docs: [{ slug: BOOKINGS }, IMPORT, { slug: 'Accommodations' }],
guides: [
['create-booking', 'plus', 'guide', 6, 3, CREATE, ['booking-hotel', 'link-booking', 'edit-booking', 'add-transport'], true],
['booking-hotel', 'building', 'guide', 5, 3, { slug: 'Accommodations', anchor: 'creating-an-accommodation' }, ['create-booking', 'delete-booking', 'add-accommodation'], true],
['link-booking', 'link', 'quick', 4, 2, CREATE, ['create-booking', 'bookings-in-plan', 'day-bookings', 'place-booking']],
['booking-travelers', 'users', 'quick', 4, 2, SECTIONS, ['filter-bookings', 'add-member'], true],
['booking-files', 'folder', 'guide', 4, 3, { slug: 'Documents-and-Files', anchor: 'linking-files-to-places-reservations-or-assignments' }, ['create-booking', 'import-booking-file', 'files-link']],
['booking-cost', 'coins', 'guide', 5, 3, { slug: 'Budget-Tracking', anchor: 'expenses-linked-to-a-booking-or-a-place' }, ['create-booking', 'edit-booking', 'expense-from-booking'], true],
['filter-bookings', 'filter', 'quick', 5, 2, SECTIONS, ['booking-travelers', 'edit-booking']],
['import-booking-file', 'fileInput', 'guide', 4, 3, IMPORT, ['booking-files', 'create-booking']],
['edit-booking', 'pencil', 'quick', 4, 3, CHANGE, ['create-booking', 'delete-booking']],
['delete-booking', 'trash', 'quick', 3, 2, CHANGE, ['edit-booking', 'booking-hotel']],
],
})
+35
View File
@@ -0,0 +1,35 @@
import { defineScreen } from '../defineScreen'
/**
* Help for the Collab tab of a trip: the group's chat, the shared notes and
* links, the polls it decides with, and the list of what is coming up next.
* A screen under `trip`; the step actions live in `e2e/help/trip-collab.guide.ts`.
*
* The order of the guides is the order the media run walks them in, and the
* chat's delete step leaves a tombstone that cannot be taken back, so
* `trip-chat` is last: no earlier picture can catch it.
*/
const RTC = 'Real-Time-Collaboration'
const CHAT = 'Collab-Chat'
const NOTES = 'Collab-Notes'
const POLLS = 'Collab-Polls'
const NEXT = 'Whats-Next-Widget'
export const { context: tripCollabContext, guides: tripCollabGuides } = defineScreen({
id: 'trip-collab',
parent: 'trip',
route: '/trips/:id?tab=collab',
icon: 'users',
bullets: 6,
docs: [{ slug: RTC }, { slug: CHAT }, { slug: NOTES }, { slug: POLLS }, { slug: NEXT }],
guides: [
['write-note', 'pencil', 'guide', 6, 4, { slug: NOTES, anchor: 'creating-a-note' }, ['shared-links', 'trip-chat'], true],
['shared-links', 'link', 'guide', 4, 3, { slug: RTC, anchor: 'links' }, ['write-note'], true],
['create-poll', 'chart', 'guide', 6, 4, { slug: POLLS, anchor: 'creating-a-poll' }, ['vote-poll', 'close-poll'], true],
['vote-poll', 'thumbsUp', 'quick', 4, 2, { slug: POLLS, anchor: 'voting' }, ['create-poll', 'close-poll'], true],
['close-poll', 'lock', 'quick', 3, 2, { slug: POLLS, anchor: 'closing-a-poll-manually' }, ['create-poll', 'vote-poll']],
['whats-next', 'sparkles', 'quick', 3, 3, { slug: NEXT, anchor: 'what-it-shows' }, ['set-stop-times', 'read-day-plan']],
['trip-chat', 'messages', 'guide', 6, 4, { slug: CHAT, anchor: 'sending-messages' }, ['write-note', 'add-member'], true],
],
})
+32
View File
@@ -0,0 +1,32 @@
import { defineScreen } from '../defineScreen'
/**
* Help for the Costs tab of a trip: recording what something cost, who put the
* money down and who it is shared with, in whatever currency the receipt was
* in, and reading back who owes whom and what the trip costs each traveler.
* A screen under `trip`; the step actions live in `e2e/help/trip-costs.guide.ts`.
*/
const COSTS = 'Budget-Tracking'
const CURRENCIES = 'Currencies'
const SETTLEMENT = { slug: COSTS, anchor: 'settlement-calculator' }
const ITEMS = { slug: COSTS, anchor: 'expense-items' }
export const { context: tripCostsContext, guides: tripCostsGuides } = defineScreen({
id: 'trip-costs',
parent: 'trip',
route: '/trips/:id?tab=finanzplan',
icon: 'wallet',
bullets: 6,
docs: [{ slug: COSTS }, { slug: CURRENCIES }],
guides: [
['add-expense', 'plus', 'guide', 6, 3, ITEMS, ['split-expense', 'expense-payers', 'expense-currency'], true],
['expense-payers', 'userRound', 'guide', 4, 3, { slug: COSTS, anchor: 'who-paid' }, ['add-expense', 'settle-up']],
['split-expense', 'users', 'guide', 5, 3, { slug: COSTS, anchor: 'splitting-costs' }, ['add-expense', 'expense-payers'], true],
['expense-currency', 'coins', 'guide', 5, 3, { slug: CURRENCIES, anchor: 'expense-currency' }, ['add-expense', 'edit-trip', 'language-region'], true],
['filter-costs', 'filter', 'quick', 5, 2, ITEMS, ['add-expense', 'final-budget'], true],
['settle-up', 'checkCircle', 'tour', 6, 3, SETTLEMENT, ['final-budget', 'expense-payers'], true],
['final-budget', 'chart', 'guide', 4, 2, SETTLEMENT, ['settle-up', 'add-expense']],
['expense-from-booking', 'link', 'quick', 4, 2, { slug: COSTS, anchor: 'expenses-linked-to-a-booking-or-a-place' }, ['add-expense', 'bookings-in-plan', 'create-booking'], true],
],
})
+31
View File
@@ -0,0 +1,31 @@
import { defineScreen } from '../defineScreen'
/**
* Help for the day details panel of a trip's plan: the panel a day header
* opens over the map, with the day's name and date, the weather where you
* will be, the bookings that fall on the day and the nights booked for it.
* A screen under `trip`; the step actions live in `e2e/help/trip-day-detail.guide.ts`.
*/
const DAYS = 'Day-Plans-and-Notes'
const STAY = 'Accommodations'
const WEATHER = 'Weather-Forecasts'
const PANEL = { slug: DAYS, anchor: 'day-detail-panel' }
const IN_PANEL = { slug: STAY, anchor: 'in-the-day-detail-panel' }
export const { context: tripDayDetailContext, guides: tripDayDetailGuides } = defineScreen({
id: 'trip-day-detail',
parent: 'trip',
route: '/trips/:id?tab=plan',
icon: 'panelRight',
bullets: 6,
docs: [PANEL, IN_PANEL, { slug: WEATHER }],
guides: [
['day-panel', 'panelRight', 'guide', 6, 2, PANEL, ['day-weather', 'day-bookings', 'read-day-plan'], true],
['day-weather', 'eye', 'quick', 4, 3, { slug: WEATHER, anchor: 'what-is-shown' }, ['day-panel', 'read-day-plan']],
['rename-day', 'tags', 'quick', 4, 2, PANEL, ['manage-days', 'day-note'], true],
['add-accommodation', 'building', 'guide', 6, 3, { slug: STAY, anchor: 'creating-an-accommodation' }, ['create-place', 'edit-accommodation', 'booking-hotel'], true],
['edit-accommodation', 'pencil', 'guide', 5, 2, IN_PANEL, ['add-accommodation', 'day-bookings']],
['day-bookings', 'ticket', 'quick', 4, 2, { slug: DAYS, anchor: 'multi-day-reservations' }, ['bookings-in-plan', 'create-booking', 'add-accommodation']],
],
})
+28
View File
@@ -0,0 +1,28 @@
import { defineScreen } from '../defineScreen'
/**
* Help for the Files tab of a trip: getting documents in, giving them a note
* and links into the plan, finding them again, reading them on the spot and
* getting them back out of the trash.
* A screen under `trip`; the step actions live in `e2e/help/trip-files.guide.ts`.
*/
const FILES = 'Documents-and-Files'
const LINKING = { slug: FILES, anchor: 'linking-files-to-places-reservations-or-assignments' }
export const { context: tripFilesContext, guides: tripFilesGuides } = defineScreen({
id: 'trip-files',
parent: 'trip',
route: '/trips/:id?tab=dateien',
icon: 'folder',
bullets: 6,
docs: [{ slug: FILES }, { slug: 'Document-Sync' }],
guides: [
['files-upload', 'upload', 'guide', 4, 3, { slug: FILES, anchor: 'uploading' }, ['files-link', 'files-trash'], true],
['files-link', 'link', 'guide', 5, 3, LINKING, ['files-upload', 'place-files', 'link-booking'], true],
['files-star', 'star', 'quick', 3, 2, { slug: FILES, anchor: 'starring' }, ['files-filter', 'files-preview'], true],
['files-filter', 'filter', 'quick', 4, 2, { slug: FILES, anchor: 'browsing-and-filtering' }, ['files-star', 'files-preview']],
['files-preview', 'eye', 'guide', 5, 3, { slug: FILES, anchor: 'previewing-files' }, ['files-filter', 'files-upload']],
['files-trash', 'trash', 'guide', 5, 3, { slug: FILES, anchor: 'trash' }, ['files-upload', 'files-star'], true],
],
})
+31
View File
@@ -0,0 +1,31 @@
import { defineScreen } from '../defineScreen'
/**
* Help for the Lists tab of a trip: the packing list (lists of items, who
* brings what, what it weighs and which bag it is in) and the to-do list
* (tasks with a list, a priority, a due date and someone's name on them).
* A screen under `trip`; the step actions live in `e2e/help/trip-lists.guide.ts`.
*/
const PACKING = 'Packing-Lists'
const TODOS = 'Todos-and-Tasks'
const TEMPLATES = 'Packing-Templates'
export const { context: tripListsContext, guides: tripListsGuides } = defineScreen({
id: 'trip-lists',
parent: 'trip',
route: '/trips/:id?tab=listen',
icon: 'listChecks',
bullets: 6,
docs: [{ slug: PACKING }, { slug: TODOS }, { slug: TEMPLATES }],
guides: [
['packing-categories', 'tags', 'guide', 5, 3, { slug: PACKING, anchor: 'categories' }, ['check-off-packing', 'apply-packing-template'], true],
['check-off-packing', 'checkCircle', 'guide', 5, 3, { slug: PACKING, anchor: 'progress-bar' }, ['packing-categories', 'share-packing-item'], true],
['apply-packing-template', 'library', 'guide', 4, 3, { slug: TEMPLATES, anchor: 'applying-a-template' }, ['packing-templates', 'import-packing-list'], true],
['import-packing-list', 'fileInput', 'quick', 4, 2, { slug: PACKING, anchor: 'importing-a-list' }, ['apply-packing-template', 'packing-bags'], true],
['share-packing-item', 'users', 'guide', 5, 3, { slug: PACKING, anchor: 'the-three-tiers' }, ['packing-categories', 'add-member']],
['packing-bags', 'archive', 'tour', 6, 3, { slug: PACKING, anchor: 'bag-tracking' }, ['toggle-addon', 'import-packing-list'], true],
['create-todo', 'plus', 'guide', 6, 3, { slug: TODOS, anchor: 'adding-tasks' }, ['todo-filters'], true],
['todo-filters', 'filter', 'guide', 5, 2, { slug: TODOS, anchor: 'sidebar-filters' }, ['create-todo']],
],
})
+29
View File
@@ -0,0 +1,29 @@
import { defineScreen } from '../defineScreen'
/**
* Help for the map in the middle of a trip's plan: what the pins, badges and
* bubbles mean, the places the map itself can find, and the switches along its
* edges, satellite, the whole trip with its distances and the booking routes.
* A screen under `trip`; the step actions live in `e2e/help/trip-map.guide.ts`.
*/
const MAP = 'Map-Features'
const SETTINGS = 'Map-Settings'
const OVERLAY = { slug: MAP, anchor: 'reservation-and-transport-overlay' }
export const { context: tripMapContext, guides: tripMapGuides } = defineScreen({
id: 'trip-map',
parent: 'trip',
route: '/trips/:id?tab=plan',
icon: 'map',
bullets: 7,
docs: [{ slug: MAP }, { slug: SETTINGS }],
guides: [
['map-markers', 'mapPin', 'guide', 5, 3, { slug: MAP, anchor: 'place-markers' }, ['read-day-plan', 'place-detail', 'day-route']],
['map-nearby-places', 'search', 'guide', 6, 3, { slug: 'Places-and-Search', anchor: 'exploring-the-map-by-category' }, ['map-add-place', 'create-place'], true],
['map-add-place', 'plus', 'guide', 4, 2, { slug: MAP, anchor: 'right-click-middle-click-to-create-a-place' }, ['create-place', 'map-nearby-places'], true],
['map-satellite', 'globe', 'quick', 3, 2, { slug: MAP, anchor: 'satellite-view' }, ['map-provider', 'default-map']],
['map-whole-trip', 'route', 'guide', 4, 3, { slug: MAP, anchor: 'the-whole-trip-at-once' }, ['day-route', 'export-plan'], true],
['map-booking-routes', 'ticket', 'guide', 5, 3, OVERLAY, ['bookings-in-plan', 'travel-map-prefs', 'add-transport', 'create-booking']],
],
})
+33
View File
@@ -0,0 +1,33 @@
import { defineScreen } from '../defineScreen'
/**
* Help for the card that floats over the map once a place is picked: reading
* what the trip knows about a place, rating it, giving it a picture and files,
* putting it on the open day and off it again, who is coming, the booking
* pinned to the stop, the map apps, and a track’s colour and length.
* A screen under `trip`; the step actions live in `e2e/help/trip-place.guide.ts`.
*/
const PLACES = 'Places-and-Search'
const FIELDS = { slug: PLACES, anchor: 'place-fields' }
export const { context: tripPlaceContext, guides: tripPlaceGuides } = defineScreen({
id: 'trip-place',
parent: 'trip',
route: '/trips/:id?tab=plan',
icon: 'landmark',
bullets: 6,
docs: [{ slug: PLACES }, { slug: 'Trip-Planner-Overview' }],
guides: [
['read-place', 'eye', 'guide', 6, 3, FIELDS, ['rate-place', 'place-day-assign', 'edit-place'], true],
['rate-place', 'star', 'quick', 4, 3, { slug: PLACES, anchor: 'rating-a-place' }, ['read-place', 'filter-places'], true],
['place-image', 'image', 'guide', 4, 3, { slug: PLACES, anchor: 'custom-place-image' }, ['read-place', 'edit-place'], true],
['place-day-assign', 'calendarCheck', 'guide', 5, 3, { slug: 'Day-Plans-and-Notes', anchor: 'assigning-places-to-a-day' }, ['place-onto-day', 'remove-from-day', 'undo-change']],
['place-participants', 'users', 'quick', 4, 3, { slug: 'Trip-Members-and-Sharing', anchor: 'what-a-guest-can-be-assigned-to' }, ['add-member', 'add-guest'], true],
['place-booking', 'ticket', 'guide', 5, 3, { slug: 'Reservations-and-Bookings', anchor: 'reservation-card-contents' }, ['bookings-in-plan', 'link-booking'], true],
['place-files', 'folder', 'quick', 4, 3, { slug: 'Documents-and-Files', anchor: 'linking-files-to-places-reservations-or-assignments' }, ['read-place'], true],
['place-navigation', 'compass', 'quick', 4, 3, { slug: PLACES, anchor: 'opening-a-place-in-a-map-app' }, ['read-place']],
['place-to-collection', 'bookmark', 'quick', 4, 3, { slug: 'Collections', anchor: 'setting-it-from-a-trip' }, ['select-places', 'place-detail'], true],
['place-track', 'route', 'guide', 5, 3, { slug: 'Map-Features', anchor: 'gpx-tracks' }, ['import-places-file', 'day-route'], true],
],
})
+33
View File
@@ -0,0 +1,33 @@
import { defineScreen } from '../defineScreen'
/**
* Help for road trip mode: the plan read as one drive. Turning the mode on,
* the stops on the way and how long you stay at them, what is along the route,
* bending a leg with a via point or another way round, the driving settings
* and the travel day, refuelling before the tank runs out, and putting a day
* onto an imported track.
* A screen under `trip`; the step actions live in `e2e/help/trip-roadtrip.guide.ts`.
*/
const RT = 'Road-Trip'
const LIMITS = { slug: RT, anchor: 'driving-limits-and-range' }
export const { context: tripRoadtripContext, guides: tripRoadtripGuides } = defineScreen({
id: 'trip-roadtrip',
parent: 'trip',
route: '/trips/:id?tab=plan',
icon: 'compass',
bullets: 6,
docs: [{ slug: RT }, { slug: RT, anchor: 'what-needs-a-connection' }],
guides: [
['roadtrip-mode', 'route', 'guide', 5, 3, { slug: RT, anchor: 'switching-to-road-trip' }, ['read-day-plan', 'roadtrip-limits'], true],
['roadtrip-stops', 'mapPin', 'guide', 6, 3, { slug: RT, anchor: 'stops-on-the-way' }, ['roadtrip-corridor', 'set-stop-times'], true],
['roadtrip-corridor', 'search', 'guide', 5, 3, { slug: RT, anchor: 'search-along-the-route' }, ['roadtrip-stops', 'roadtrip-refuel'], true],
['roadtrip-via', 'map', 'guide', 5, 3, { slug: RT, anchor: 'via-points' }, ['roadtrip-alternatives', 'roadtrip-track']],
['roadtrip-alternatives', 'repeat', 'quick', 4, 2, { slug: RT, anchor: 'other-ways-and-avoidance' }, ['roadtrip-via', 'roadtrip-limits']],
['roadtrip-limits', 'sliders', 'guide', 6, 3, LIMITS, ['roadtrip-refuel', 'roadtrip-day-window'], true],
['roadtrip-day-window', 'calendarRange', 'guide', 5, 3, { slug: RT, anchor: 'daily-travel-times-and-day-endings' }, ['roadtrip-limits', 'roadtrip-mode']],
['roadtrip-refuel', 'minusCircle', 'guide', 4, 3, LIMITS, ['roadtrip-limits', 'roadtrip-corridor'], true],
['roadtrip-track', 'flag', 'guide', 4, 2, { slug: RT, anchor: 'following-a-gpx-or-kml-track' }, ['import-places-file', 'roadtrip-via'], true],
],
})
@@ -0,0 +1,31 @@
import { defineScreen } from '../defineScreen'
/**
* Help for the Transports tab of a trip and for the transports themselves: the
* rides that carry the traveller between the stops, flights, trains, buses,
* cars, taxis and ferries, plus the automated public-transit connections the
* Transitous search plans and the lines all of them draw on the map. A screen
* under `trip`; the step actions live in `e2e/help/trip-transports.guide.ts`.
*/
const TRANSPORT = 'Transport-Flights-Trains-Cars'
const MAP = 'Map-Features'
const OVERLAY = { slug: MAP, anchor: 'reservation-and-transport-overlay' }
export const { context: tripTransportsContext, guides: tripTransportsGuides } = defineScreen({
id: 'trip-transports',
parent: 'trip',
route: '/trips/:id?tab=transports',
icon: 'train',
bullets: 6,
docs: [{ slug: TRANSPORT }, OVERLAY],
guides: [
['transports-list', 'eye', 'guide', 5, 2, { slug: TRANSPORT, anchor: 'where-to-create' }, ['edit-transport', 'bookings-in-plan', 'filter-bookings']],
['add-transport', 'plus', 'guide', 6, 3, { slug: TRANSPORT, anchor: 'common-fields' }, ['plan-transit', 'edit-transport', 'transports-list'], true],
['plan-transit', 'train', 'guide', 6, 3, { slug: TRANSPORT, anchor: 'public-transit-search' }, ['change-transit-route', 'leg-travel-mode', 'add-transport'], true],
['change-transit-route', 'repeat', 'quick', 4, 2, { slug: TRANSPORT, anchor: 'public-transit-search' }, ['plan-transit', 'edit-transport']],
['leg-travel-mode', 'route', 'quick', 4, 3, { slug: MAP, anchor: 'travel-times-between-stops' }, ['plan-transit', 'day-route', 'read-day-plan']],
['edit-transport', 'pencil', 'quick', 4, 2, { slug: TRANSPORT, anchor: 'in-the-day-plan' }, ['add-transport', 'transports-list', 'bookings-in-plan']],
['transport-on-map', 'map', 'guide', 5, 3, OVERLAY, ['transports-list', 'day-route'], true],
],
})
+20
View File
@@ -13,6 +13,16 @@ import { adminGuides } from './contexts/admin'
import { tripGuides } from './contexts/trip'
import { tripPlacesGuides } from './contexts/tripPlaces'
import { tripDaysGuides } from './contexts/tripDays'
import { tripRoadtripGuides } from './contexts/tripRoadtrip'
import { tripCollabGuides } from './contexts/tripCollab'
import { tripFilesGuides } from './contexts/tripFiles'
import { tripCostsGuides } from './contexts/tripCosts'
import { tripListsGuides } from './contexts/tripLists'
import { tripBookingsGuides } from './contexts/tripBookings'
import { tripTransportsGuides } from './contexts/tripTransports'
import { tripMapGuides } from './contexts/tripMap'
import { tripDayDetailGuides } from './contexts/tripDayDetail'
import { tripPlaceGuides } from './contexts/tripPlace'
import {
HELP_CONTEXTS, HELP_GUIDES, getHelpContext, getHelpGuide, guidesFor, allHelpGuides,
ctxKey, ctxBulletKey, guideKey, guideStepKey, guideTipKey, helpMedia, docsRoute,
@@ -85,6 +95,16 @@ describe('help registry: structure', () => {
const lists = [
dashboardGuides, vacayGuides, atlasGuides, collectionsGuides, journeyGuides, journalGuides, studioGuides,
settingsGuides, adminGuides, tripGuides, tripDaysGuides, tripPlacesGuides,
tripRoadtripGuides,
tripCollabGuides,
tripFilesGuides,
tripCostsGuides,
tripListsGuides,
tripBookingsGuides,
tripTransportsGuides,
tripMapGuides,
tripDayDetailGuides,
tripPlaceGuides,
]
const ids = lists.flat().map(g => g.id)
const dupes = ids.filter((id, i) => ids.indexOf(id) !== i)
+24 -2
View File
@@ -9,6 +9,16 @@ import { adminContext, adminTabContexts, adminGuides } from './contexts/admin'
import { tripContext, tripGuides } from './contexts/trip'
import { tripPlacesContext, tripPlacesGuides } from './contexts/tripPlaces'
import { tripDaysContext, tripDaysGuides } from './contexts/tripDays'
import { tripRoadtripContext, tripRoadtripGuides } from './contexts/tripRoadtrip'
import { tripCollabContext, tripCollabGuides } from './contexts/tripCollab'
import { tripFilesContext, tripFilesGuides } from './contexts/tripFiles'
import { tripCostsContext, tripCostsGuides } from './contexts/tripCosts'
import { tripListsContext, tripListsGuides } from './contexts/tripLists'
import { tripBookingsContext, tripBookingsGuides } from './contexts/tripBookings'
import { tripTransportsContext, tripTransportsGuides } from './contexts/tripTransports'
import { tripMapContext, tripMapGuides } from './contexts/tripMap'
import { tripDayDetailContext, tripDayDetailGuides } from './contexts/tripDayDetail'
import { tripPlaceContext, tripPlaceGuides } from './contexts/tripPlace'
/**
* Everything the help center knows, composed from one file per screen under
@@ -18,12 +28,24 @@ import { tripDaysContext, tripDaysGuides } from './contexts/tripDays'
// The order of the screen switcher: the trip right under My Trips, where it is opened from.
const CONTEXT_LIST: HelpContext[] = [
dashboardContext, tripContext, tripDaysContext, tripPlacesContext, vacayContext, atlasContext, collectionsContext, journeyContext, journalContext, studioContext,
dashboardContext,
// The trip and its own screens, in the order a reader meets them: the three
// columns of the plan, the two panels that open over it, then the tabs in the
// order the tab bar has them, and the drive last because an addon decides it.
tripContext, tripDaysContext, tripPlacesContext, tripMapContext,
tripPlaceContext, tripDayDetailContext,
tripTransportsContext, tripBookingsContext, tripListsContext, tripCostsContext, tripFilesContext, tripCollabContext,
tripRoadtripContext,
vacayContext, atlasContext, collectionsContext, journeyContext, journalContext, studioContext,
settingsContext, ...settingsTabContexts, adminContext, ...adminTabContexts,
]
const GUIDE_LIST: HelpGuide[] = [
...dashboardGuides, ...vacayGuides, ...atlasGuides, ...collectionsGuides, ...journeyGuides, ...journalGuides, ...studioGuides,
...settingsGuides, ...adminGuides, ...tripGuides, ...tripDaysGuides, ...tripPlacesGuides,
...settingsGuides, ...adminGuides,
...tripGuides, ...tripDaysGuides, ...tripPlacesGuides, ...tripMapGuides,
...tripPlaceGuides, ...tripDayDetailGuides,
...tripTransportsGuides, ...tripBookingsGuides, ...tripListsGuides, ...tripCostsGuides, ...tripFilesGuides, ...tripCollabGuides,
...tripRoadtripGuides,
]
export const HELP_CONTEXTS: ReadonlyMap<string, HelpContext> = new Map(CONTEXT_LIST.map(c => [c.id, c]))