JITL Packs – Extended Dual Mode Test Block
Use this block to sanity-check trigger precedence, tooltip-first vs modal packs, registry lookups, and modal fallbacks.
Tip: Your JS treats data-pack-mode as modal only if it equals modal. Any other value behaves as tooltip-first.
0) Legacy inline Quick Tooltip (control):
CRP (inline quick tooltip)
0b) Inline QT should override everything else (precedence test):
Aspirin (QT overrides pack + interim)
1) Registry QT (control):
CRP (registry quick tooltip via data-qt-key)
1b) Registry Interim Tooltip (control):
CRP (registry interim tooltip via data-it-key)
2) Pack → Modal directly (pack-mode = modal):
Aspirin – drug pack (direct to modal)
2b) Pack → Modal directly, with extra placeholder fields:
Phenoxymethylpenicillin – drug pack (direct to modal, extra placeholders)
3) Pack → Tooltip-first (no pack-mode, default):
Aspirin – drug pack (tooltip first, then Explore)
3b) Pack → Tooltip-first using data-interim-html scaffold override:
Aspirin – pack tooltip scaffold (uses data-interim-html)
3c) Pack tooltip-first with explicit non-modal value (should still be tooltip-first):
CRP – test pack (data-pack-mode="tooltip" behaves as tooltip-first)
4) Pack (test) → Modal directly:
CRP – test pack (direct to modal)
4b) Pack (symptom) → Tooltip-first:
Acute cough – symptom pack (tooltip first)
5) Legacy Interim Tooltip (no pack) → Explore opens modal sequence:
CRP – legacy interim tooltip (no pack)
6) Modal via inline info HTML (no WP fetch):
Open INFO modal (data-info-content-html)
6b) Modal via content-value fallback (simple):
Open INFO modal (data-content-value)
6c) Modal fallback with only search query (no content configured):
Explorer modal (query-only fallback)
7) Modal width + top position test:
Open modal (80% width, top)
7b) Modal top offset numeric test:
Open modal (top = 60px)
8) Pack-value missing (edge case):
Metformin – drug pack (missing data-pack-value; check title/query behaviour)
Expected observations:
• If any trigger fails silently, check the console for "Unable to load JITL pack" or "registry failed to load".
• If tooltip Explore opens modal but content/queries are blank, the pack HTML may be missing .jitl-quick-query items, or pack fetch path may be wrong.