Repository navigation
Description
Status: done
Size: M
Part of #3286. Depends on #3288 and #3290.
Systems: route-planning
TL;DR
Goal: The start date, the number of riding days and the stay kinds stand at the top of the day list. The elevation drawer has one row of controls. The + between two days is centred and clear.
Problem: The drawer has three rows above the plot: its own controls, the trip settings and a coloured day label. A number at the right repeats the last tick of the axis. The + sign sits off centre in a faint circle.
Decision: The trip settings move from the drawer to the top of the day list, as three compact controls. The drawer keeps one row: its title, the range switch and the grade switch. The coloured day label and the number at the right go. The + becomes 20 px, centred and dark. (Review page, findings 09 and 10.)
Plan
- New component
builder/web/src/components/planner/StayChip.svelte. Props:value: Stay[],onChange: (kinds: Stay[]) => voidand the optionalonReset?: () => voidwithresetLabel?: string. It is a.planner-chipbutton with--chip-ink: var(--query-place), the icon of the first chosen kind and a label: the label of the kind for one kind, "Any place" for all five, else the first label and " +N". It opens a popover below it with one checkbox row for each entry ofstayOptions. The last checked row cannot be unchecked. WithonReset, the popover ends with a button that showsresetLabel.Escapeand a press outside close it. builder/web/src/components/planner/TripRow.svelte: the date button takes the classplanner-chipwith--chip-ink: var(--query-time); a guessed date keeps its dashed border. Its popover opens below the button. The day counter is 32 px high and shows "N days" (itsaria-labelkeeps "riding days"); a guessed count keeps its dashed line.StayChipreplaces the five toggle buttons and the label "Sleep in". The row wraps and has nomargin-left: auto.builder/web/src/components/planner/Itinerary.svelte: new proponTrip: (next: Trip, description: string) => void. While no day is open,<TripRow>stands at the top, with a 1 px line invar(--line)below it. Delete the paragraph "Choose where to sleep each night. Open a day for its stops." The "campsites suggested" block stays; its second sentence goes.builder/web/src/components/planner/StopPicker.svelte:StayChipreplaces the.kindsgroup.onResetis set when the night has its own kinds, withresetLabel"Same as the trip".builder/web/src/components/planner/PlannerProfile.svelte: delete the propstripandonTrip, theTripRowimport and the.tripelement; delete the.labelsblock withlabelledanddayDate; delete the.distanceelement. The rest-day columns stay.PlannerApp.sveltepassesonTrip={changePlan}toItineraryand no longer passestripandonTripto the profile.builder/web/src/components/planner/DayRow.svelte: with a start date, the title of a day is "Day N · " and the weekday label (weekdayLabel(addDays(trip.startDate, day.number - 1))), because the drawer no longer shows the date of a day.Itinerary.svelte.plus:padding: 0, 20 px wide and high,border-color: var(--ink-faint),color: var(--ink), icon size 12. On hover:background: var(--ink),color: var(--panel). Its centre stays on the vertical line of the day list.- Docs, in its own
docs:commit: indocs/content/software/trips.md, section "Days in the planner", say that the trip values stand at the top of the day list and that the profile shows the days by colour and by a marker at each night. - Tests: update the cases of
PlannerApp.svelte.test.tsand of the profile that read the trip row or the day labels. Add a component test forStayChip: the three label forms and the last row that cannot be unchecked.
Done when
- From
builder/web:npx vitest run src/components/planner/andnpm run check python3 docs/build_docs.py --check-links- In the running planner at a side panel width of 320 px, the trip row wraps without a horizontal scroll bar.
Notes from the build
- The class
.planner-chipcomes with planner: search panel chips, results list and hover (#3288) #3316. It shares its common rules with.planner-actionand has a 4 px vertical padding. - planner: night picker panel, stay kinds filter, calm map (#3290) #3317 put the stay kinds of a night and "Pick on the map" into one footer row of
StopPicker.svelte.StayChipreplaces the kind buttons in that row. "Cancel" stays in the picker inside an open day. stayNounsandsuitableare instops.tsafter planner: night picker panel, stay kinds filter, calm map (#3290) #3317.
Activity