fix(igx-templates): fix side-nav layout stacking and scrolling issues#1702
Open
ivanvpetrov wants to merge 2 commits into
Open
fix(igx-templates): fix side-nav layout stacking and scrolling issues#1702ivanvpetrov wants to merge 2 commits into
ivanvpetrov wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Angular side-nav and side-nav-auth app shell templates to ensure the generated layout renders the nav drawer and main content side-by-side and keeps the drawer stationary while only the routed content area scrolls.
Changes:
- Adds explicit flex row layout and overflow containment styles to the
side-navapp shell. - Adds a
.mainhook inside-navmarkup to correctly apply the new layout constraints. - Adds the missing
app.scssto theside-nav-authtemplate with matching layout/scroll rules.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/igx-templates/igx-ts/projects/side-nav/files/src/app/app.scss | Adds overflow containment + explicit flex-row wrapper and .main constraints for correct scrolling/layout. |
| packages/igx-templates/igx-ts/projects/side-nav/files/src/app/app.html | Adds class="main" to allow the new .main sizing/overflow rules to apply. |
| packages/igx-templates/igx-ts/projects/side-nav-auth/files/src/app/app.scss | Introduces the missing stylesheet and applies the same app shell layout/scroll rules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+9
| app-root { | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .outer-wrapper { | ||
| height: 100%; | ||
| overflow: hidden; | ||
| display: flex; | ||
| flex-direction: row; |
Comment on lines
+1
to
+10
| app-root { | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .outer-wrapper { | ||
| height: 100%; | ||
| overflow: hidden; | ||
| display: flex; | ||
| flex-direction: row; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1615
Description
Fixes the Angular
side-navandside-nav-authgenerated app shell layout where:Root Cause
The
.outer-wrappercontainer relied solely on theigxLayoutdirective fordisplay: flex, but had no explicitoverflow: hiddento constrain the flex container to its height. Becausehtml/bodyalready haveheight: 100%butoverflow: visible, page-level scrolling was triggered for tall content — causing the nav drawer to scroll away with the page instead of staying fixed.Additionally,
side-nav-authwas missing itsapp.scssfile entirely, even thoughapp.tsreferenced it viastyleUrl: './app.scss'.Changes
side-nav/files/src/app/app.scss: Addeddisplay: flex; flex-direction: rowto.outer-wrapper, addedoverflow: hiddentoapp-root,.outer-wrapper, and.main, and added.mainrule withflex: 1; min-width: 0; min-height: 0side-nav/files/src/app/app.html: Addedclass="main"to the inner content<div>so it can be targeted by the.mainCSS ruleside-nav-auth/files/src/app/app.scss: Created the missing stylesheet with the same layout rules (theside-nav-authtemplate already hadclass="main"on the inner div)Result
The nav drawer and navbar are now stationary. Only the routed page content area scrolls via
overflow: autoon.content.Preview before fix
Screen.Recording.2026-05-21.100741.mp4
Preview after fix
Screen.Recording.2026-05-21.100853.mp4