Skip to content

Retile mode ts#237

Draft
Abasz wants to merge 5 commits into0.9.8-In-Developmentfrom
retile-mode-ts
Draft

Retile mode ts#237
Abasz wants to merge 5 commits into0.9.8-In-Developmentfrom
retile-mode-ts

Conversation

@Abasz
Copy link
Copy Markdown
Collaborator

@Abasz Abasz commented Apr 13, 2026

This is the continuation of #213

Technically this feature works (and the GUI works too) but there are things that are still missing:

  • Styling issues (retile button text)
  • I dont think we have the grid size change integrated into the settings
  • We have not removed the original settings table from the settings
  • Unit test coverage

DXCanas and others added 5 commits April 12, 2026 17:56
- 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
@Abasz Abasz added this to the 0.9.8 milestone Apr 13, 2026
@JaapvanEkris
Copy link
Copy Markdown
Owner

Is this PR considered complete now?

@Abasz Abasz marked this pull request as draft April 17, 2026 08:13
@Abasz
Copy link
Copy Markdown
Collaborator Author

Abasz commented Apr 18, 2026

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.

@JaapvanEkris
Copy link
Copy Markdown
Owner

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 :).

Where are you running into issues?

@Abasz
Copy link
Copy Markdown
Collaborator Author

Abasz commented Apr 18, 2026

Where are you running into issues?

  1. First it was the missing field definition with the official SDK (the undocumented fileds).
  2. Then I moved to Mark's library, and I realised there is an issue with the prescaling (which I spent a lot of time to figure out but I think I got it now as written in the issue :) ).
  3. Then moving time is different in garmin connect than in any other app, because somehow GC recalculates it but not sure how (its wrong for your sample fit file too by the way, interestingly the diff is around 4 sec in many cases) :D
  4. Then normalized power somehow is not showing up (it does for orm).
  5. For some reason laps are merged by GC (currently I dont have splits) when there are two active laps next to each other. But If I have the same with my garmin watch this works, i.e. a separate lap is shown in GC. EDIT: Is it possibel that it requires heart rate? EDIT2: or is may be the activity is not long enough?

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).

@JaapvanEkris
Copy link
Copy Markdown
Owner

  1. Then moving time is different in garmin connect than in any other app, because somehow GC recalculates it but not sure how (its wrong for your sample fit file too by the way, interestingly the diff is around 4 sec in many cases) :D

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...

  1. Then normalized power somehow is not showing up (it does for orm).

I put a lot of effort in also filling in undocumented fields, as they seem to trigger internal behaviour of GC.

  1. For some reason laps are merged by GC (currently I dont have splits) when there are two active laps next to each other. But If I have the same with my garmin watch this works, i.e. a separate lap is shown in GC. EDIT: Is it possibel that it requires heart rate? EDIT2: or is may be the activity is not long enough?

Look at the FIT-file via fitfileviewer and see where they differ. It is the only way to reverse engineer this thing.

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).

Yeah, created a bugreport there, as they are butchering good lap data: https://forum.intervals.icu/t/intervals-icu-messes-up-fit-lapdata/127532

@JaapvanEkris JaapvanEkris added enhancement New feature or request Development branch Concerns a development branch labels May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development branch Concerns a development branch enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants