add full screen for embedding page#448
Conversation
Review Summary by QodoAdd full-screen mode support for embedding pages
WalkthroughsDescription• Add full-screen mode support for embedding pages • Implement dynamic footer and padding visibility toggle • Move full-screen styling from page-specific to reusable component • Update type definitions to include fullScreen property Diagramflowchart LR
A["EmbeddingPage Component"] -->|"fullScreen state"| B["Toggle Footer Visibility"]
A -->|"fullScreen state"| C["Adjust Page Padding"]
D["EmbeddingInfoModel"] -->|"fullScreen property"| A
E["Page Components"] -->|"Remove inline styles"| F["Use Component Logic"]
File Changes1. src/lib/common/embedding/EmbeddingPage.svelte
|
Code Review by Qodo
1. SSR document access crash
|
| $effect(() => { | ||
| const footer = document.querySelector('.footer'); | ||
| const pageContent = document.querySelector('.page-content'); | ||
|
|
There was a problem hiding this comment.
1. Ssr document access crash 🐞 Bug ☼ Reliability
EmbeddingPage.svelte calls document.querySelector(...) unconditionally inside a $effect, which can throw ReferenceError: document is not defined when the component is rendered in SSR/non-browser contexts. This would break rendering of embedding routes and potentially the whole page response.
Agent Prompt
### Issue description
`src/lib/common/embedding/EmbeddingPage.svelte` uses `document.querySelector` inside `$effect` without a browser/SSR guard. In SSR/non-browser contexts, this can throw because `document` is undefined.
### Issue Context
Elsewhere in the codebase, `$effect` blocks that depend on DOM state are gated with `browser` checks, indicating this is the expected safety pattern.
### Fix Focus Areas
- src/lib/common/embedding/EmbeddingPage.svelte[19-47]
- src/routes/VerticalLayout/Sidebar.svelte[69-73]
### Suggested change
- Import `browser` from `$app/environment` and early-return when not in the browser (or wrap the DOM access in `if (!browser) return;`).
- Alternative: move this logic into `onMount` and keep an effect only for toggling once mounted.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
No description provided.