Skip to content

Prevent Rendering of unused MudPopover and MudOverlay#10853

Merged
henon merged 7 commits intoMudBlazor:devfrom
versile2:lag/popovers
Mar 9, 2025
Merged

Prevent Rendering of unused MudPopover and MudOverlay#10853
henon merged 7 commits intoMudBlazor:devfrom
versile2:lag/popovers

Conversation

@versile2
Copy link
Contributor

@versile2 versile2 commented Feb 11, 2025

Description

This PR puts if statements around rendering of certain MudPopover items; Tooltip, MudMenu, and ColumnOptions to improve performance.

Resolved #10815
Resolves #10689

How Has This Been Tested?

Visually tested each component in Viewer and Docs
Unit Tests updated

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)

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 the bug Unexpected behavior or functionality not working as intended label Feb 11, 2025
@codecov
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.89%. Comparing base (13a7f64) to head (fc5fab9).
Report is 22 commits behind head on dev.

Files with missing lines Patch % Lines
src/MudBlazor/Components/Menu/MudMenu.razor 0.00% 0 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (83.33%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10853      +/-   ##
==========================================
- Coverage   91.91%   91.89%   -0.02%     
==========================================
  Files         427      427              
  Lines       13570    13580      +10     
  Branches     2599     2604       +5     
==========================================
+ Hits        12473    12480       +7     
- Misses        524      525       +1     
- Partials      573      575       +2     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@versile2 versile2 marked this pull request as ready for review February 11, 2025 16:50
@versile2 versile2 requested a review from ScarletKuro February 11, 2025 16:50
@w3ori
Copy link
Contributor

w3ori commented Feb 18, 2025

@versile2 Can I help somehow to fix the formatting?

@versile2
Copy link
Contributor Author

@versile2 Can I help somehow to fix the formatting?

no sorry missed this one, fixing now.

@versile2
Copy link
Contributor Author

pretty sure I got them all even bad formatting that I didn't change at least in those files! Let me know if I missed something.

@w3ori
Copy link
Contributor

w3ori commented Feb 20, 2025

@ScarletKuro Could you please check this PR if you have time? We are really waiting for this enhancement and hopefully it will be released in v8.3.0 .

@sonarqubecloud
Copy link

@w3ori
Copy link
Contributor

w3ori commented Feb 27, 2025

Does this PR need anything else?

@versile2
Copy link
Contributor Author

henon or dc have yet to take a look at it as they've both been swamped. Assuming it passes muster it will definitely be in 8.4 just have to let them get caught up.

Comment on lines +60 to +80
@if (PickerVariant == PickerVariant.Inline)
{
<MudPopover Class="@PopoverClassname" Open="@Open" Fixed="true" AnchorOrigin="@(AnchorOrigin)" TransformOrigin="@(TransformOrigin)" OverflowBehavior="@(OverflowBehavior)" RelativeWidth="@(RelativeWidth)" Paper="false">
<div @ref="_pickerInlineRef" class="@PickerInlineClassname">
<MudPaper @attributes="UserAttributes" Class="@PickerPaperClassname" Style="@PickerPaperStylename" Square="@_pickerSquare">
<div class="@PickerContainerClassname">
@if (PickerContent != null)
{
@PickerContent
}
</div>
@if (PickerActions != null)
{
@PickerContent
<div class="@ActionsClassname">
@PickerActions(this)
</div>
}
</div>
@if (PickerActions != null)
{
<div class="@ActionsClassname">
@PickerActions(this)
</div>
}
</MudPaper>
</div>
</MudPopover>
}
</MudPaper>
</div>
</MudPopover>
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the indentation correct here? It looks like there are too many spaces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't find any problems with it.

image

Copy link
Contributor

@henon henon left a comment

Choose a reason for hiding this comment

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

Make sure the razor indentation is correct. It can be merged then.

@versile2 versile2 requested a review from henon March 6, 2025 04:06
@henon henon merged commit 9a3e94c into MudBlazor:dev Mar 9, 2025
5 of 6 checks passed
@henon
Copy link
Contributor

henon commented Mar 9, 2025

Thanks @versile2

@versile2 versile2 deleted the lag/popovers branch March 10, 2025 13:43
@versile2 versile2 mentioned this pull request Mar 18, 2025
7 tasks
@versile2 versile2 mentioned this pull request Apr 8, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MudDataGrid | Scrolling is laggy with MudTooltip Slow performance using groups with MudTable

4 participants