Skip to content

Commit

Permalink
chore: resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezgerges committed Sep 5, 2023
2 parents f0bc4f4 + 90057f1 commit 7964d01
Show file tree
Hide file tree
Showing 122 changed files with 1,691 additions and 1,770 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/samples-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body:
attributes:
label: On which page?
description: Specify the sample page or section where you've identified an issue
placeholder: ex. Windows.Devices/Acceleromter
placeholder: ex. Windows.Devices/Accelerometer
validations:
required: true

Expand Down
16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE/success-story.md

This file was deleted.

22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/success-story.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Success Story
description: If you are using Uno in production, we would love to hear about it
labels: [kind/consumer-experience, kind/documentation, triage/untriaged]
body:
- type: markdown
attributes:
value: |
**STOP ⛔ -- PLEASE READ!**
We 💖 to hear about how, where and what you're doing with Uno. Sharing this information is one of the kindest things you can do in open-source and the maintainers love hearing about success stories. Instead of raising a new GitHub issue could you please comment in the existing thread?
[Uno in Production](https://github.com/unoplatform/uno/discussions/5012)
If you're feeling extra generous, how about writing a blog post and then letting us know about it? That way, we can retweet it.
Thank you!
- type: textarea
id: success-story-text
attributes:
label: What is your success story?
description: If you still want to use GitHub Issues for sharing your Success story, you can do so bellow
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/support-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Support Request
description: Support request or question relating to Uno
labels: [triage/support]
body:
- type: markdown
attributes:
value: |
**STOP ⛔ -- PLEASE READ!**
GitHub is not the right place for support requests.
If you're looking for help, check [Stack Overflow](https://stackoverflow.com/questions/tagged/uno-platform) and the [documentation](https://platform.uno/docs/).
You can also post your question in [GitHub discussions](https://github.com/unoplatform/uno/discussions) or [on Twitter using the #unoplatform](https://twitter.com/search?q=%23unoplatform) hashtag.
For organizations that want a deeper level of support beyond our community support, please [contact us](https://platform.uno/contact/). Our professional support is more than a contract – it is a shared responsibility for your project success. Our engineering team will collaborate with you to ensure the success of your projects, and our custom application development team at nventive is also available to lend its expertise.
If the matter is security related, please disclose it privately via https://github.com/unoplatform/uno/security/
- type: textarea
id: support-request-text
attributes:
label: What do you need help with?
description: If you still want to use GitHub Issues for Support request, you can do so bellow
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/support.md

This file was deleted.

18 changes: 18 additions & 0 deletions build/PackageDiffIgnore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,8 @@
<!-- BEGIN Skia clipping -->
<Member fullName="System.Numerics.VectorExtensions" reason="Does not exist in WinAppSDK" />
<!-- END Skia clipping -->

<Member fullName="Windows.UI.Xaml.Shapes.ArbitraryShapeBase" reason="Shapes refactoring" />
</Types>
<Events>
<Member fullName="Windows.Foundation.TypedEventHandler`2&lt;Microsoft.UI.Xaml.Controls.IInputValidationControl,Microsoft.UI.Xaml.Controls.HasValidationErrorsChangedEventArgs&gt; Microsoft.UI.Xaml.Controls.AutoSuggestBox::HasValidationErrorsChanged" reason="Not present in WinAppSDK 1.2" />
Expand Down Expand Up @@ -872,6 +874,13 @@
<!-- End Skia lifecycle -->

<Member fullName="System.Nullable`1&lt;Uno.UI.Skia.RenderSurfaceType&gt; Uno.UI.XamlHost.Skia.Wpf.UnoXamlHostBase::RenderSurfaceType()" reason="Changed RenderSurfaceType namespace to Uno.UI.Runtime.Skia.Wpf" />

<!-- BEGIN PopupRoot alignment -->
<Member fullName="UIKit.UIView Windows.UI.Xaml.Controls.Primitives.Popup::MainWindow()" reason="Not available in WinUI" />
<Member fullName="AppKit.NSView Windows.UI.Xaml.Controls.Primitives.Popup::MainWindowContent()" reason="Not available in WinUI" />
<!-- END PopupRoot alignment -->

<Member fullName="System.Boolean Windows.UI.Xaml.Shapes.ArbitraryShapeBase::ShouldPreserveOrigin()" reason="Cleanup shapes on Wasm" />
</Properties>
<Methods>
<Member fullName="System.Void Windows.UI.Core.CoreWindow.RaisePointerCancelled(Windows.UI.Core.PointerEventArgs args)" reason="Not present in WInUI" />
Expand Down Expand Up @@ -1651,6 +1660,15 @@
<!-- END Skia clipping -->

<Member fullName="System.Collections.Generic.IEnumerator`1&lt;T&gt; Uno.Collections.MaterializableList`1.GetEnumerator()" reason="Changed return type" />

<!-- BEGIN PopupRoot alignment -->
<Member fullName="UIKit.UIView Windows.UI.Xaml.Controls.Primitives.Popup.get_MainWindow()" reason="Not available in WinUI" />
<Member fullName="AppKit.NSView Windows.UI.Xaml.Controls.Primitives.Popup.get_MainWindowContent()" reason="Not available in WinUI" />
<!-- END PopupRoot alignment -->

<Member fullName="System.Void Windows.UI.Xaml.Shapes.Shape.RefreshShape(System.Boolean forceRefresh)" reason="Cleanup shapes on Wasm" />
<Member fullName="System.Double Windows.UI.Xaml.Shapes.ArbitraryShapeBase.LimitWithUserSize(System.Double availableSize, System.Double userSize, System.Double naNFallbackValue)" reason="Cleanup shapes on Wasm" />
<Member fullName="System.Boolean Windows.UI.Xaml.Shapes.ArbitraryShapeBase.get_ShouldPreserveOrigin()" reason="Cleanup shapes on Wasm" />
</Methods>
</IgnoreSet>
<!--
Expand Down
4 changes: 2 additions & 2 deletions build/ci/templates/dotnet-mobile-install-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
- template: jdk-setup.yml

- powershell: |
& dotnet tool update --global uno.check --version 1.13.0-dev.4 --add-source https://api.nuget.org/v3/index.json
& dotnet tool update --global uno.check --version 1.14.1 --add-source https://api.nuget.org/v3/index.json
& uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest https://raw.githubusercontent.com/unoplatform/uno.check/79a6b891d5787a28cef4ca3c1cc620ace1c0ae93/manifests/uno.ui-preview-major.manifest.json
displayName: Install .NET Workloads
errorActionPreference: continue
Expand All @@ -14,7 +14,7 @@ steps:
condition: and(succeeded(), eq(variables.UnoDisableNet7Mobile, 'true'))
- powershell: |
& dotnet tool update --global uno.check --version 1.11.0-dev.2 --add-source https://api.nuget.org/v3/index.json
& dotnet tool update --global uno.check --version 1.14.1 --add-source https://api.nuget.org/v3/index.json
& uno-check -v --ci --non-interactive --fix --skip androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest https://raw.githubusercontent.com/unoplatform/uno.check/146b0b4b23d866bef455494a12ad7ffd2f6f2d20/manifests/uno.ui.manifest.json
displayName: Install .NET Workloads
errorActionPreference: continue
Expand Down
2 changes: 1 addition & 1 deletion build/ci/templates/dotnet7-mobile-install-mac.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
UnoCheck_Version: '1.11.0-dev.2'
UnoCheck_Version: '1.14.1'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/146b0b4b23d866bef455494a12ad7ffd2f6f2d20/manifests/uno.ui.manifest.json'

steps:
Expand Down
20 changes: 10 additions & 10 deletions build/nuget/Uno.WinUI.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@
<dependency id="Xamarin.AndroidX.Browser" version="1.0.0" />
<dependency id="Uno.Foundation.Logging" version="0.0.0" />
<dependency id="Uno.Diagnostics.Eventing" version="2.0.1" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0-dev.6" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0" />
</group>

<!-- net7.0-ios -->
<group targetFramework="net7.0-ios">
<dependency id="Uno.Foundation.Logging" version="0.0.0" />
<dependency id="Uno.Diagnostics.Eventing" version="2.0.1" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0-dev.6" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0" />
</group>

<!-- net7.0-maccatalyst -->
<group targetFramework="net7.0-maccatalyst">
<dependency id="Uno.Foundation.Logging" version="0.0.0" />
<dependency id="Uno.Diagnostics.Eventing" version="2.0.1" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0-dev.6" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0" />
</group>

<!-- net7.0-macos -->
<group targetFramework="net7.0-macos">
<dependency id="Uno.Foundation.Logging" version="0.0.0" />
<dependency id="Uno.Diagnostics.Eventing" version="2.0.1" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0-dev.6" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0" />
</group>

<!-- net8.0-android30.0 -->
Expand All @@ -66,28 +66,28 @@
<dependency id="Xamarin.AndroidX.Browser" version="1.0.0" />
<dependency id="Uno.Foundation.Logging" version="0.0.0" />
<dependency id="Uno.Diagnostics.Eventing" version="2.0.1" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0-dev.6" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0" />
</group>

<!-- net8.0-ios -->
<group targetFramework="net8.0-ios">
<dependency id="Uno.Foundation.Logging" version="0.0.0" />
<dependency id="Uno.Diagnostics.Eventing" version="2.0.1" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0-dev.6" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0" />
</group>

<!-- net8.0-maccatalyst -->
<group targetFramework="net8.0-maccatalyst">
<dependency id="Uno.Foundation.Logging" version="0.0.0" />
<dependency id="Uno.Diagnostics.Eventing" version="2.0.1" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0-dev.6" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0" />
</group>

<!-- net8.0-macos -->
<group targetFramework="net8.0-macos">
<dependency id="Uno.Foundation.Logging" version="0.0.0" />
<dependency id="Uno.Diagnostics.Eventing" version="2.0.1" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0-dev.6" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0" />
</group>

<!-- .NET 7 (Reference API) -->
Expand All @@ -98,7 +98,7 @@
<dependency id="System.Memory" version="4.5.2" />
<dependency id="Uno.Diagnostics.Eventing" version="2.0.1" />
<dependency id="System.Collections.Immutable" version="1.3.1" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0-dev.6" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0" />
</group>

<!-- .NET 8 (Reference API) -->
Expand All @@ -109,7 +109,7 @@
<dependency id="System.Memory" version="4.5.2" />
<dependency id="Uno.Diagnostics.Eventing" version="2.0.1" />
<dependency id="System.Collections.Immutable" version="1.3.1" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0-dev.6" />
<dependency id="Uno.Fonts.Fluent" version="2.3.0" />
</group>
</dependencies>

Expand Down
60 changes: 60 additions & 0 deletions doc/articles/features/compass.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
uid: Uno.Features.Compass
---

# Compass

> [!TIP]
> This article covers Uno-specific information for `Compass`. For a full description of the feature and instructions on using it, consult the UWP documentation: https://docs.microsoft.com/en-us/uwp/api/windows.devices.sensors.Compass
* The `Windows.Devices.Sensors.Compass` class returns a heading with respect to Magnetic North and, possibly, True North.

## Supported features

| Feature | Windows | Android | iOS | Web (WASM) | macOS | Linux (Skia) | Win 7 (Skia) |
|---------------|-------|-------|-------|-------|-------|-------|-|
| `GetDefault` ||||||||
| `ReadingChanged` ||||||||
| `ReportInterval` ||||||||

## Using Compass with Uno

* The `GetDefault` method is available on all targets and will return `null` on those which do not support `Compass` or devices that do not have such a sensor.
* Ensure to unsubscribe from the `ReadingChanged` event when you no longer need the readings, so that the sensor is no longer active to avoid unnecessary battery consumption.

## Platform-specific

### Android

If you are planning to use the `HeadingTrueNorth`, your app must declare `android.permission.ACCESS_FINE_LOCATION` permission, otherwise the value will return `null`:

```csharp
[assembly: UsesPermission("android.permission.ACCESS_FINE_LOCATION")]
```

## Example

### Capturing sensor readings

```csharp
var compass = Compass.GetDefault();
compass.ReadingChanged += Compass_ReadingChanged;

private async void Compass_ReadingChanged(Compass sender, CompassReadingChangedEventArgs args)
{
// If you want to update the UI in some way, ensure the Dispatcher is used,
// as the ReadingChanged event handler does not run on the UI thread.
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
OutputTextBlock.Text = $"HeadingMagneticNorth in degrees = {args.Reading.HeadingMagneticNorth}, " +
$"HeadingTrueNorth in degrees = {args.Reading.HeadingTrueNorth}, "
$"timestamp = {args.Reading.Timestamp}";
});
}
```

### Unsubscribing from the readings

```csharp
Compass.ReadingChanged -= Compass_ReadingChanged;
```
24 changes: 13 additions & 11 deletions doc/articles/features/orientation-sensor.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,36 @@ uid: Uno.Features.OrientationSensor
# Orientation sensor

> [!TIP]
> This article covers Uno-specific information for SimpleOrientationSensor. For a full description of the feature and instructions on using it, consult the UWP documentation: https://docs.microsoft.com/en-us/uwp/api/windows.devices.sensors.simpleOrientationSensor
> This article covers Uno-specific information for SimpleOrientationSensor. For a full description of the feature and instructions on using it, consult the UWP documentation: <https://docs.microsoft.com/en-us/uwp/api/windows.devices.sensors.simpleOrientationSensor>
* The `Windows.Devices.Sensors.SimpleOrientationSensor` class allows you to determine the general orientation of the device.
* The `Windows.Devices.Sensors.SimpleOrientationSensor` class allows you to determine the general orientation of the device.

## Supported features

| Feature | Windows | Android | iOS | Web (WASM) | macOS | Linux (Skia) | Win 7 (Skia) |
| Feature | Windows | Android | iOS | Web (WASM) | macOS | Linux (Skia) | Win 7 (Skia) |
|---------------|-------|-------|-------|-------|-------|-------|-|
| `GetDefault` ||||||||
| `ReadingChanged` ||||||||
| `OrientationChanged` ||||||||

>**Important:** The `OrientationChanged` event is not supported by iOS simulators.
## Using SimpleOrientationSensor with Uno
* The `GetDefault` method is available on all targets and will return `null` on those which do not support `SimpleOrientationSensor` or devices that do not have such a sensor.
* Ensure to unsubscribe from the `ReadingChanged` event when you no longer need the readings, so that the sensor is no longer active to avoid unnecessary battery consumption.

* The `GetDefault` method is available on all targets and will return `null` on those that do not support `SimpleOrientationSensor` or devices that do not have such a sensor.
* Ensure to unsubscribe from the `OrientationChanged` event when you no longer need the readings so that the sensor is no longer active to avoid unnecessary battery consumption.

## Example

### Capturing sensor readings

```csharp
var simpleOrientationSensor = SimpleOrientationSensor.GetDefault();
simpleOrientationSensor.ReadingChanged += SimpleOrientationSensor_ReadingChanged;
simpleOrientationSensor.OrientationChanged += SimpleOrientationSensor_OrientationChanged;

private async void SimpleOrientationSensor_ReadingChanged(object sender, SimpleOrientationSensorReadingChangedEventArgs args)
private async void SimpleOrientationSensor_OrientationChanged(object sender, SimpleOrientationSensorOrientationChangedEventArgs args)
{
// If you want to update the UI in some way, ensure the Dispatcher is used,
// as the ReadingChanged event handler does not run on the UI thread.
// as the OrientationChanged event handler does not run on the UI thread.
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
switch (orientation)
Expand Down Expand Up @@ -66,5 +68,5 @@ private async void SimpleOrientationSensor_ReadingChanged(object sender, SimpleO
### Unsubscribing from the readings

```csharp
simpleOrientationSensor.ReadingChanged -= SimpleOrientationSensor_ReadingChanged;
simpleOrientationSensor.OrientationChanged -= SimpleOrientationSensor_OrientationChanged;
```
6 changes: 3 additions & 3 deletions doc/articles/getting-started-tutorial-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ If you haven't prepared your dev environment for Uno Platform app development ye
![Visual Studio - Reload projects banner](Assets/quick-start/vs2022-project-reload.PNG)

1. In your `MyApp` Class Library project, open up `MainPage.xaml`

1. Add a `StackPanel` around your `TextBlock`
1. On the top left corner of the XAML editor, make sure to select `MyApp (net7.0-windows.10.0.XXX)` in the dropdown
1. Replace the inner content of the `Page` with the following
```xml
<Grid>
<StackPanel>
<TextBlock Text="Hello World" Margin="20" FontSize="30" />
<TextBlock Text="Hello Uno Platform" Margin="20" FontSize="30" />
</StackPanel>
</Grid>
```
Expand Down
Loading

0 comments on commit 7964d01

Please sign in to comment.