Skip to content

fix(nav-drawer, blazor): fixing the IgbNavDrawer icon usage doc#458

Open
kdinev wants to merge 1 commit into
vnextfrom
nav-drawer-icon-usage
Open

fix(nav-drawer, blazor): fixing the IgbNavDrawer icon usage doc#458
kdinev wants to merge 1 commit into
vnextfrom
nav-drawer-icon-usage

Conversation

@kdinev

@kdinev kdinev commented Jul 22, 2026

Copy link
Copy Markdown
Member

Closes #

Checklist:

  • check topic's TOC/menu and paragraph headings
  • Include TOC topic labels in the topic content when it has a valuable update, is new, or is considered preview / beta
  • link to other topics using ./page.mdx or ../relative/path.mdx (.mdx extension required)
  • at the References section at the end of the topic add links to topics, samples, etc
  • reference API documentation instead of adding a section with API

  • use valid component names - [Data] Grid, IgxSelectComponent, <igx-combo>
  • use spell checker tool (VS Code, Grammarly, Microsoft Editor)
  • add inline code blocks for the names of classes / tags / properties
  • add language descriptor for the code blocks
  • check if links function by running the check-api/mdx npm commands
  • check if sample is working and fully visible in the topic
  • check if sample is working and fully visible in the StackBlitz
  • check if code blocks match the code in StackBlitz demo
  • add or update meaningful llms.description metadata and run npm run check:llms-metadata


  • do not resolve requested changes (leave that to the reviewer)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the Blazor documentation for IgbNavDrawer to properly include the required module registrations and to document/illustrate how IgbIcon icons from the material collection should be registered before use.

Changes:

  • Expanded the Blazor AddIgniteUIBlazor(...) registration snippet to include IgbNavDrawerItemModule and IgbIconModule.
  • Added guidance and sample code showing IgbIcon.RegisterIcon(...) usage for the material icon collection across the topic’s Blazor examples.
  • Adjusted Blazor icon usage in examples to use a single @ref icon element for registration and simplified other icon instances.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +334 to +338
private IgbIcon IconRef { get; set; }

protected override void OnAfterRender(bool firstRender)
{
base.OnAfterRender(firstRender);
Comment on lines +76 to +78
typeof(IgbNavDrawerHeaderItemModule),
typeof(IgbNavDrawerItemModule),
typeof(IgbIconModule)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The IgbNavDrawerModule should have the item and header included already IIRC;
So only that and the icon should be quite enough:

Suggested change
typeof(IgbNavDrawerHeaderItemModule),
typeof(IgbNavDrawerItemModule),
typeof(IgbIconModule)
typeof(IgbIconModule),


<PlatformBlock for="Blazor">

The icons used throughout the examples in this topic come from the `material` collection and have to be registered before the <ApiLink pkg="core" type="Icon" /> component can render them. Registering an icon requires a reference to a single <ApiLink pkg="core" type="Icon" /> element on the page, on which the <ApiLink pkg="core" type="Icon" member="registerIcon" label="RegisterIcon" /> method is called. For more details, see the [Icon](../layouts/icon.mdx) topic.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Pretty sure the core is either not relevant for Blazor and/or can become an issue once we start breaking down those packages with Lite in the mix.
I'd also restrain from repeating the methodology and just go with "need to be registered, see topic". Again, due to the mechanism being a byproduct of generation, less than ideal and subject to change for the better :)
//2c


```razor
<IgbNavDrawer @ref="@NavDrawerRef" Open="true" style="position: relative">
<IgbNavDrawer Open="true" style="position: relative">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(0.o)
Unrelated, but like.. the position style has no business on this component

Suggested change
<IgbNavDrawer Open="true" style="position: relative">
<IgbNavDrawer Open="true">

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants