Save three requests per card view

Trade off is potentially a tiny delay on opening when reassigning, but
that seems worth it.
This commit is contained in:
David Heinemeier Hansson
2025-11-07 17:39:43 +01:00
parent 8c4b22918d
commit 07ec3f49fd
4 changed files with 15 additions and 6 deletions
@@ -24,6 +24,7 @@ export default class extends Controller {
limitHeightToViewport(this.dialogTarget, true)
this.#loadLazyFrames()
this.dialogTarget.setAttribute("aria-hidden", "false")
this.dispatch("show")
}
@@ -54,4 +55,8 @@ export default class extends Controller {
event.stopPropagation()
}
}
#loadLazyFrames() {
Array.from(this.dialogTarget.querySelectorAll("turbo-frame")).forEach(frame => { frame.loading = "eager" })
}
}