Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1db0a71
feat(igx-templates): add side-nav-mini project template with collapsi…
ivanvpetrov Jun 2, 2026
d3019de
fix(cli:templates): align angular side-nav template layout
georgianastasov Jun 3, 2026
0cc556b
fix(cli:templates): align web components side-nav template layout
georgianastasov Jun 3, 2026
b5d44a4
fix(cli:templates): align react side-nav template layout
georgianastasov Jun 3, 2026
074c4cf
fix(templates): add navigation role to resources container
georgianastasov Jun 3, 2026
fba1438
Potential fix for pull request finding
georgianastasov Jun 3, 2026
0576410
Potential fix for pull request finding
georgianastasov Jun 3, 2026
65604f2
Potential fix for pull request finding
georgianastasov Jun 3, 2026
fb5da8a
Potential fix for pull request finding
georgianastasov Jun 3, 2026
278ac98
feat(templates): add side-nav-mini template (collapsible mini navigat…
ivanvpetrov Jun 3, 2026
4943879
Merge branch 'master' into ipetrov/new-mini-side-nav-template
ivanvpetrov Jun 3, 2026
a03548c
fix(cli:templates): align side-nav resources layout responsiveness
georgianastasov Jun 3, 2026
44e8a8a
Merge branch 'ganastasov/align-side-nav-templates' of https://github.…
georgianastasov Jun 3, 2026
1ce3b97
Merge branch 'ganastasov/align-side-nav-templates' into ipetrov/new-m…
ivanvpetrov Jun 3, 2026
03fa783
feat(templates): side-nav-mini template for React and WC now match th…
ivanvpetrov Jun 3, 2026
84ec5aa
Potential fix for pull request finding
kdinev Jun 3, 2026
cc43e19
Potential fix for pull request finding
kdinev Jun 3, 2026
ca6feb7
feat(templates): fix side-nav-mini animation
ivanvpetrov Jun 3, 2026
59c0b96
fix(cli:templates): update icons
georgianastasov Jun 3, 2026
097829c
feat(templates): fix side-nav-mini icon size
ivanvpetrov Jun 3, 2026
87430f4
Merge branch 'ganastasov/align-side-nav-templates' into ipetrov/new-m…
ivanvpetrov Jun 3, 2026
ad6ec27
feat(templates): fix some code according to base PR
ivanvpetrov Jun 3, 2026
ecc02bb
Potential fix for pull request finding
ivanvpetrov Jun 3, 2026
16a0d35
Potential fix for pull request finding
ivanvpetrov Jun 4, 2026
c3909d0
Potential fix for pull request finding
ivanvpetrov Jun 4, 2026
fec5e04
Merge branch 'master' into ipetrov/new-mini-side-nav-template
kdinev Jun 4, 2026
fcb3ddd
fix(templates): css variables redundancy fixed
ivanvpetrov Jun 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Home from './home/home';

export const routes = [
{ path: '/', element: <Home />, text: 'Home', icon: 'home' }
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
.app {
display: flex;
flex-flow: column nowrap;
height: 100%;
overflow: hidden;
}

.app__navbar {
display: flex;
align-items: center;
flex: 0 0 auto;
height: 56px;
padding: 0 16px;
background: #239ef0;
box-shadow: 0 2px 4px rgba(0, 0, 0, .24);
box-sizing: border-box;
}

.app__menu-button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
padding: 0;
color: #000;
border: 0;
background: transparent;
cursor: pointer;
font-size: 24px;
}

.app__title {
margin: 0 0 0 16px;
color: #000;
font-size: 1.25rem;
font-weight: 600;
line-height: 1;
}

.app__body {
display: flex;
flex: 1 1 auto;
min-height: 0;
}

.app__drawer {
flex: 0 0 auto;
height: 100%;
--menu-full-width: 280px;
}

igc-nav-drawer-item[active]::part(base) {
background: #e0f2ff;
color: #0075d2;
}

igc-nav-drawer-item[active] igc-icon {
color: #0075d2;
}
Comment thread
ivanvpetrov marked this conversation as resolved.

.app--mini .app__drawer {
--menu-full-width: 68px;
}
Comment thread
ivanvpetrov marked this conversation as resolved.

igc-nav-drawer.app__drawer::part(base) {
transition: width 0.3s ease-out;
overflow: hidden;
}

.app--mini igc-nav-drawer-item::part(base) {
justify-content: center;
width: 40px;
min-height: 40px;
padding: 0;
margin: 4px auto;
border-radius: 8px;
}

.app--mini igc-nav-drawer-item::part(content) {
display: none;
}

.app__content {
flex: 1 1 auto;
min-width: 0;
overflow: auto;
display: flex;
justify-content: center;
align-items: flex-start;
}

@media (max-width: 1024px) {
.app__menu-button {
display: none;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { beforeAll, expect, test } from 'vitest';
import { render } from '@testing-library/react';
import { MemoryRouter } from 'react-router-dom';
import App from './app';
import 'element-internals-polyfill';
import { setupTestMocks } from '../setupTests';

beforeAll(() => {
setupTestMocks();
});

test('renders without crashing', () => {
const wrapper = render(
<MemoryRouter>
<App />
</MemoryRouter>
);

expect(wrapper).toBeTruthy();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { useState, useEffect } from 'react';
import { Outlet, useNavigate, useLocation } from 'react-router-dom';
import {
IgrNavDrawer,
IgrNavDrawerItem,
IgrIcon,
registerIcon,
} from 'igniteui-react';
import { routes } from './app-routes';
import 'igniteui-webcomponents/themes/light/bootstrap.css';
import './app.css';

const materialIcons = [
['home', 'action/svg/production/ic_home_24px.svg'],
['menu', 'navigation/svg/production/ic_menu_24px.svg'],
['apps', 'navigation/svg/production/ic_apps_24px.svg'],
['code', 'action/svg/production/ic_code_24px.svg'],
['build', 'action/svg/production/ic_build_24px.svg'],
['palette', 'image/svg/production/ic_palette_24px.svg'],
] as const;

materialIcons.forEach(([name, path]) =>
registerIcon(name, `https://unpkg.com/material-design-icons@3.0.1/${path}`, 'material')
);

const navRoutes = routes.filter((r) => r.text);

export default function App() {
const [drawerOpen, setDrawerOpen] = useState(true);
const navigate = useNavigate();
const location = useLocation();

useEffect(() => {
const mq = window.matchMedia('(min-width: 1025px)');
const update = () => setDrawerOpen(mq.matches);
update();
mq.addEventListener('change', update);
return () => mq.removeEventListener('change', update);
}, []);

return (
<div className="app">
<header className="app__navbar">
<button
className="app__menu-button"
type="button"
aria-label="Toggle navigation"
onClick={() => setDrawerOpen(o => !o)}
>
<IgrIcon name="menu" collection="material" />
</button>
<h1 className="app__title">$(name)</h1>
</header>
<div className={!drawerOpen ? 'app__body app--mini' : 'app__body'}>
<IgrNavDrawer className="app__drawer" open position="relative">
{navRoutes.map((route) => (
<IgrNavDrawerItem
key={route.path}
active={location.pathname === route.path}
onClick={() => navigate(route.path)}
>
<IgrIcon
slot="icon"
name={route.icon || 'apps'}
collection="material"
style={location.pathname === route.path ? { color: '#0075D2' } : undefined}
/>
<span slot="content">{route.text}</span>
</IgrNavDrawerItem>
))}
</IgrNavDrawer>
<div className="app__content">
<Outlet />
</div>
</div>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import logo from "/logo.svg";
import { IgrIcon } from "igniteui-react";
import styles from "./style.module.css";

export default function App() {
return (
<main className={styles.home}>
<div className={styles.intro}>
<h1 className={styles.header}>Welcome to Ignite UI for React!</h1>
<p className={styles.description}>
A routed application shell with a responsive side navigation drawer and curated Ignite UI resources.
</p>
</div>

<img src={logo} className={styles.logo} alt="Ignite UI for React" />

<div className={styles.resources} role="navigation" aria-label="Ignite UI resources">
<a
className={styles.resource}
target="_blank"
rel="noopener noreferrer"
href="https://www.infragistics.com/products/ignite-ui-react"
>
<IgrIcon className={styles.resourceIcon} name="apps" collection="material" />
<span>
<strong>Component Demos</strong>
<small>Browse React components and examples</small>
</span>
</a>
<a
className={styles.resource}
target="_blank"
rel="noopener noreferrer"
href="https://github.com/IgniteUI/igniteui-react"
>
<IgrIcon className={styles.resourceIcon} name="code" collection="material" />
<span>
<strong>React Repository</strong>
<small>Explore Ignite UI for React on GitHub</small>
</span>
</a>
<a
className={styles.resource}
target="_blank"
rel="noopener noreferrer"
href="https://github.com/IgniteUI/igniteui-cli"
>
<IgrIcon className={styles.resourceIcon} name="build" collection="material" />
<span>
<strong>Ignite UI CLI</strong>
<small>Review the CLI source and project tooling</small>
</span>
</a>
<a
className={styles.resource}
target="_blank"
rel="noopener noreferrer"
href="https://www.figma.com/@infragistics"
>
<IgrIcon className={styles.resourceIcon} name="palette" collection="material" />
<span>
<strong>Figma UI Kit</strong>
<small>Open Infragistics design resources</small>
</span>
</a>
</div>
</main>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
:local(.home) {
width: 100%;
max-width: 920px;
margin: auto;
padding: 48px 24px;
box-sizing: border-box;
font-family: "Titillium Web", "Segoe UI", Arial, sans-serif;
}

:local(.intro) {
max-width: 720px;
margin: 0 auto 24px;
text-align: center;
}

:local(.header) {
margin: 0 0 12px;
color: #09f;
font-size: 3rem;
font-weight: 600;
line-height: 1.2;
}

:local(.description) {
margin: 0;
color: #000;
font-size: 1.125rem;
line-height: 1.5;
}

:local(.logo) {
display: block;
width: 500px;
height: 350px;
margin: 0 auto 28px;
max-width: 100%;
object-fit: contain;
}

:local(.resources) {
display: grid;
grid-template-columns: repeat(2, 300px);
justify-content: center;
margin: 0 auto;
gap: 4px 64px;
}

:local(.resource) {
display: flex;
align-items: center;
min-height: 64px;
padding: 6px 0;
color: rgba(0, 0, 0, .74);
text-align: left;
text-decoration: none;
}

:local(.resource):hover strong {
text-decoration: underline;
}

:local(.resourceIcon) {
flex: 0 0 28px;
margin-right: 16px;
color: #09f;
font-size: 28px;
}

:local(.resource) strong,
:local(.resource) small {
display: block;
}

:local(.resource) strong {
margin-bottom: 2px;
color: #731963;
font-size: 1rem;
}

:local(.resource) small {
color: #000;
font-size: 0.875rem;
line-height: 1.4;
}

@media (max-width: 768px) {
:local(.home) {
padding: 32px 16px;
}

:local(.header) {
font-size: 2.25rem;
}

:local(.logo) {
width: 100%;
height: 240px;
}

:local(.resources) {
grid-template-columns: minmax(0, 300px);
justify-content: center;
gap: 4px;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ProjectTemplate } from "@igniteui/cli-core";
import * as path from "path";
import { BaseWithHomeIgrTsProject } from "../_base_with_home";

export class SideNavMiniIgrTsProject extends BaseWithHomeIgrTsProject implements ProjectTemplate {
public id: string = "side-nav-mini";
public name = "Side navigation + collapsible mini nav";
public description = "Side navigation with a collapsible mini (icons-only) variant and responsive breakpoints";
public dependencies: string[] = [];
public framework: string = "react";
public projectType: string = "igr-ts";
public hasExtraConfiguration: boolean = false;
public isHidden: boolean = false;

public get templatePaths(): string[] {
return [...super.templatePaths, path.join(__dirname, "files")];
}
}
export default new SideNavMiniIgrTsProject();
Loading