fix(SingleContent): ensure correct content rendering on slug change and add navigation tests - #1968
Conversation
ac3a566 to
52b145b
Compare
johan-bell
left a comment
There was a problem hiding this comment.
Solid fix — scoping every read of the slug query's window to the current slug closes the stale-render path cleanly, and the added tests fail on main. Non-blocking notes: the comments at SingleContent.vue:199/288 still describe the old contentArr semantics and read stale next to contentForSlug; keying the player on content._id also rebuilds it on an in-place translation switch (no carried-over position) — flagging in case that UX wasn't intended; and with the slug scoping in place, cache:true on the slug query is effectively write-only for the non-SSG SPA, so it could be scoped to isSSG.
ivanslabbert
left a comment
There was a problem hiding this comment.
We need to find the issue at source (in how HybridQuery is used). It seems as if some type of response caching is enabled, causing the query to give old values before mutating to the correct value.
…nd add navigation tests
…ot rendered when navigating between posts
… when opening a new post
6493494 to
d80dc3f
Compare
…ut persistence across query rebuilds
|
You were right, it's fixed at source now. Two things were keeping the previous post on screen. The response cache — its key is a structural fingerprint that excludes values, so with a per-slug The keep-across-rebuild can't be inferred from the selector — a feed switching category wants the old tiles held as a placeholder, a slug lookup switching article doesn't, and the two look identical from inside HybridQuery. So it's a declared option now: That let
|
No description provided.