Skip to content

MudNavGroup: Add TitleContent parameter#10160

Merged
henon merged 1 commit intoMudBlazor:devfrom
Ben0421:feature/mudnavmenu-titlecontent
Nov 2, 2024
Merged

MudNavGroup: Add TitleContent parameter#10160
henon merged 1 commit intoMudBlazor:devfrom
Ben0421:feature/mudnavmenu-titlecontent

Conversation

@Ben0421
Copy link
Copy Markdown
Contributor

@Ben0421 Ben0421 commented Nov 1, 2024

Description

A TitleContent render fragment was added in the component MudNavGroup. There was a way to add custom content to all the other Nav Menu's components except this one. The implementation is very similar to MudExpansionPanel's TitleContent where TitleContent takes precedence over Title.

How Has This Been Tested?

No test were added. An example has been added in the docs. It has only been tested visually since the change doesn't include any logic.

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Here the example added in the docs for this new feature:

LTR

image

RTL:

image

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions Bot added docs Changes to project docs site that do not affect core library logic enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library PR: needs review labels Nov 1, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.22%. Comparing base (44f0b71) to head (23f5440).
Report is 6 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #10160   +/-   ##
=======================================
  Coverage   91.22%   91.22%           
=======================================
  Files         411      411           
  Lines       12484    12485    +1     
  Branches     2434     2435    +1     
=======================================
+ Hits        11389    11390    +1     
  Misses        552      552           
  Partials      543      543           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 22 to 31
<div Class="mud-nav-link-text">
@Title
@if (TitleContent is not null)
{
@TitleContent
}
else
{
@Title
}
</div>
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.

You could make the argument it should have a different class but I think it's fine

@henon henon removed PR: needs review docs Changes to project docs site that do not affect core library logic labels Nov 2, 2024
@henon henon merged commit 842be50 into MudBlazor:dev Nov 2, 2024
@henon
Copy link
Copy Markdown
Contributor

henon commented Nov 2, 2024

Thanks @Ben0421

LLauter pushed a commit to cannellamedia/MudBlazor that referenced this pull request Dec 16, 2024
Co-authored-by: Benoit G. <bgagnon@renardsolutions.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants