mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix: сохранить identity карточек Masonry после reload (#561)
Сводная панель теперь использует канонический порядок карточек Home Assistant и не переносит локальные настройки между визуальными колонками после remount. Issue: #561 User-Visible: yes
This commit is contained in:
@@ -140,6 +140,19 @@ const MUTANT_DEFINITIONS = [
|
||||
replace: ' .checked=${dialog.draft.show_on_mobile} ?disabled=${dialog.busy}',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'summary-masonry-identity-uses-visual-dom-path',
|
||||
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
|
||||
+ '&& node --test --test-name-pattern="full Masonry reload uses canonical" '
|
||||
+ 'test/summary-panel.test.mjs',
|
||||
because: '#561 AC1/AC7: a full Masonry reload must derive each preference slot from '
|
||||
+ 'the canonical cards array, never the responsive visual-column DOM path',
|
||||
patches: [{
|
||||
file: 'src/summary-panel-identity.ts',
|
||||
find: " const slot = `masonry-v2:${cardIndex}${suffix ? `/${suffix}` : ''}`;",
|
||||
replace: ' const slot = structuralPath(start); // mutant: visual DOM path becomes persistent identity',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'summary-animation-stale-completion-unguarded',
|
||||
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
|
||||
|
||||
Reference in New Issue
Block a user