diff --git a/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/design.md b/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/design.md new file mode 100644 index 0000000..b77c71b --- /dev/null +++ b/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/design.md @@ -0,0 +1 @@ +Серверный pageHtml подставляет текст по data-t; в label добавлен small.hint с существующими ключами *Tip. Новых строк нет. diff --git a/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/proposal.md b/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/proposal.md new file mode 100644 index 0000000..02bbe78 --- /dev/null +++ b/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/proposal.md @@ -0,0 +1,4 @@ +## Why +На «Сводке владельцу» подсказки к полям даты, расписания и периода видны только при наведении. +## What Changes +Подсказка выводится видимым текстом под полем (тексты уже есть в переводах ru/kk/en). diff --git a/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/specs/summary/spec.md b/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/specs/summary/spec.md new file mode 100644 index 0000000..31eccc4 --- /dev/null +++ b/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/specs/summary/spec.md @@ -0,0 +1,8 @@ +## ADDED Requirements +### Requirement: Видимые подсказки у полей сводки +Каждое поле даты, расписания и периода на «Сводке владельцу» SHALL иметь видимую подсказку под полем. + +#### Scenario: Открыта страница сводки +- **GIVEN** страница «Сводка владельцу» открыта +- **WHEN** пользователь смотрит на поле «День недельной сводки» +- **THEN** под полем виден текст подсказки diff --git a/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/tasks.md b/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/tasks.md new file mode 100644 index 0000000..6863a5a --- /dev/null +++ b/openspec/changes/archive/2026-11-17-brm-114-summary-field-hints/tasks.md @@ -0,0 +1,2 @@ +- [x] Видимые подсказки у 7 полей в public/summary.html +- [x] Тест в test/page-clarity.test.js diff --git a/openspec/specs/summary/spec.md b/openspec/specs/summary/spec.md new file mode 100644 index 0000000..9732955 --- /dev/null +++ b/openspec/specs/summary/spec.md @@ -0,0 +1,14 @@ +# summary Specification + +## Purpose +TBD - created by archiving change brm-114-summary-field-hints. Update Purpose after archive. + +## Requirements + +### Requirement: Видимые подсказки у полей сводки +Каждое поле даты, расписания и периода на «Сводке владельцу» SHALL иметь видимую подсказку под полем. + +#### Scenario: Открыта страница сводки +- **GIVEN** страница «Сводка владельцу» открыта +- **WHEN** пользователь смотрит на поле «День недельной сводки» +- **THEN** под полем виден текст подсказки diff --git a/public/summary.html b/public/summary.html index ecaf2ac..53aaf58 100644 --- a/public/summary.html +++ b/public/summary.html @@ -6,7 +6,7 @@ body{font:15px system-ui,sans-serif;padding:16px;max-width:760px;margin:auto;col h1{font-size:20px}h2{font-size:16px;margin-top:24px}table{border-collapse:collapse;width:100%}td,th{border:1px solid #ddd;padding:4px 8px;text-align:left} .row{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0;align-items:flex-end}textarea{width:100%;box-sizing:border-box}pre{background:#f5f5f5;padding:12px;white-space:pre-wrap;font:inherit}#err{color:#b00}#ok{color:#070} label{display:grid;gap:2px;margin:6px 0}label>span{font-size:13px;color:#555}label.check{display:flex;gap:6px;align-items:center}label.check>span{font-size:inherit;color:inherit} -.hint{font-size:13px;color:#555;margin:4px 0}.none{color:#555;font-style:italic}#tg{margin:8px 0;padding:8px 12px;border-radius:6px;background:#fff6d6}#tg.on{background:#e6f4e6} +label>.hint{display:block}.check>.hint{display:inline;margin-left:6px}.hint{font-size:13px;color:#555;margin:4px 0}.none{color:#555;font-style:italic}#tg{margin:8px 0;padding:8px 12px;border-radius:6px;background:#fff6d6}#tg.on{background:#e6f4e6} .bw{display:inline-flex;flex-direction:column;gap:2px;vertical-align:top}.bw small{color:#555;font-size:13px}button.off{color:#888;background:#eee;border:1px solid #ccc;cursor:not-allowed} tr.pick{cursor:pointer}input,select,textarea,button{font:inherit} .smp{display:inline-block;border:1px dashed #9a7400;background:#fff6d6;color:#6b5000;border-radius:4px;padding:0 5px;font-size:12px} @@ -21,22 +21,22 @@ tr.pick{cursor:pointer}input,select,textarea,button{font:inherit} - +

- -
+ +
- -
+ +

- -
+ + diff --git a/test/page-clarity.test.js b/test/page-clarity.test.js index ab4b11f..2ecf0d8 100644 --- a/test/page-clarity.test.js +++ b/test/page-clarity.test.js @@ -275,3 +275,10 @@ test("Стадии на другом языке: подпись по-англи assert.ok(m.includes('')); assert.ok(m.includes('')); }); + +// BRM-114: у полей «Сводки» подсказка видна текстом под полем, а не только при наведении +test("BRM-114: у полей даты, расписания и периода есть видимая подсказка", () => { + const m = markup("summary"); + for (const k of ["ui.sum.m.dateTip", "ui.sum.s.wdayTip", "ui.sum.s.wtimeTip", "ui.sum.s.dailyTip", "ui.sum.s.dtimeTip", "ui.sum.periodTip", "ui.sum.dateTip"]) + assert.match(m, new RegExp(``), k); +});