Repository navigation
Description
Status: done
Size: S
Part of #3286 (round 2, after the owner's browser check).
Systems: route-planning
TL;DR
Goal: The four totals of a plan (distance, ascent, descent, riding time) stand outside the side panel, as one quiet line, so the day list has more room.
Problem: The totals are the largest text of the side panel and take about 150 px of its height. The owner finds the panel loud and the day list short.
Decision: The totals become one line of numbers. The owner wants to compare two places for that line in the running planner before the choice: variant A in the top bar, variant B in the title row of the elevation drawer. Both are built in full, each on its own branch with its own pull request. The owner picks one; the other pull request closes without a merge. (Wireframe page https://claude.ai/artifact/HibXoqwkvZM9jHwdae1Ka7, question 2, options A and B.)
Rejected: One small line inside the side panel (option C): the numbers stay in the panel and scroll away.
Words
- Totals: distance, ascent, descent and riding time of the whole plan. Today the block
RouteStats.svelteinbuilder/web/src/components/planner/shows them in the side panel. - Top bar: the bar above the side panel and the map (
TripBar.svelte): the plan name and the plan type, the controls "Activity" and "Preset", and the buttons at the right. - Drawer: the panel below the map with the elevation profile (
PlannerProfile.svelte). Its title row is.title, withDrawerTitle, the range switch and the grade switch.
Facts
PlannerApp.svelterenders<div class="trip-summary"><RouteStats …/></div>in the side panel, withview.summary(planViewinlib/planner/editor.ts). Ascent and descent arenullwhile a part of the route has no elevation; the hours arenullwhile there is no route line.RouteStatsshows "—" fornull.- The totals show only while the panel shows the day list of a plan with a route: not in a search, not in the signed routes, not while a day is open.
TripBar.svelteis a grid of three blocks:.trip-name(as wide as the side panel),.ride(Activity and Preset, in the middle column, which has free room at its right),.actions. At 1050 px and less it has two rows, at 760 px and less one column.PlannerApp.sveltedoes not render it on the compare screen.PlannerProfile.svelterenders the title row also while the drawer is closed, then withDrawerTitleonly. It has no totals today.PlannerApp.svelterenders a second, empty drawer title (.empty-profile) while there is no route.RouteStatshas two other users: each day of the day list (DayRow.svelte) and each card of the signed routes (SignedRoutes.svelte). They keep it.- The only test that reads the totals of the plan is in
PlannerApp.svelte.test.ts: it reads.trip-summaryand expects "Walking time". .titleofPlannerProfile.svelteis a flex row that wraps.PlannerApp.sveltegives the drawer a fixed height (drawerHeight).
Plan
Both variants share steps 1 and 2. Build variant A first, on the branch claude/planner-ux-totals-top-bar. Then cut claude/planner-ux-totals-drawer from the commit of steps 1 and 2 and build variant B.
- New component
PlanTotals.svelte, with the propsdistance,ascent,descent,hoursandwalkingofRouteStats. It is one line that does not wrap: "138.3 km · ↑ 4128 m · ↓ 2351 m · 10 h 8 m", numbers invar(--mono), units and arrows invar(--ink-soft), no visible labels. It is a description list with the classplan-totalsand the accessible name "Whole plan"; its four labels (the labels ofRouteStats, "Walking time" withwalking) are hidden from view and stay in the page for a screen reader.nullshows "—".RouteStats.sveltedoes not change. PlannerApp.svelte: delete.trip-summaryand its style from the side panel, and the import ofRouteStatsif nothing else in the file uses it. The values stay those ofview.summary, with the same rules fornull.- Variant A.
TripBar.sveltetakes a proptotals(the five values, ornullfor no route) and showsPlanTotalsin the middle column after.ride. The middle column wraps: where the line does not fit beside "Activity" and "Preset", it goes to a second row and the bar grows (a minimum height, not a fixed one). At 1050 px and less it stands in the second row after.ride; at 760 px and less it is its own row.PlannerApp.sveltepasses the totals whenever the plan has a route (visualRoute): also in a search, with an open day and with an open night. The numbers are always those of the whole plan; the figures of one day in the day list stay as they are. - Variant B.
PlannerProfile.sveltetakes the same proptotalsand showsPlanTotalsin.titledirectly afterDrawerTitle, also while the drawer is closed. The line is plain text and not a part of the button that opens the drawer. The numbers are always those of the whole plan, also while the profile shows one day or the map view. The title row may wrap when the switches leave no room; the plot then takes the height that is left, and the drawer keeps its height. The.empty-profiletitle shows no totals. - Check each variant with care at these window widths: 1400, 1200, 1060, 1040, 800 and 700 px. Nothing overlaps, nothing is cut off, and no horizontal scroll bar appears. Say in the pull request how you checked (the style rules, or a browser test).
- Tests, in each variant: the case of
PlannerApp.svelte.test.tsthat reads.trip-summaryreads.plan-totalsand still finds "Walking time"; one case forPlanTotals(the line, and "—" fornull); one case that the totals show while a search is open (A) or while the drawer is closed (B). - Each pull request says at its top that it is one of two variants and that only one merges. The pull request of variant B is a draft.
Done when
- In each branch, from
builder/web:npx vitest run src/components/planner/ src/lib/planner/andnpm run check - The owner compares both variants in the running planner and picks one.
Activity
timohueser commentedon Nov 11, 2026
The owner compared both variants in the running planner and picked variant B: the totals stand in the title row of the elevation drawer (#3377). The owner's change to it: the numbers are bolder and stand out more, because they are some of the most important information on the screen. Variant A (#3376) is closed without a merge.