Skip to content

remove footer for embbeding page#437

Merged
iceljc merged 1 commit intoSciSharp:mainfrom
iceljc:legacy/svelte-4.x
Mar 31, 2026
Merged

remove footer for embbeding page#437
iceljc merged 1 commit intoSciSharp:mainfrom
iceljc:legacy/svelte-4.x

Conversation

@iceljc
Copy link
Copy Markdown
Collaborator

@iceljc iceljc commented Mar 31, 2026

No description provided.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Hide footer and adjust layout for embedding page

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Hide footer on embedding page using CSS display none
• Adjust embedding container height calculation to account for hidden footer
• Remove Breadcrumb component from embedded agent page
• Simplify page layout for embedding context
Diagram
flowchart LR
  A["Embedding Page Component"] -->|"Add CSS to hide footer"| B["Footer Hidden"]
  A -->|"Remove Breadcrumb"| C["Simplified Layout"]
  D["SCSS Calculations"] -->|"Reduce footer height factor"| E["Adjusted Container Height"]
Loading

Grey Divider

File Changes

1. src/routes/page/agent/[embed]/[embedType]/+page.svelte ✨ Enhancement +6/-2

Hide footer and remove breadcrumb from page

• Removed Breadcrumb component import and usage
• Added <svelte:head> block with CSS rule to hide footer with display: none !important
• Kept HeadTitle and EmbeddingPage components intact

src/routes/page/agent/[embed]/[embedType]/+page.svelte


2. src/lib/scss/custom/pages/_agent.scss ✨ Enhancement +1/-1

Reduce footer height in embedding container

• Modified .embedding-container height calculation to use 0.2 * #{$footer-height} instead of
 full #{$footer-height}
• Adjusted height computation to account for reduced footer space in embedding context

src/lib/scss/custom/pages/_agent.scss


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Mar 31, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Embed height ignores footer 🐞 Bug ≡ Correctness
Description
.embedding-container now subtracts only 0.2 * $footer-height, but /page routes still render
the absolute-positioned 60px footer, so embedding pages that keep the footer (e.g. Knowledge Base
embed) will have embedded content covered by the footer. This can hide/cut off the bottom of the
embedded iframe/component and block interaction with its UI.
Code

src/lib/scss/custom/pages/_agent.scss[437]

+    height: calc(100vh - #{$header-height} - #{$grid-gutter-width} - 0.2 * #{$footer-height});
Evidence
The height change is global for .embedding-container and the class is used by the shared
EmbeddingPage component across multiple routes. The main /page layout always uses
VerticalLayout, which always renders <Footer /> (class footer) and the footer height is
defined as 60px and absolutely positioned at the bottom; therefore, reducing the amount subtracted
from 100vh causes the embed area to extend into the footer’s overlay region on routes that do not
hide the footer.

src/lib/scss/custom/pages/_agent.scss[435-442]
src/lib/common/embedding/EmbeddingPage.svelte[94-98]
src/routes/page/+layout.svelte[7-16]
src/routes/VerticalLayout/Index.svelte[48-67]
src/routes/VerticalLayout/Footer.svelte[8-21]
src/lib/scss/_variables.scss[38-41]
src/lib/scss/custom/structure/_footer.scss[5-18]
src/routes/page/knowledge-base/[embed]/[embedType]/+page.svelte[1-20]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The global `.embedding-container` height change makes the embedded content area extend into the footer region on embedding routes that still render the footer.

## Issue Context
`EmbeddingPage` is reused by multiple embedding routes, but only the *agent* embed route hides the footer via a page-local `<svelte:head>` override. Other embedding routes (e.g. Knowledge Base embed) still render the footer.

## Fix Focus Areas
- src/lib/scss/custom/pages/_agent.scss[435-442]
- src/routes/VerticalLayout/Index.svelte[48-67]
- src/routes/page/knowledge-base/[embed]/[embedType]/+page.svelte[1-20]

## Suggested fix approach
1) Pick one consistent behavior for *all* embedding routes:
  - **Option A (recommended):** Conditionally *do not render* `<Footer />` when `isEmbeddingPage` (based on `$page.params.embed` and `$page.params.embedType`), then set `.embedding-container` height to not subtract footer height.
  - **Option B:** Keep rendering the footer on non-agent embed pages; revert `.embedding-container` height to subtract the full `$footer-height` and only override the height on routes where the footer is actually removed.
2) Ensure the final embed container height does not result in any footer overlap on routes where the footer remains visible.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Footer hidden via global CSS 🐞 Bug ⚙ Maintainability
Description
The agent embed route hides the footer by injecting a global .footer { display: none !important; }
into <svelte:head> while the layout still renders <Footer/>. This is fragile (coupled to a class
name + !important) and will be easy to break during footer/layout refactors.
Code

src/routes/page/agent/[embed]/[embedType]/+page.svelte[R12-16]

+<svelte:head>
+    <style>
+        .footer { display: none !important; }
+    </style>
+</svelte:head>
Evidence
/page routes always use VerticalLayout, which always renders <Footer /> (with
class="footer"). The PR workaround relies on a global selector to suppress that footer for the
agent embed route, rather than controlling footer rendering at the layout level.

src/routes/page/agent/[embed]/[embedType]/+page.svelte[12-16]
src/routes/page/+layout.svelte[7-16]
src/routes/VerticalLayout/Index.svelte[48-67]
src/routes/VerticalLayout/Footer.svelte[8-21]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The agent embed route hides the footer via global CSS injected into `<svelte:head>`, instead of preventing the footer from rendering.

## Issue Context
`VerticalLayout/Index.svelte` always renders `<Footer />`. The agent embed page works around this by adding `.footer { display:none !important; }`.

## Fix Focus Areas
- src/routes/VerticalLayout/Index.svelte[48-67]
- src/routes/page/agent/[embed]/[embedType]/+page.svelte[12-16]
- src/routes/VerticalLayout/Footer.svelte[8-21]

## Suggested fix approach
1) In `VerticalLayout/Index.svelte` (or `src/routes/page/+layout.svelte`), detect embedding routes using `$page.params.embed` and `$page.params.embedType`.
2) Render `<Footer />` only when *not* embedding.
3) Remove the route-local `<svelte:head>` style override from the agent embed page once the layout correctly omits the footer.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@iceljc iceljc merged commit dac8d57 into SciSharp:main Mar 31, 2026
1 of 2 checks passed
.embedding-container {
padding: 0px;
height: calc(100vh - #{$header-height} - #{$grid-gutter-width} - #{$footer-height});
height: calc(100vh - #{$header-height} - #{$grid-gutter-width} - 0.2 * #{$footer-height});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Embed height ignores footer 🐞 Bug ≡ Correctness

.embedding-container now subtracts only 0.2 * $footer-height, but /page routes still render
the absolute-positioned 60px footer, so embedding pages that keep the footer (e.g. Knowledge Base
embed) will have embedded content covered by the footer. This can hide/cut off the bottom of the
embedded iframe/component and block interaction with its UI.
Agent Prompt
## Issue description
The global `.embedding-container` height change makes the embedded content area extend into the footer region on embedding routes that still render the footer.

## Issue Context
`EmbeddingPage` is reused by multiple embedding routes, but only the *agent* embed route hides the footer via a page-local `<svelte:head>` override. Other embedding routes (e.g. Knowledge Base embed) still render the footer.

## Fix Focus Areas
- src/lib/scss/custom/pages/_agent.scss[435-442]
- src/routes/VerticalLayout/Index.svelte[48-67]
- src/routes/page/knowledge-base/[embed]/[embedType]/+page.svelte[1-20]

## Suggested fix approach
1) Pick one consistent behavior for *all* embedding routes:
   - **Option A (recommended):** Conditionally *do not render* `<Footer />` when `isEmbeddingPage` (based on `$page.params.embed` and `$page.params.embedType`), then set `.embedding-container` height to not subtract footer height.
   - **Option B:** Keep rendering the footer on non-agent embed pages; revert `.embedding-container` height to subtract the full `$footer-height` and only override the height on routes where the footer is actually removed.
2) Ensure the final embed container height does not result in any footer overlap on routes where the footer remains visible.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant