mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-03 21:28:59 +00:00
fix: commit slider-number input atomically (#608)
Issue: #608 User-Visible: yes
This commit is contained in:
@@ -447,8 +447,11 @@ export const LAZY_FURNITURE_ART_GZIP_CEILING = 17_900;
|
||||
* классов из разметки): итог #600 — 222 900 → 243 900 (+21 000, из них
|
||||
* ≈ 12 000 — четыре словаря `i18n/settings`, остальное — лист набора и
|
||||
* разметка четырёх форм с валидацией и dirty).
|
||||
* - #608: 243 900 → 244 400 (замер 243 597). Атомарный commit числового поля
|
||||
* добавил общий normalizer и обработчик change в form-kit; новый потолок
|
||||
* оставляет 803 Б сверху и 1 197 Б до нижней границы полосы.
|
||||
*/
|
||||
export const LAZY_EDITOR_GZIP_CEILING = 243_900;
|
||||
export const LAZY_EDITOR_GZIP_CEILING = 244_400;
|
||||
export const LAZY_GRAPH_CEILING_BAND = 2_000;
|
||||
|
||||
/**
|
||||
|
||||
@@ -72,6 +72,21 @@ function relocateEditorPatch(patch, cardSource, editorSource) {
|
||||
// `find` обязан встречаться в файле ровно один раз: патч, который ложится «куда
|
||||
// попало», проверяет не то, что объявлен проверять. Это контролирует --check.
|
||||
const MUTANT_DEFINITIONS = [
|
||||
{
|
||||
id: 'range-line-clamps-every-keystroke',
|
||||
guard: 'node demo/smoke_range_line_draft.mjs',
|
||||
because: '#608 AC1/AC5: partial keyboard text must stay local until commit. Restoring the '
|
||||
+ 'old per-input clamp mutates the host draft on the first digit and makes 120 impossible '
|
||||
+ 'to enter as a sequence.',
|
||||
patches: [{
|
||||
file: 'src/editors/form-kit.ts',
|
||||
find: ' onInput: () => undefined,',
|
||||
replace: ' onInput: (raw) => {\n'
|
||||
+ ' const n = Number(raw);\n'
|
||||
+ ' if (Number.isFinite(n)) onInput(Math.min(max, Math.max(min, n)));\n'
|
||||
+ ' },',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'ha-form-shell-width-falls-back-to-generic',
|
||||
guard: 'node demo/smoke_ha_form_shell_parity.mjs',
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
|
||||
/** @type {SmokeLink[]} */
|
||||
export const SMOKE_LINKS = [
|
||||
{
|
||||
symbols: ['rangeLine', 'committedRangeLineValue'],
|
||||
smokes: ['smoke_range_line_draft.mjs', 'smoke_dialog_config_parity.mjs'],
|
||||
because: '#608: the production-bundle witnesses type partial numeric text into real settings '
|
||||
+ 'dialogs, observe that host drafts stay unchanged until commit, and verify field/slider '
|
||||
+ 'synchronisation; neither browser smoke imports the form-kit helper',
|
||||
},
|
||||
{
|
||||
symbols: ['canonicalFurnitureId'],
|
||||
smokes: ['smoke_furniture.mjs'],
|
||||
|
||||
Reference in New Issue
Block a user