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
Converters between meters and feet (US Survey and International) added #935
Conversation
Docs Build status updates of commit bf4e1ac:
|
File | Status | Preview URL | Details |
---|---|---|---|
Details | |||
Xamarin.Essentials/Types/UnitConverters.shared.cs | ✅Succeeded | ||
docs/en/Xamarin.Essentials/SizeExtensions.xml | ✅Succeeded | ||
docs/en/Xamarin.Essentials/RectangleExtensions.xml | ✅Succeeded | ||
docs/en/Xamarin.Essentials/PointExtensions.xml | ✅Succeeded | ||
docs/en/Xamarin.Essentials/ColorExtensions.xml | ✅Succeeded |
- [Warning]
Uid(Xamarin.Essentials.ColorExtensions.ToPlatformColor(System.Drawing.Color)_m) has already been defined in api/Xamarin.Essentials.ColorExtensions.ToPlatformColor.yml#Xamarin_Essentials_ColorExtensions_ToPlatformColor_System_Drawing_Color__m.
- [Warning]
Uid(Xamarin.Essentials.PointExtensions.ToPlatformPoint(System.Drawing.Point)_m) has already been defined in api/Xamarin.Essentials.PointExtensions.ToPlatformPoint.yml#Xamarin_Essentials_PointExtensions_ToPlatformPoint_System_Drawing_Point__m.
- [Warning]
Uid(Xamarin.Essentials.SizeExtensions.ToPlatformSize(System.Drawing.Size)_m) has already been defined in api/Xamarin.Essentials.SizeExtensions.ToPlatformSize.yml#Xamarin_Essentials_SizeExtensions_ToPlatformSize_System_Drawing_Size__m.
- [Warning]
Uid(Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle(System.Drawing.Rectangle)_m) has already been defined in api/Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle.yml#Xamarin_Essentials_RectangleExtensions_ToPlatformRectangle_System_Drawing_Rectangle__m.
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Is naming alright @Redth thoughts @mattleibow does everything align? Looks like there is some spacing issues:
|
Also needs documentation: 1 Foot: 1 Foot (U.S. Survey): Should there also be.... USSurveyFeetToInternationalFeet and InternationalFeetToUSSurveyFeet ? |
Also needs tests as to make sure they are being converted correctly |
Docs Build status updates of commit b1e5cf5: 🕙 Pending: waiting for processors (6 builds ahead of you) |
Docs Build status updates of commit b1e5cf5:
|
File | Status | Preview URL | Details |
---|---|---|---|
Details | |||
Xamarin.Essentials/Types/UnitConverters.shared.cs | ✅Succeeded | ||
docs/en/Xamarin.Essentials/SizeExtensions.xml | ✅Succeeded | ||
docs/en/Xamarin.Essentials/RectangleExtensions.xml | ✅Succeeded | ||
docs/en/Xamarin.Essentials/PointExtensions.xml | ✅Succeeded | ||
docs/en/Xamarin.Essentials/ColorExtensions.xml | ✅Succeeded |
- [Warning]
Uid(Xamarin.Essentials.SizeExtensions.ToPlatformSize(System.Drawing.Size)_m) has already been defined in api/Xamarin.Essentials.SizeExtensions.ToPlatformSize.yml#Xamarin_Essentials_SizeExtensions_ToPlatformSize_System_Drawing_Size__m.
- [Warning]
Uid(Xamarin.Essentials.ColorExtensions.ToPlatformColor(System.Drawing.Color)_m) has already been defined in api/Xamarin.Essentials.ColorExtensions.ToPlatformColor.yml#Xamarin_Essentials_ColorExtensions_ToPlatformColor_System_Drawing_Color__m.
- [Warning]
Uid(Xamarin.Essentials.PointExtensions.ToPlatformPoint(System.Drawing.Point)_m) has already been defined in api/Xamarin.Essentials.PointExtensions.ToPlatformPoint.yml#Xamarin_Essentials_PointExtensions_ToPlatformPoint_System_Drawing_Point__m.
- [Warning]
Uid(Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle(System.Drawing.Rectangle)_m) has already been defined in api/Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle.yml#Xamarin_Essentials_RectangleExtensions_ToPlatformRectangle_System_Drawing_Rectangle__m.
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.
@jamesmontemagno have added documentation and refactored for a nicer look (with constants and indents). Unfortunately I cannot launch Tests of Essentials projects, but I can provide NUnit tests I use for the code in my project (and they run successively)
|
@qmark can you please change these to use xUnit ?
Thanks |
@Redth I will, however I cannot launch them in the project, so not sure if they will run successfully. Does autocheck run unit tests? |
Docs Build status updates of commit 258b7f6:
|
File | Status | Preview URL | Details |
---|---|---|---|
Details | |||
Tests/UnitConverters_Tests.cs | ✅Succeeded | ||
Xamarin.Essentials/Types/UnitConverters.shared.cs | ✅Succeeded | ||
docs/en/Xamarin.Essentials/SizeExtensions.xml | ✅Succeeded | ||
docs/en/Xamarin.Essentials/RectangleExtensions.xml | ✅Succeeded | ||
docs/en/Xamarin.Essentials/PointExtensions.xml | ✅Succeeded | ||
docs/en/Xamarin.Essentials/ColorExtensions.xml | ✅Succeeded |
- [Warning]
Uid(Xamarin.Essentials.PointExtensions.ToPlatformPoint(System.Drawing.Point)_m) has already been defined in api/Xamarin.Essentials.PointExtensions.ToPlatformPoint.yml#Xamarin_Essentials_PointExtensions_ToPlatformPoint_System_Drawing_Point__m.
- [Warning]
Uid(Xamarin.Essentials.ColorExtensions.ToPlatformColor(System.Drawing.Color)_m) has already been defined in api/Xamarin.Essentials.ColorExtensions.ToPlatformColor.yml#Xamarin_Essentials_ColorExtensions_ToPlatformColor_System_Drawing_Color__m.
- [Warning]
Uid(Xamarin.Essentials.SizeExtensions.ToPlatformSize(System.Drawing.Size)_m) has already been defined in api/Xamarin.Essentials.SizeExtensions.ToPlatformSize.yml#Xamarin_Essentials_SizeExtensions_ToPlatformSize_System_Drawing_Size__m.
- [Warning]
Uid(Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle(System.Drawing.Rectangle)_m) has already been defined in api/Xamarin.Essentials.RectangleExtensions.ToPlatformRectangle.yml#Xamarin_Essentials_RectangleExtensions_ToPlatformRectangle_System_Drawing_Rectangle__m.
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.
Managed to run the tests, they all pass |
@qmark the only other question I'd say is, do we really need to call them International feet? Is this not the commonly understood implementation of feet already? I may be ignorant here but to me it seems more confusion to call them International Feet. I totally get calling the US Survey feet specifically out though. Thoughts? |
Docs Build status updates of commit a27f831: ✅ Validation status: passed
For more details, please refer to the build report. Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report. |
@Redth Yes, it is the commonly understood implementation of feet, and I also added summary with "This is the most common modern foot measure" for International foot. For me it's hard to say if it is confusing, as I have some knowledge in the field, and say there is also Indian survey foot, which may be just "Foot" for someone in India, or metric foot, which is exactly 30 cm and may be "Foot" for someone in Europe. I'd say it's better for someone in the U.S. to have it as just "Foot", but not sure about other people. For instance, English wiki page https://en.wikipedia.org/wiki/Foot_(unit) says "one foot is defined as 0.3048 meter exactly" in the second sentence, but Russian wiki https://ru.wikipedia.org/wiki/Фут says "The exact linear value varies from country to country." in the second sentence, and "“International” foot began to equal exactly 0.3048 m" later on. |
Thanks! |
Docs Build status updates of commit e19ed72: ✅ Validation status: passed
For more details, please refer to the build report. Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report. |
xamarin#935) * Converters between meters and feet (US Survey and International) added * Refactoring and documentation * xUnit tests
Description of Change
Converters between meters and feet (US Survey and International) added
API Changes