Repository navigation
Fix/UI day switch and polish - #56
Conversation
|
Thanks for this! 👍 it's a careful PR. The four commits read well one at a time, and the medals and the strap pill look great. A few things to fix before merging: 1. A failed day keeps the last day's page up 2. 3. 4. The "first_reps" sentence 5. Tap sizes (small) 6. 7. Not connected as a broken strap |
The window behind Compose took the platform's dark Material theme, #303030, which could show as a grey flash before the first frame. Both themes now set the window and colour background to black. - Search's clear button, the exercise name's tick and the live workout's page dots were 28 dp to tap. They are 48 dp now. The clear and the tick keep their drawn size and place; the page dots keep their height.
…ed out Tapping another day cut every detail's figures over at once, and on Recovery, Energy, Load and Active minutes the page first emptied to "No reading" while the day's result was worked out, then filled again. - The hero figure moves to the next day's (DayNumber). A plain number counts to it, one way only; a change under 25 rolls, the old figure sliding out as the new one slides in. A scrub or a live reading still lands at once. Recovery's arc and Sleep's horizon arc sweep between days. - Recovery, Energy, Load and Active minutes keep the last day's page until the new day's result comes, at most 4 s, while the strip follows the tap. - The week strip's pill, labels and dots fade between days. - Strip dots come from one read for the whole strip, so a day keeps its dot whichever day is open: Recovery and Sleep no longer lose today's on an earlier day. Heart points marks only the strip's days the strap recorded points for (ActivityHistory.heartPointsDays). - DayNumberTest records every frame of a count, and fails on the 2,500, 4,500, 2,500 jump a first version made.
…strap The header's strap chip was a dot and a few words. It is now the strap's state drawn in the pill (StrapPill.kt): - Connected: green as far as the battery, fading into the pill, the percent in the middle. Amber when low. - Charging: the green flows along the pill, with a bolt before the number. - Not synced: orange across the pill with the (i). It has its own StrapChip.Dot, Unsynced, apart from Warn. - Not connected: the Strap page's strap drawing, cut across the pod and slid apart. Connecting or not paired: the strap whole and dim. - StrapDrawing takes broken and lineScale for it; the Strap page and pairing draw it as before. The avatar and the pill sit on the Control surface (spec 2.2).
Each badge and best was a ring with a few letters and two lines of text under it. Each is now a medal in the glow language (Medals.kt, MedalDrawing.kt): the face lit from below with the glow cards' own tones (GlowPalette), a shape per group (round firsts, hexagon milestones, a laurel for the weekly goal, a soft square for something new, a rosette for bests) and a line picture per badge. A medal still to earn is drawn quiet. - The page and All badges show the medal and its name only. A tap opens its sheet: how it's earned, when, or how far along, and which workouts count. Each badge has its own sentence (core_badge_how_*), in English and Chinese. - The page: This week, the bests as rosettes, the next badge with a bar, the badges, then All badges, Last week and Celebrations as rows. The best card and the badges history earned use the medals too. - A new user's page no longer stays on "Loading" for ever. rewardsView waited for a non-empty list of workouts; it now goes on when nothing is stored (dao.anyWorkoutOnce, as RewardsKeeper.refresh tells the two apart). How badges and bests are earned is unchanged. - MedalLabelTest checks the longest labels keep inside the inner ring at 64 and 156 dp.
Recovery, Energy, Load and Active minutes held the last day's page for up to 4 s while the next day was worked out. When that day failed, its result never came, so the strip showed the new day while the figure and chart were still the old day's. The held page is now dropped as soon as the failure for the day shown is known; the 4 s limit stays for a result that's only slow.
… it lands DayNumber was given the day picked, and waited for a figure to follow it. When the next day's figure came in the same as the last day's, nothing moved and it kept waiting, so the next change on that day (a live Energy reading) counted or rolled when it should have landed at once. It now takes the day the figure is for. The pages that hold the last day's figures while the next is worked out (Recovery, Energy, Load, Active minutes) pass the held day, so the figure and its day arrive together, however late, and nothing is left waiting. The test that a change after an equal figure lands at once fails on the old code.
PlainNumber.write built a new NumberFormat for every frame a figure counted through. Each PlainNumber now makes its own once.
…ls of any kind A badge added to Rewards.BADGES without a core_badge_how_* sentence made BADGE_HOW.getValue throw when its sheet opened. The sheet now shows without the sentence instead. First reps is earned by any workout of repeated intervals (Structure.Reps), not only runs, so its sentence says a workout, in English and Chinese.
The live workout's page dots were 48 dp wide but 28 dp tall. Each is now a 48 dp square to tap, still laid out 28 dp tall, so the live screens keep their height: the 10 dp above and below reach into the bottom bar's 14 dp gaps, never over the controls. The strap pill takes 48 dp of the header's 60 dp to tap (minimumInteractiveComponentSize), drawn 32 dp tall as before. The Strap page still grows out of the pill as drawn.
The strap drawn broken read as damage, but not connected is mostly out of range or Bluetooth off, and passes
by itself; the pill is always in the header. Not connected now shows the whole, dimmed strap with its words,
as connecting and not paired do; the words ("2 h ago", "Not connected") tell the three apart.
StrapDrawing loses broken and its break constants, so it's the Strap page's drawing again, with only
lineScale added for the pill's small size.
…es too While Recovery is still learning, the number on its detail is the strap's own score, and that came from the day picked rather than the held page. So while the next day was worked out, the held page had no number: the gauge went and came back with the next day's number instead of counting to it. The strap's score is now held with the rest of the day's page.
5fc30fd to
74ea5a4
Compare
|
Thanks for the careful review! All seven are fixed, each in its own commit. I also rebased the branch onto 1. A failed day keeps the last day's page up ( 2. 3. 4. The "first_reps" sentence ( 5. Tap sizes (
6. 7. Not connected as a broken strap ( One more, found while testing ( Testing, on 3.0.3
The CI run is waiting for your approval, since the PR comes from a fork. |
|
Thanks alot for those fixes im spending most of time ironing backend bug right now , didn't even notice rewards wasn't working |
What this is
UI work only, in four commits you can review one at a time. No algorithm, database, protocol or permission changes. Built on
mainat v3.0.3 (a09baae1).Versioning
No version bump and no release notes file, so this fits whichever release you choose. Nothing here touches stored data or the schema, so it could ship as a 3.0.3 patch or wait for the next release. There's a draft of release notes at the end if it helps.
The commits
1. Black window behind the app, and 48 dp tap targets
windowBackgroundandcolorBackgroundto black. The platform's dark Material default (#303030) could flash grey before the first frame.2. Detail pages move between days
DayNumber). It counts one way only, and a change under 25 rolls. A scrub or a live reading still lands at once. Recovery's arc and Sleep's horizon arc sweep between days.ActivityHistory.heartPointsDays, one extradailyPairead for the days after the one shown).3. The strap pill
The header's chip (a dot and a few words) is now the strap's state drawn in the pill (
StrapPill.kt):StrapChip.Dot.Unsynced, split fromWarn. The order and text instrapChip()are unchanged.StrapDrawinggainslineScalefor the small size. The Strap page and pairing draw it as before.Spec 3.1 still describes the dot chip. If you keep this, I'm happy to update
spec.md.4. Goals and bests: medals
GlowPalette's tones, each group has its own shape (round firsts, hexagon milestones, a laurel for the weekly goal, a soft square for something new, a rosette for bests), and each badge has its own line picture. Locked medals are drawn quiet.core_badge_how_*andglow_goals_*, in English and Chinese.glow_goals_badges_countis replaced byglow_goals_badges.rewardsViewwaited for a non-empty workout list, so a new user's page stayed on "Loading" for ever. It now also goes on when nothing is stored (dao.anyWorkoutOnce(), the same checkRewardsKeeper.refreshuses). How badges and bests are earned is unchanged.Review fixes
One commit each, described in the review reply: a failed day lets go of the held page,
DayNumbertakes the day its figure is for, oneNumberFormatper figure, a badge sheet without its sentence instead of a crash, the intervals sentence for any workout, 48 dp taps for the page dots and the pill, not connected drawn whole, and Recovery's strap estimate held with its day.Testing
:app:detektDebug,:protocol:detektMainand:app:lintDebugpass, with no new baseline entries.:protocol:testpasses.:app:testDebugUnitTest: 1,955 of 1,960 pass, and the same with-PtestLocale=de-DE. The other 5 fail the same way on an unchanged checkout on Windows: DataStore can't rename its file inForgetDeviceTestandHabitAgeSeenTest,DetailRulesTestmeets CRLF, andPhoneAlertsViewModelTesthits a timing race. They pass on Linux, so CI should be green.DayNumberTestrecords every frame of a day's count and fails on the jump a first version made (2,500, 4,500, 2,500, then up), and on a live change animating after an equal day.MedalLabelTestchecks the longest labels stay inside the inner ring at 64 and 156 dp.-PdemoApp -PappVersion=3.0.3).Notes
app/build.gradle.ktsdefaults local builds to3.0.0, so a local debug build offers the current release as an update.Screenshots
Draft release notes, if useful