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

Various Components: Rename DisableElevation to DropShadow #8592

Merged
merged 4 commits into from
Apr 12, 2024

Conversation

henon
Copy link
Collaborator

@henon henon commented Apr 6, 2024

Description

We want to move from DisableSomething to just Something or EnableSomething depending on the property. This PR tackles only DisableElevation and renames it to DropShadow. Of course default value and all invocations have been inverted.

See #6131

How Has This Been Tested?

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.

@henon henon requested review from ScarletKuro and danielchalmers and removed request for ScarletKuro April 6, 2024 12:33
@henon henon added API change API that needs approval v7 New major MudBlazor version labels Apr 6, 2024
Copy link

codecov bot commented Apr 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.00%. Comparing base (28bc599) to head (4c66ab3).
Report is 31 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8592      +/-   ##
==========================================
+ Coverage   89.82%   90.00%   +0.17%     
==========================================
  Files         412      418       +6     
  Lines       11878    12029     +151     
  Branches     2364     2371       +7     
==========================================
+ Hits        10670    10827     +157     
+ Misses        681      667      -14     
- Partials      527      535       +8     

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

Copy link
Contributor

@danielchalmers danielchalmers left a comment

Choose a reason for hiding this comment

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

Great choice on the new name

@@ -206,7 +206,7 @@
</div>
</div>
<div class="d-flex align-end flex-grow-1 pa-4">
<MudButton Variant="Variant.Filled" Color="Color.Primary" FullWidth="true" DisableElevation="true">Pay now</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Primary" FullWidth="false" DropShadow="true">Pay now</MudButton>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did fullwidth change? Looks better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oopsie, good catch, I think I inverted the wrong property here

Comment on lines 1 to 13
@namespace MudBlazor.Docs.Examples

<MudButtonGroup Color="Color.Primary" Variant="Variant.Filled" DisableElevation="@_disableElevation">
<MudButtonGroup Color="Color.Primary" Variant="Variant.Filled" DropShadow="@_dropShadow">
<MudButton>One</MudButton>
<MudButton>Two</MudButton>
<MudButton>Three</MudButton>
</MudButtonGroup>

<MudSwitch @bind-Value="_disableElevation" Label="Disable elevation" Color="Color.Primary" />
<MudSwitch @bind-Value="_dropShadow" Label="Drop shadow" Color="Color.Primary" />

@code {
private bool _disableElevation = true;
private bool _dropShadow = true;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the goal of that doc is to show deviation from the default behavior, drop shadow should be false, right?

@danielchalmers
Copy link
Contributor

Are you going to keep the Elevation="0" name? I think it makes sense.

@henon
Copy link
Collaborator Author

henon commented Apr 6, 2024

Yes, Elevation makes sense with an int value. That is the main reason why I renamed DisableElevation to DropShadow.

@henon henon marked this pull request as draft April 6, 2024 19:47
@danielchalmers
Copy link
Contributor

would it make sense if the elevation property could enable/disable it without the need for an extra boolean property? honestly not super familiar with the elevation stuff

@henon
Copy link
Collaborator Author

henon commented Apr 6, 2024

I think it is rare that elevation can be controlled directly. Mostly you set the elevation in the theme and it applies to all equally. That's why this would not be easy to change.

@henon henon marked this pull request as ready for review April 12, 2024 12:32
@henon henon merged commit e1965cc into MudBlazor:dev Apr 12, 2024
4 checks passed
@henon henon mentioned this pull request Apr 12, 2024
biegehydra pushed a commit to biegehydra/MudBlazor that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change API that needs approval breaking change v7 New major MudBlazor version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants