Skip to content

Conversation

@henon
Copy link
Contributor

@henon henon commented Oct 5, 2024

Description

This PR removes ConfigureInstance() from MudDialogInstance to complete my refactoring towards only using getters instead of caching state in private and protected fields as a followup to #9906 where some fields were already eliminated.

The protected property BackgroundClass is now only used as a getter instead of using it as storage. I am not sure if this is even a breaking change as it is quite unlikely that someone would have derived from MudDialogInstance. But we'll not take any risks and merge it only with v8.

How Has This Been Tested?

No additional tests needed.

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.

@henon henon added hacktoberfest Hacktoberfest 2021 refactor Reorganizes code and has no changes to the API or functionality in the main library hacktoberfest2024 labels Oct 5, 2024
@github-actions github-actions bot added breaking change This change will require consumer code updates PR: needs review labels Oct 5, 2024
@henon henon added the v8 label Oct 5, 2024

private void ConfigureInstance()
{
Class = Classname;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Overwriting Class is not necessary for the dialog's functionality. Class is already set to _dialog.Class. The razor only uses Classname (consistently to other components) which contains _dialog.Class.

@codecov
Copy link

codecov bot commented Oct 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.80%. Comparing base (28bc599) to head (0009a63).
Report is 568 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #9909      +/-   ##
==========================================
+ Coverage   89.82%   90.80%   +0.97%     
==========================================
  Files         412      411       -1     
  Lines       11878    12844     +966     
  Branches     2364     2483     +119     
==========================================
+ Hits        10670    11663     +993     
+ Misses        681      618      -63     
- Partials      527      563      +36     

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

@henon henon requested a review from ScarletKuro October 5, 2024 13:32
@henon henon added hacktoberfest-accepted Issues and PRs which were accepted as Hacktoberfest submissions and removed PR: needs review labels Oct 5, 2024
@henon henon merged commit 149ac71 into MudBlazor:dev Oct 13, 2024
@henon henon deleted the DialogClassParamFix branch November 12, 2024 09:26
LLauter pushed a commit to cannellamedia/MudBlazor that referenced this pull request Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change This change will require consumer code updates hacktoberfest Hacktoberfest 2021 hacktoberfest2024 hacktoberfest-accepted Issues and PRs which were accepted as Hacktoberfest submissions refactor Reorganizes code and has no changes to the API or functionality in the main library

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants