Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MudDataGrid: Apply Footer/Header Style Funcs #8853

Merged
merged 4 commits into from May 13, 2024

Conversation

kev-andrews
Copy link
Contributor

Add implementations to apply FooterStyleFunc, FooterClassFunc, HeaderStyleFunc and HeaderClassFunc

Description

Added code that actually applies the functions to the Css/Stylebuilders.
Changed func signature to accept IEnumerable as Func<T, string> makes no sense as the Header/Footer cant be styled based on just one cell as the CellStyleFuncs allow.

fixes #8852

How Has This Been Tested?

none - sorry :(
I can add them if required

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 bug Something does not work as intended/expected PR: needs review labels May 2, 2024
Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.43%. Comparing base (28bc599) to head (18b0e9a).
Report is 190 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8853      +/-   ##
==========================================
+ Coverage   89.82%   90.43%   +0.60%     
==========================================
  Files         412      419       +7     
  Lines       11878    12201     +323     
  Branches     2364     2381      +17     
==========================================
+ Hits        10670    11034     +364     
+ Misses        681      630      -51     
- Partials      527      537      +10     

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

@ScarletKuro ScarletKuro requested a review from tjscience May 2, 2024 19:51
Copy link
Contributor

@tjscience tjscience left a comment

Choose a reason for hiding this comment

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

It surpsises me that the original [Header/Footer][Class/Style]Funcs were never hooked up. I don't know if that was missed, or if it was overwritten by some other PR. This looks good and thanks for catching it, @kev-andrews!

@tjscience
Copy link
Contributor

@kev-andrews, I just saw that you did not write any tests. It is required to unit test changes like this. Can you add a quick set of tests that just check that the classes/styles which are supposed to be applied by the given funcs are, in fact, applied?

@ScarletKuro
Copy link
Member

Hi
@kev-andrews can you write tests? Then I can merge it.

@kev-andrews
Copy link
Contributor Author

I will write some tests over the weekend, thanks

@ScarletKuro
Copy link
Member

Any update on this? I'd like to merge it for the preview.3

@ScarletKuro ScarletKuro merged commit e3df1b0 into MudBlazor:dev May 13, 2024
4 checks passed
@ScarletKuro
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MudDataGrid HeaderStyleFunc is not Implemented
3 participants