Dawnline 0.16.3
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions

- Move Dawnline to Services in LuCI and update links and documentation.
- Make activity messages clearer, including device renames and person-specific history.
- Prune redundant frontend tests.
This commit is contained in:
Aemeath committed 2026-10-31 12:21:53 +03:00
1 parent f2b5ba101b
commit b0d9982796
37 files changed
+452 -243

No files matched your search

+10 -12
View File
@@ -2,19 +2,17 @@ import { describe, expect, it } from 'vitest';
import { labelFade } from '../src/portal/ui/seg';
describe('picker names on a pick', () => {
it('blurs the picked name in a beat after the pill, and folds a shown one whole', () => {
expect(labelFade({ width: 0, full: 90, opacity: 0 }, true)).toEqual({ duration: 280, delay: 70 });
expect(labelFade({ width: 90, full: 90, opacity: 1 }, false)).toEqual({ duration: 220, delay: 0 });
});
it('runs only what is left of a fade turned back half-way', () => {
it('shortens a fade interrupted part-way', () => {
// Picked again while it was folding away: it comes back from 40% at once.
const opening = labelFade({ width: 0, full: 90, opacity: 0 }, true);
const closing = labelFade({ width: 90, full: 90, opacity: 1 }, false);
const back = labelFade({ width: 36, full: 90, opacity: 0.4 }, true);
expect(back.duration).toBeCloseTo(168);
expect(back.delay).toBeCloseTo(42);
// Left while it was still coming in: it folds from the wider of its width and its opacity.
expect(labelFade({ width: 45, full: 90, opacity: 0.2 }, false).duration).toBeCloseTo(110);
expect(labelFade({ width: 9, full: 90, opacity: 0.7 }, false).duration).toBeCloseTo(154);
expect(back.duration).toBeGreaterThan(0);
expect(back.duration).toBeLessThan(opening.duration);
expect(back.delay).toBeLessThanOrEqual(opening.delay);
// Interrupted while opening: either width or opacity can keep the closing fade active.
expect(labelFade({ width: 45, full: 90, opacity: 0.2 }, false).duration).toBeLessThan(closing.duration);
expect(labelFade({ width: 9, full: 90, opacity: 0.7 }, false).duration).toBeLessThan(closing.duration);
});
it('leaves a folded name alone and a shown one picked again as it is', () => {
@@ -25,7 +23,7 @@ describe('picker names on a pick', () => {
it('keeps to its bounds when the readings are off (no width to measure, opacity past 1)', () => {
expect(labelFade({ width: 30, full: 0, opacity: 0 }, false).duration).toBe(0);
expect(labelFade({ width: 200, full: 90, opacity: 0 }, false).duration).toBe(220);
expect(labelFade({ width: 200, full: 90, opacity: 0 }, false)).toEqual(labelFade({ width: 90, full: 90, opacity: 0 }, false));
expect(labelFade({ width: 0, full: 90, opacity: 1.2 }, true).duration).toBe(0);
});
});