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

Rename the Margin.None enum value to Margin.Default. #8844

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

BieleckiLtd
Copy link
Contributor

Margin.None value can be misleading, as the name suggests that no margin will be applied to the element, which is not the case. This PR renames the enum value to Margin.Default to more accurately describe its intended use.

Note to add to the v7.0.0 Migration Guide #8447:

  • Replace Margin.None with Margin.Default

Description

Closes #8650.

How Has This Been Tested?

unit

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

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.07%. Comparing base (28bc599) to head (b6927df).
Report is 128 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8844      +/-   ##
==========================================
+ Coverage   89.82%   90.07%   +0.24%     
==========================================
  Files         412      421       +9     
  Lines       11878    12301     +423     
  Branches     2364     2438      +74     
==========================================
+ Hits        10670    11080     +410     
+ Misses        681      668      -13     
- Partials      527      553      +26     

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

@henon
Copy link
Collaborator

henon commented May 2, 2024

Hmm, not sure about this because Margin.Default and Margin.Normal would mean the same thing but are different values. We may have to rethink this Margin parameter. The example is also very bad, implying you can have both None and Dense when in reality that is not possible.

@henon henon requested a review from danielchalmers May 2, 2024 12:08
@BieleckiLtd
Copy link
Contributor Author

Does this mean that current None and Normal are also the same things?

@henon
Copy link
Collaborator

henon commented May 2, 2024

I don't know, probably not. But the words Normal and Default kind of mean the same, that is confusing

@BieleckiLtd
Copy link
Contributor Author

Finding another name that won't be as confusing as None or Default, and won't clash with CSS terms like unset, is challenging. Perhaps Undefined could work? If not, I have no better suggestion in mind.

Thinking more about this, now that users can set their own default values, named values such as Normal or Dense have lost much of their significance. Numerical values would be less ambiguous, more practical, and more flexible, but adopting them would represent a significant paradigm shift for the library.

@henon
Copy link
Collaborator

henon commented May 2, 2024

Numerical values would be less ambiguous, more practical, and more flexible, but adopting them would represent a significant paradigm shift for the library.

Yes, we'll work on that at some point in the future. I honestly don't know myself what to do about this now.

@danielchalmers
Copy link
Contributor

I vote to rework this parameter entirely at the same time to avoid churn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change bug Something does not work as intended/expected PR: needs review
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Rename Margin enum values
3 participants