v3.32.6: the empty preset banner no longer flashes on the RAM view
ramOpChanged() (v3.28.0) un-hid #ram-preset-warning by the operation kind, but the banner's text and visibility belong to spPresetWarningRender() (which already suppresses it for the batch ops). With no warning text the empty amber box stayed visible until the next status poll re-hid it - a flash on every RAM view / operation switch. The visibility is content-driven again: the setHidden line is gone and the renderer is called. Pinned in frontend/tests/ram.test.js with the real renderer (the pre-fix code fails the test). 1016 Python + 954 frontend green; simple-v464.
This commit is contained in:
+6
-2
@@ -1943,7 +1943,7 @@
|
||||
// ===== Version =====
|
||||
// Single source of truth for the PWA version: shown in the header and used
|
||||
// by the server version check in pysimConnect().
|
||||
const SIMPLE_VERSION = '3.32.5';
|
||||
const SIMPLE_VERSION = '3.32.6';
|
||||
document.getElementById('app-version').textContent = 'v' + SIMPLE_VERSION;
|
||||
|
||||
// ===== view history (the browser Back/Forward buttons) =====
|
||||
@@ -10180,10 +10180,14 @@ function ramOpChanged() {
|
||||
// The batch resolves the preset per card (by ICCID): its selector and the
|
||||
// single-card Execute button do not apply, and the batch panel takes over.
|
||||
setHidden('ram-preset-cell', isBatch);
|
||||
setHidden('ram-preset-warning', isBatch);
|
||||
setHidden('ram-exec-btn', isBatch);
|
||||
setHidden('ram-batch-panel', !isBatch);
|
||||
if (isBatch) ramBatchFetch();
|
||||
// The preset-mismatch banner is content-driven: spPresetWarningRender owns
|
||||
// its text *and* its visibility (the batch suppression included). Toggling
|
||||
// `hidden` by the op kind here showed an empty amber box until the next
|
||||
// render - the flash on every RAM view / op switch (v3.32.6).
|
||||
spPresetWarningRender();
|
||||
// The Execute button's .cap gate applies to the install-cap and compat ops.
|
||||
if (typeof pysimApplyAvailability === 'function') pysimApplyAvailability();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user