Retile mode ts#237
Conversation
- Add GridOrientationConfig and GridConfig types to store/types.ts - Add gridConfig defaults (landscape: 4x2, portrait: 2x4) to appState.ts - Update test fixtures to include the new gridConfig property Co-authored-by: Abasz <32517724+Abasz@users.noreply.github.com>
Add slotContent parameter to all metric template functions in dashboardMetrics.ts and the simpleMetricFactory helper. Restructure DashboardMetric render to use CSS classes (with-icon) instead of inline styles, and move slot inside the icon/label div. Add :host positioning to BatteryIcon. Add :host grid-column span and slot support to DashboardForceCurve. Update DashboardMetric tests for new class-based rendering. Co-authored-by: Abasz <32517724+Abasz@users.noreply.github.com>
- Add retile/submit toggle button with active state styling. - Add reset-to-default button (visible only in retile mode). - Move settings dialog ownership to parent via open-settings event. - Add toggleRetileMode and resetToDefault methods that dispatch custom events for PerformanceDashboard to handle. Co-authored-by: Abasz <32517724+Abasz@users.noreply.github.com>
- Replace fixed grid layout with CSS custom properties (--grid-columns, --grid-rows) driven by gridConfig from app state. - Add retile mode state management: local metrics copy on enter, save via changeGuiSetting on submit, reset-to-default support. - Add metric controls (remove/replace dropdown) rendered as slot content. - Add 'add tile' panel with available metrics filtered by remaining slots. - Handle settings dialog and workout dialog from PerformanceDashboard. - Use component factory pattern returning (slotContent) => TemplateResult to support both retile controls and normal rendering. Co-authored-by: Abasz <32517724+Abasz@users.noreply.github.com>
- Make cursor:pointer and @click on distance/calories/timer tiles conditional on onWorkoutOpen being defined (not shown in retile mode) - Add stopPropagation to retile controls to prevent parent click handler from intercepting dropdown interactions - Increase retile select padding and min-width for larger click area - Add z-index to retile controls for reliable click targeting
|
Is this PR considered complete now? |
|
Sorry for my late response, This is not ready, those things in the PR message needs implementation. I iced this temporarily in favour of the fit file which I though will be easy to review but the whole thing is a mess :). I will try to complete that this weekend and get back to this next week. |
Where are you running into issues? |
And I have not even started with the splits which seemingly used by intervals.icu to track the laps (simply adding laps do not show up in intervals.icu which was a shock to me). |
Total time seems OK. It somehow does a recalc, but I couldn't figure out why. But all others do it right, so it might be Garmin who is sloppy...
I put a lot of effort in also filling in undocumented fields, as they seem to trigger internal behaviour of GC.
Look at the FIT-file via fitfileviewer and see where they differ. It is the only way to reverse engineer this thing.
Yeah, created a bugreport there, as they are butchering good lap data: https://forum.intervals.icu/t/intervals-icu-messes-up-fit-lapdata/127532 |
The Retile/Submit and Reset text buttons were visually wider than the square icon buttons, breaking visual consistency. Key changes: - Add button.label-button CSS variant with auto width and padding - Apply label-button class to Retile/Submit and Reset buttons - Remove permanent active/highlight class from Submit button - Add unit tests for the changes
The component's inline css\` template was growing large and pushing the file toward the 300-line lint limit. Moving styles to a dedicated module keeps the component file concise and the styles easy to locate. Key changes: - Add PerformanceDashboard.styles.ts with performanceDashboardStyles - Import and assign performanceDashboardStyles as static styles - Remove css named import from AppElement in PerformanceDashboard.ts
The dashboard now keeps independent tile layouts for landscape and portrait orientations. Rotating the device loads the saved layout for that orientation rather than sharing a single list. Key changes: - Rename dashboardMetrics to landscapeDashboardMetrics for symmetry - Add portraitDashboardMetrics field to GuiConfig and app state defaults - Migrate old dashboardMetrics key on first load and remove legacy key - Seed portraitDashboardMetrics from landscape when never saved before - Add _getOrientationMetrics() to pick the active orientation array - Add orientation change listener to recompute grid and reload metrics - Reload _localMetrics from the new orientation on rotation in retile - Save to the correct orientation slot on Submit - Simplify _getAvailableMetrics to slot-count-only filtering
Replace the dual landscape/portrait fieldsets and the metric selector UI with one fieldset and a single slider pair. Portrait is always the transpose of landscape (columns swap with rows). Key changes: - Remove maxNumberOfTiles from GuiConfig, appState and consumers - Replace dual-fieldset grid UI with one orientation-aware fieldset - Legend shows current orientation (landscape or portrait) - Sliders show the active orientation's values and correct max limits - Rotating while the dialog is open swaps columns/rows live - close() derives the other orientation as the transpose - Update SettingsDialog tests for orientation-aware behaviour
Cover the previously untested retile methods and the render output of PerformanceDashboard including orientation-specific behaviour. Key changes: - Add _getOrientationMetrics tests for landscape and portrait selection - Add _handleRetileModeChanged tests for activate and deactivate state - Add _handleResetToDefault tests for orientations and inactive state - Add _removeMetric, _addMetricDirect and _replaceMetricDirect tests - Add template tests verifying layout in html template



This is the continuation of #213
Technically this feature works (and the GUI works too) but there are things that are still missing: