MudBlazor icon indicating copy to clipboard operation
MudBlazor copied to clipboard

MudBaseInput: Add `protected InternalInputId` (#9277)

Open igotinfected opened this issue 1 year ago • 2 comments

Description

Resolves #9277.

Make InputIdState private and add a protected InternalInputId value to be used in inheritors (as well as custom user components).

How Has This Been Tested?

Existing unit tests.

Type of Changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] 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

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

igotinfected avatar Jun 29 '24 17:06 igotinfected

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.83%. Comparing base (28bc599) to head (8f82532). Report is 310 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #9278      +/-   ##
==========================================
+ Coverage   89.82%   90.83%   +1.00%     
==========================================
  Files         412      403       -9     
  Lines       11878    12566     +688     
  Branches     2364     2441      +77     
==========================================
+ Hits        10670    11414     +744     
+ Misses        681      602      -79     
- Partials      527      550      +23     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 29 '24 17:06 codecov[bot]

@henon adding you in case you want to change the variable name.

ScarletKuro avatar Jun 29 '24 18:06 ScarletKuro

Why not just InputId? The Internal part seems superficial. Or maybe InputElementId

henon avatar Jul 01 '24 07:07 henon

Why not just InputId?

Taken https://github.com/MudBlazor/MudBlazor/blob/988f96b7272d9c1833b1c35d9a9433bc7c4fb4cb/src/MudBlazor/Base/MudBaseInput.cs#L421-L423

ScarletKuro avatar Jul 01 '24 09:07 ScarletKuro

Went with InputElementId and added comments for clarity, lmk what you think!

igotinfected avatar Jul 01 '24 12:07 igotinfected