mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 08:12:52 +00:00
style: prettier on touched insights/coach surfaces
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
21d064cfc6
commit
73e51d785e
40 files changed
+415
-413
No files matched your search
@@ -19,7 +19,10 @@ import { resolveAnnotationPositions } from "../health-chart";
|
||||
|
||||
const DAY_MS = 24 * 60 * 60 * 1000;
|
||||
|
||||
function makeSeries(start: number, count: number): Array<{ timestamp: number }> {
|
||||
function makeSeries(
|
||||
start: number,
|
||||
count: number,
|
||||
): Array<{ timestamp: number }> {
|
||||
return Array.from({ length: count }, (_, i) => ({
|
||||
timestamp: start + i * DAY_MS,
|
||||
}));
|
||||
@@ -54,9 +57,7 @@ describe("resolveAnnotationPositions", () => {
|
||||
|
||||
it("pins an exact-day annotation to its visible bucket", () => {
|
||||
const positions = resolveAnnotationPositions(
|
||||
[
|
||||
{ date: "2026-04-15", label: "Started Ramipril", color: "#ff79c6" },
|
||||
],
|
||||
[{ date: "2026-04-15", label: "Started Ramipril", color: "#ff79c6" }],
|
||||
dailySeries,
|
||||
);
|
||||
expect(positions).toHaveLength(1);
|
||||
|
||||
@@ -276,7 +276,9 @@ export interface ResolvedAnnotation {
|
||||
}
|
||||
|
||||
export function resolveAnnotationPositions(
|
||||
annotations: Array<{ date: string; label: string; color: string }> | undefined,
|
||||
annotations:
|
||||
| Array<{ date: string; label: string; color: string }>
|
||||
| undefined,
|
||||
chartData: Array<{ timestamp: number }> | undefined,
|
||||
): ResolvedAnnotation[] {
|
||||
if (!annotations || !chartData || chartData.length === 0) return [];
|
||||
@@ -906,7 +908,6 @@ export function HealthChart({
|
||||
chartData,
|
||||
);
|
||||
|
||||
|
||||
const showContextDetails = showMA || showTrend || showBands;
|
||||
const animationsEnabled = !prefersReducedMotion();
|
||||
|
||||
|
||||
Reference in new issue
Block a user