Skip to content

MudExpansionPanels: Rename DisableBorders to Outlined#8593

Merged
henon merged 1 commit intoMudBlazor:devfrom
henon:expansion-panel-outlined
Apr 9, 2024
Merged

MudExpansionPanels: Rename DisableBorders to Outlined#8593
henon merged 1 commit intoMudBlazor:devfrom
henon:expansion-panel-outlined

Conversation

@henon
Copy link
Contributor

@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 DisableBorders and renames it to Outlined. 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 a review from ScarletKuro April 6, 2024 12:51
@github-actions github-actions bot added breaking change This change will require consumer code updates PR: needs review labels Apr 6, 2024
@henon henon requested a review from danielchalmers April 6, 2024 12:51
@henon
Copy link
Contributor Author

henon commented Apr 6, 2024

FYI @BieleckiLtd

@codecov
Copy link

codecov bot commented Apr 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.78%. Comparing base (d6a1268) to head (61cf6d0).
Report is 4 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8593      +/-   ##
==========================================
- Coverage   89.78%   89.78%   -0.01%     
==========================================
  Files         411      411              
  Lines       11821    11840      +19     
  Branches     2362     2363       +1     
==========================================
+ Hits        10613    10630      +17     
- Misses        681      682       +1     
- Partials      527      528       +1     

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

Copy link
Member

@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.

Outline or Border might be a better name like how it's UnderLine now. But is it an outline or a border?

Maybe replacing it with an Outline="Outline.Solid" or Border="Border.Solid" enum like CSS would make sense (or border if it's a border)

@henon
Copy link
Contributor Author

henon commented Apr 6, 2024

We already have Outlined in another component, that's why I chose it.

@henon
Copy link
Contributor Author

henon commented Apr 6, 2024

I didn't want Outline because that is an enum member which I don't want to confuse with this parameter. Border would work, but my gut says no, I can't really argument it though.

@danielchalmers
Copy link
Member

I didn't want Outline because that is an enum member which I don't want to confuse with this parameter. Border would work, but my gut says no, I can't really argument it though.

It's a border so it shouldn't be referred to as an outline:

&.mud-expand-panel-border {
border-bottom: 1px solid var(--mud-palette-lines-default);
}

Border works in the same way DropShadow does. I think both could be implicitly converted to enums or numbers in the future if desired.

@henon henon added API change Modifies the public API surface v7 labels Apr 6, 2024
@henon
Copy link
Contributor Author

henon commented Apr 6, 2024

The Outlined property of MudPaper and MudCard

.mud-paper-outlined {
  border: 1px solid var(--mud-palette-lines-default);
}

I think we should go with Outlined in ExpansionPanel as well for consistency

@danielchalmers
Copy link
Member

The Outlined property of MudPaper and MudCard

.mud-paper-outlined {
  border: 1px solid var(--mud-palette-lines-default);
}

I think we should go with Outlined in ExpansionPanel as well for consistency

There's a real difference between border and outline in CSS so this is all misleading

@henon
Copy link
Contributor Author

henon commented Apr 6, 2024

I get your point, and for you as a CSS pro it may make a big difference. But the user of the Card or ExpansionPanel doesn't care about such subtle CSS differences?

@danielchalmers
Copy link
Member

I get your point, and for you as a CSS pro it may make a big difference. But the user of the Card or ExpansionPanel doesn't care about such subtle CSS differences?

CSS pro is generous 😄

Realistically it'll be fine either way, but I feel like if you're already making breaking changes, why not be accurate? It's a subtle thing but is firmly named wrong now.

I think MUI uses borders and not outlines too

@henon
Copy link
Contributor Author

henon commented Apr 7, 2024

We are already renaming so much. I don't want to rename more than is necessary. Next we'd have to rename the Variant.Outline too for consistency and I really don't think that it is necessary to take that step.

image

@henon
Copy link
Contributor Author

henon commented Apr 8, 2024

@danielchalmers shall we do a team vote on discord or do you accept my arguments?

@danielchalmers
Copy link
Member

danielchalmers commented Apr 8, 2024

@danielchalmers shall we do a team vote on discord or do you accept my arguments?

I disagree on both counts. The name should be Border/Borders/Bordered for this because it appropriately uses a border, and Variant.Outline should be changed to use a CSS outline because It doesn't make sense that the outlined button is bigger IMO.

@henon
Copy link
Contributor Author

henon commented Apr 8, 2024

I don't want to simply dismiss @danielchalmers arguments just because I disagree. When we have a disagreement like this we usually resolve it by a simple majority vote in the team.

Choice 1) Rename MudExpansionPanels.DisableBorders to MudExpansionPanels.Outlined and don't touch Outlined in MudCard, MudPaper and in Variant.Outline.

Choice 2) Rename MudExpansionPanels.DisableBorders to MudExpansionPanels.Border and rename Outlined in MudCard, MudPaper and also in Variant.Outline to Border

@MudBlazor/contribution-team @MudBlazor/core-team Please post your opinions so we can resolve this deadlock.

@henon
Copy link
Contributor Author

henon commented Apr 8, 2024

Choice 3) Rename MudExpansionPanels.DisableBorders to MudExpansionPanels.Outlined and change MudExpansionPanels, MudCard, MudPaper and also Button with Variant.Outline to use CSS outline instead of CSS border

@Flaflo
Copy link
Contributor

Flaflo commented Apr 8, 2024

Choice 1 sounds like the best option to me.

@Garderoben
Copy link
Member

I agree with @henon here. Sure there is also outlined in CSS but it was never meant to reflect the css property.

I think renaming it to Outlined is the best option to streamline it with the rest of the library.

@danielchalmers
Copy link
Member

Makes sense 👍
Not super important either way

@henon henon merged commit 6dd8924 into MudBlazor:dev Apr 9, 2024
@henon henon deleted the expansion-panel-outlined branch April 11, 2024 15:21
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 Modifies the public API surface breaking change This change will require consumer code updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants