Fix: title bug#2449
Conversation
WalkthroughTwo Svelte layout files under the databases routes were updated to wrap title elements in keyed blocks tied to page.url.pathname. In src/routes/(console)/project-[region]-[project]/databases/+layout.svelte, the page title is wrapped in a {#key page.url.pathname} block to force re-render on pathname changes. In src/routes/(console)/project-[region]-[project]/databases/database-[database]/+layout.svelte, the head title is similarly keyed. Comments note this addresses a Svelte rendering issue. No changes to exported/public entities or visible titles. Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/routes/(console)/project-[region]-[project]/databases/+layout.svelte (1)
34-37: Effective workaround for the Svelte rendering bug.The
{#key}block correctly forces the title to re-render on pathname changes, addressing the issue where the page title persists incorrectly.Optionally, consider making the comment more descriptive:
- <!-- svelte bug, the table header just stays! --> + <!-- Workaround for Svelte bug #14789: forces title re-render on navigation -->This improves clarity and provides a reference to the upstream issue for future maintainers.
src/routes/(console)/project-[region]-[project]/databases/database-[database]/+layout.svelte (1)
141-144: Effective workaround for the Svelte rendering bug.The
{#key}block correctly forces the title to re-render on pathname changes, addressing the issue where the page title persists incorrectly. Good consistency with the same workaround in the parent layout file.Optionally, consider making the comment more descriptive (consistent with the suggestion for the parent layout):
- <!-- svelte bug, the table header just stays! --> + <!-- Workaround for Svelte bug #14789: forces title re-render on navigation -->This improves clarity and provides a reference to the upstream issue for future maintainers.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/routes/(console)/project-[region]-[project]/databases/+layout.svelte(1 hunks)src/routes/(console)/project-[region]-[project]/databases/database-[database]/+layout.svelte(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: e2e
- GitHub Check: build
What does this PR do?
Svelte bug actually -
@sveltejs/svelte/issues/14789Test Plan
Manual.
Related PRs and Issues
https://discord.com/channels/564160730845151244/1420211316722892841
Have you read the Contributing Guidelines on issues?
Yes.
Summary by CodeRabbit