mirror of
https://github.com/zvx-echo6/refactored-recon.git
synced 2026-05-20 14:44:39 +02:00
design: extend with single-panel architecture (Phases k-o)
Adds the broader panel design that consolidates today's two-panel layout (Routes/Contacts + floating PlaceDetail) into one always-visible left column with state-driven content. Defines five panel states (IDLE, PREVIEW, ROUTING, PREVIEW+ROUTING, ROUTE_CALCULATED), shared place-card component, search bar behavior including aspirational search history, and implementation phases k-o.
This commit is contained in:
parent
c121559e01
commit
82d19e7fb8
1 changed files with 842 additions and 667 deletions
|
|
@ -508,6 +508,9 @@ Separate session will address:
|
|||
| Multi-modal | Drive + transit + walk hybrids |
|
||||
| Traffic-aware routing | Requires traffic data source |
|
||||
| Offline routing | Requires local Valhalla instance |
|
||||
| Search history backend persistence | Frontend localStorage first |
|
||||
| Saved places browsing UI | Future dedicated work |
|
||||
| Contacts view redesign | Separate from route-building |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -526,7 +529,17 @@ Separate session will address:
|
|||
| **i** | Add map-click-to-fill-active-input | e |
|
||||
| **j** | Mobile polish (long-press timing, bottom sheet, keyboard) | a-i |
|
||||
|
||||
**Estimated phases:** 10 discrete tasks, can be done incrementally.
|
||||
### Phases k-o: Single-Panel Architecture
|
||||
|
||||
| Phase | Task | Depends On |
|
||||
|-------|------|------------|
|
||||
| **k** | Refactor Panel.jsx to single-column state-driven content, remove right PlaceDetail panel | — |
|
||||
| **l** | Build shared place card component (preview + stop cards) | k |
|
||||
| **m** | Wire panel state transitions (IDLE → PREVIEW → ROUTING → ROUTE_CALCULATED) | l |
|
||||
| **n** | Mobile bottom sheet state mapping | m |
|
||||
| **o** | Search history (frontend localStorage scope first) | m |
|
||||
|
||||
**Estimated phases:** 15 discrete tasks, can be done incrementally.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -622,6 +635,168 @@ Future expansion via contextual wedge sets (different actions based on what was
|
|||
- Long-press / contextmenu handler always opens radial
|
||||
- Radial "Directions from/to here" explicitly sets input, overriding prior value
|
||||
|
||||
---
|
||||
|
||||
## 15. Panel Architecture (Single-Column Model)
|
||||
|
||||
This section defines the broader panel design that consolidates today's
|
||||
two-panel layout (Routes/Contacts + floating PlaceDetail) into one
|
||||
always-visible left column with state-driven content.
|
||||
|
||||
### Overview
|
||||
|
||||
The left panel is one always-visible column with state-driven content.
|
||||
The right-side PlaceDetail panel is **removed**; its content moves into
|
||||
the left panel.
|
||||
|
||||
**Width:** ~360px desktop. Mobile: panel becomes bottom sheet per
|
||||
Section 10.
|
||||
|
||||
**Visual style:** Panel is always anchored at the left edge of the
|
||||
viewport with consistent panel background. When idle (no preview, no
|
||||
route), only the search bar is visible at the top — the rest of the
|
||||
panel is empty space. The panel never disappears; it just shows less
|
||||
or more content depending on state.
|
||||
|
||||
### Panel States
|
||||
|
||||
Panel states are mutually exclusive content modes:
|
||||
|
||||
#### IDLE (no preview, no route)
|
||||
|
||||
- Search bar at top
|
||||
- Empty body (or subtle empty-state prompt: "Search or click a place
|
||||
to begin")
|
||||
- Recent activity / search history (when implemented)
|
||||
|
||||
#### PREVIEW (place selected via map click or search, not committed to route)
|
||||
|
||||
- Search bar at top
|
||||
- Preview card: full place detail (name, type, coords, elevation,
|
||||
land class, about, contact, links)
|
||||
- Action buttons inside or below the card: [Directions] [Add stop]
|
||||
[Save] [Share] [x]
|
||||
- Click another place: preview replaced (previous lost — search
|
||||
history retains it)
|
||||
- Click x or Escape: preview dismissed, return to IDLE
|
||||
|
||||
#### ROUTING (1+ stops, no preview)
|
||||
|
||||
- Search bar at top
|
||||
- Section: "Route" with stop cards
|
||||
- Each stop card: collapsed by default (header: pin + name +
|
||||
drag handle + remove); expandable to show full detail
|
||||
- Drag-to-reorder via card headers (preserves existing StopList)
|
||||
- Per-card actions: Save, Share, Remove
|
||||
- Bottom: [Get Directions] (when 2+ stops with valid mode), mode
|
||||
selector (auto/walk/bike), trip summary placeholder
|
||||
|
||||
#### PREVIEW + ROUTING (place clicked while route exists)
|
||||
|
||||
- Search bar at top
|
||||
- Preview card directly below search
|
||||
- Route section below preview
|
||||
- Both visible simultaneously
|
||||
- Multiple cards can be expanded at once (preview + a stop)
|
||||
|
||||
#### ROUTE_CALCULATED (after route fetch)
|
||||
|
||||
- Search bar at top
|
||||
- Route summary (total time, distance)
|
||||
- Mode selector
|
||||
- Stop cards (collapsed; expand for detail)
|
||||
- Turn-by-turn maneuvers
|
||||
- Preview can appear on top if user clicks a place
|
||||
|
||||
### Search Bar Behavior
|
||||
|
||||
- Pinned to top of panel
|
||||
- Always for browsing (search -> preview, never auto-add as stop)
|
||||
|
||||
#### Search History (aspirational — design now, implement later)
|
||||
|
||||
- Empty search -> dropdown shows 5 most recent searches
|
||||
- Authed: persisted to backend
|
||||
- Guest: localStorage
|
||||
- Typing: recent matches sorted to top of search results
|
||||
|
||||
### Card Pattern
|
||||
|
||||
Shared between preview and stop cards. Both use the same component,
|
||||
parameterized by role.
|
||||
|
||||
#### Header (always visible)
|
||||
|
||||
- Pin/marker icon (color varies by role — preview vs stop number)
|
||||
- Place name
|
||||
- Expand/collapse chevron
|
||||
- For stops: drag handle, remove (x)
|
||||
|
||||
#### Body (collapsed by default for stops, expanded by default for preview)
|
||||
|
||||
- Type / category
|
||||
- Coordinates + elevation + land class
|
||||
- About (description, Wikipedia excerpt)
|
||||
- Contact (phone, website, hours)
|
||||
- Links (Wikipedia, OSM, Wikidata)
|
||||
- Action buttons:
|
||||
- Preview: [Directions] [Add stop] [Save] [Share]
|
||||
- Stop: [Save] [Share]
|
||||
|
||||
### State Transitions
|
||||
|
||||
```
|
||||
IDLE -> PREVIEW : click place / search-select
|
||||
PREVIEW -> IDLE : x button / Escape
|
||||
PREVIEW -> PREVIEW (different) : click another place
|
||||
PREVIEW -> ROUTING : "Add stop" on preview
|
||||
PREVIEW -> ROUTE_CALCULATED : "Directions" (becomes destination,
|
||||
route auto-calculates if From available)
|
||||
ROUTING -> IDLE : remove all stops
|
||||
ROUTING -> PREVIEW + ROUTING : click place
|
||||
ROUTING -> ROUTE_CALCULATED : "Get Directions" / auto-route trigger
|
||||
PREVIEW + ROUTING -> ROUTING : dismiss preview
|
||||
PREVIEW + ROUTING -> ROUTING : "Add stop" on preview (adds new stop)
|
||||
ROUTE_CALCULATED -> ROUTING : edit route
|
||||
ROUTE_CALCULATED -> IDLE : clear route
|
||||
```
|
||||
|
||||
### Routes / Contacts Tabs
|
||||
|
||||
Tentative: Routes is default panel. Contacts is a separate view
|
||||
accessible via a tab or icon at the top. Contacts view replaces
|
||||
route/preview content with a contact list — does not combine with
|
||||
route-building.
|
||||
|
||||
### Map Zoom-to-Feature
|
||||
|
||||
With single panel, padding becomes simpler — just one panel width
|
||||
(~360px) on the left. Top/right/bottom can be small (~50px each).
|
||||
|
||||
### Mobile Bottom Sheet State Mapping
|
||||
|
||||
Same logic as desktop, layout rotated:
|
||||
|
||||
| State | Sheet Position |
|
||||
|---------------------|----------------|
|
||||
| IDLE | peek (search bar visible) |
|
||||
| PREVIEW | half (preview card) |
|
||||
| ROUTING | half (stops list) |
|
||||
| PREVIEW + ROUTING | full (both, scrollable) |
|
||||
| ROUTE_CALCULATED | half/full (summary + maneuvers) |
|
||||
|
||||
---
|
||||
|
||||
## 16. Open Questions
|
||||
|
||||
### From Single-Panel Architecture
|
||||
|
||||
- Routes/Contacts tab location and behavior in single-panel model
|
||||
- Preview-of-already-routed-place: probably auto-expands the existing
|
||||
stop card, no duplicate preview
|
||||
- Preview card position confirmed above route section (per mock)
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Appendix A: Current Code References
|
||||
|
|
@ -664,4 +839,4 @@ Future expansion via contextual wedge sets (different actions based on what was
|
|||
|
||||
---
|
||||
|
||||
*Document created 2026-04-26. Updated 2026-04-26 with resolved decisions. Implementation to follow in dedicated session.*
|
||||
*Document created 2026-04-26. Updated with resolved decisions and single-panel architecture (Phases k-o). Implementation to follow in dedicated session.*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue