Skip to content

Planner: the totals leave the side panel (two variants to compare) #3370

Closed

Description

@timohueser

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.svelte in builder/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, with DrawerTitle, the range switch and the grade switch.

Facts

  • PlannerApp.svelte renders <div class="trip-summary"><RouteStats …/></div> in the side panel, with view.summary (planView in lib/planner/editor.ts). Ascent and descent are null while a part of the route has no elevation; the hours are null while there is no route line. RouteStats shows "—" for null.
  • 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.svelte is 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.svelte does not render it on the compare screen.
  • PlannerProfile.svelte renders the title row also while the drawer is closed, then with DrawerTitle only. It has no totals today. PlannerApp.svelte renders a second, empty drawer title (.empty-profile) while there is no route.
  • RouteStats has 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-summary and expects "Walking time".
  • .title of PlannerProfile.svelte is a flex row that wraps. PlannerApp.svelte gives 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.

  1. New component PlanTotals.svelte, with the props distance, ascent, descent, hours and walking of RouteStats. It is one line that does not wrap: "138.3 km · ↑ 4128 m · ↓ 2351 m · 10 h 8 m", numbers in var(--mono), units and arrows in var(--ink-soft), no visible labels. It is a description list with the class plan-totals and the accessible name "Whole plan"; its four labels (the labels of RouteStats, "Walking time" with walking) are hidden from view and stay in the page for a screen reader. null shows "—". RouteStats.svelte does not change.
  2. PlannerApp.svelte: delete .trip-summary and its style from the side panel, and the import of RouteStats if nothing else in the file uses it. The values stay those of view.summary, with the same rules for null.
  3. Variant A. TripBar.svelte takes a prop totals (the five values, or null for no route) and shows PlanTotals in 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.svelte passes 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.
  4. Variant B. PlannerProfile.svelte takes the same prop totals and shows PlanTotals in .title directly after DrawerTitle, 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-profile title shows no totals.
  5. 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).
  6. Tests, in each variant: the case of PlannerApp.svelte.test.ts that reads .trip-summary reads .plan-totals and still finds "Walking time"; one case for PlanTotals (the line, and "—" for null); one case that the totals show while a search is open (A) or while the drawer is closed (B).
  7. 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/ and npm run check
  • The owner compares both variants in the running planner and picks one.

Activity

  1. timohueser commented on Nov 11, 2026

    @timohueser
    OwnerAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions