Skip to content

Workouts page: import dialog, header button and page drop - #70

Merged
gdoumen merged 6 commits into
mainfrom
feat/web-workout-import
Nov 17, 2026
Merged

gdoumen merged 6 commits into
mainfrom
feat/web-workout-import

Conversation

@gdoumen

@gdoumen gdoumen commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Brings the mobile import-workout UX to the Workouts page.

What changed

  • New Import Workout dialog: landing (choose or drop a .zwo/.json file, Cancel), importing (loader), result (success icon, Category select defaulting to the last-used group, graph of the imported workout, Import more / Done) and error (Pick another file / Close). Esc and outside click close it in every phase.
  • Workouts page: Import Workout header button and a page-wide drop overlay; a drop opens the dialog directly (importing, or error for wrong type / several files).
  • Removed the carousel Import card and the ActiveImport card from the Workouts page; the create-info text now points at the Import Workout button.
  • Category select extracted from the workout details dialog into a shared WorkoutCategorySelect.
  • Dialog molecule: each dialog now keeps a stable key and registers on a stack, so window.activeDialog always points at the topmost dialog. Previously a re-render of a lower dialog while an upper one was open could leave a stale key and make Esc stop working. This affects all dialogs.

Depends on

The services PR on the same branch name (import flow in the base page service, onImportFiles, result workout data). Release services first and bump the pinned version here before merging.

Test plan

  • unit tests (947) and build
  • dev build: button -> pick .zwo -> result (graph, category) -> Import more -> Done; repeat with .json
  • drop one valid file; drop two files; drop a .gpx (error phase, then Pick another file)
  • Esc / outside click / Cancel in every phase, also after Import more
  • carousel windowing in My Workouts; overlay and header layout
  • spot-check other dialogs for Esc after the Dialog change

Pure import dialog view (landing/importing/result/error) with stories and tests. The category select of the workout details dialog is extracted into WorkoutCategorySelect, behaviour unchanged.
Reads the import phase from the page service, refreshes on import-update, routes file/pick-another/category actions to the service and ends the import exactly once on every close path or unmount.
…import cards

The import flow now runs in WorkoutImportDialog, opened from a header button or by dropping a file anywhere on the page. The carousel upload/active-import cards and the retry wiring are removed, and the create-info text points at the new button.
…t graph, Import another

Result phase shows a success header, a left-aligned category select that always has a value, and the imported workout graph (centred fallback panel when no workout is provided). Title is now Import Successful, an Import another button returns to the landing phase. Importing shows a loader, error shows an error icon above the message.
…n; Dialog keeps a stable key and a dialog stack so ESC reaches the topmost dialog
@gdoumen
gdoumen marked this pull request as ready for review November 17, 2026 12:10
@gdoumen
gdoumen merged commit c3e1d16 into main Nov 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant