Skip to content

MudRating: Added optional parameters for Full and Empty Icon Color#5463

Merged
henon merged 4 commits intoMudBlazor:devfrom
nejckikelj:feature/MudRating-different-color-for-full-empty-icons
May 18, 2024
Merged

MudRating: Added optional parameters for Full and Empty Icon Color#5463
henon merged 4 commits intoMudBlazor:devfrom
nejckikelj:feature/MudRating-different-color-for-full-empty-icons

Conversation

@nejckikelj
Copy link
Contributor

@nejckikelj nejckikelj commented Oct 10, 2022

Added optional parameters for Full and Empty Icon Color. If not specified, behavior remains the same, otherwise it changes the color of the item based on full/empty.

Description

Added option to select Full and Empty Icon Color, since it couldn't be done simply.

How Has This Been Tested?

visually, using automated tests.

Types 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)

Checklist:

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

Added optional parameters for Full and Empty Icon Color. If not specified, behavior remains the same, otherwise it changes the color of the item based on full/empty.
@nejckikelj nejckikelj force-pushed the feature/MudRating-different-color-for-full-empty-icons branch from 604f5c8 to 366c9ef Compare October 10, 2022 11:27
@just-the-benno
Copy link
Contributor

Hi @nejckikelj, and thanks for your PR.

Before looking closely into your code changes, it would be great if you could add some unit tests for these new parameters. A new example in the docs would be appreciated as well.

@just-the-benno just-the-benno added needs: tests A maintainer has explicitly asked for associated test cases to be added to this pull request API change Modifies the public API surface needs: example A usage example is absent (reproduction link or code snippet) - logic is described but not shown labels Oct 13, 2022
@nejckikelj
Copy link
Contributor Author

Hi @just-the-benno, thanks for the comment. Unit tests and docs example added.

@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.49%. Comparing base (28bc599) to head (a89e42c).
Report is 206 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #5463      +/-   ##
==========================================
+ Coverage   89.82%   90.49%   +0.66%     
==========================================
  Files         412      396      -16     
  Lines       11878    12140     +262     
  Branches     2364     2369       +5     
==========================================
+ Hits        10670    10986     +316     
+ Misses        681      621      -60     
- Partials      527      533       +6     

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

Added another test to cover all scenarios
@nejckikelj nejckikelj force-pushed the feature/MudRating-different-color-for-full-empty-icons branch from 9e1340d to c29ac0f Compare October 14, 2022 06:46
@mikes-gh mikes-gh added enhancement Adds a new feature or enhances existing functionality (not fixing a defect) in the main library and removed needs: example A usage example is absent (reproduction link or code snippet) - logic is described but not shown needs: tests A maintainer has explicitly asked for associated test cases to be added to this pull request labels Nov 29, 2022
@nejckikelj
Copy link
Contributor Author

Just checking on this PR ? :)

@ScarletKuro
Copy link
Member

Hello,

Thank you for the PR. My apologies for the delay in response.

I need to consult with a team member to decide whether we should close this PR or revive it and merge.

@henon, do you think I should revive this PR by resolving conflicts? This PR makes sense. Ideally, having a RenderFragment would provide more flexibility, but with rating, it's a bit more complex as it requires context data such as read-only, hover states, selection, and potentially more which sounds more like a component rework and cba to do that. So either this or nothing.

@ScarletKuro ScarletKuro self-assigned this May 6, 2024
@henon
Copy link
Contributor

henon commented May 7, 2024

Yes, this makes sense.

@henon henon closed this May 7, 2024
@henon henon reopened this May 7, 2024
@henon
Copy link
Contributor

henon commented May 7, 2024

Sorry, misclicked ;)

@ScarletKuro ScarletKuro requested a review from henon May 16, 2024 22:56
@ScarletKuro
Copy link
Member

@henon this is ready for review.
Fixed the tests to use FluentAssertion & nits and little fix for the SelectIconColor to get SelectedValue from the GetState.

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

Labels

API change Modifies the public API surface 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.

5 participants