diff --git a/.cursor/rules/pr-conventions.mdc b/.cursor/rules/pr-conventions.mdc new file mode 100644 index 00000000..cd953b17 --- /dev/null +++ b/.cursor/rules/pr-conventions.mdc @@ -0,0 +1,32 @@ +--- +description: Conventions for pull request titles and body content +alwaysApply: true +--- + +# Pull Request Conventions + +## PR Title + +Use semantic/conventional commit prefixes in PR titles: + +- `fix:` for bug fixes +- `feat:` for new features +- `chore:` for maintenance tasks (deps, CI, tooling) +- `refactor:` for code restructuring without behavior changes +- `docs:` for documentation-only changes +- `test:` for test-only changes + +Example: `fix: resolve notification grouping on Android 14` + +## PR Body + +Follow the repo's PR template at `.github/pull_request_template.md`. Every PR body must include: + +1. **One Line Summary** (required) +2. **Motivation** (required) explaining why the change is being made +3. **Scope** (recommended) describing what is and isn't affected +4. **Testing** section with manual and/or unit testing details +5. **Affected code checklist** with relevant items checked +6. **Checklist** sections confirmed + +Remove the instructional header block (between `` and ``) before submitting. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..65156fae --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: Run Checks +permissions: + contents: read +on: + pull_request: + branches: + - "**" + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Install CSharpier + run: dotnet tool install -g csharpier + + - name: Check formatting + run: csharpier check . diff --git a/OneSignalSDK.DotNet.Android.Core.Binding/OneSignalSDK.DotNet.Android.Core.Binding.csproj b/OneSignalSDK.DotNet.Android.Core.Binding/OneSignalSDK.DotNet.Android.Core.Binding.csproj index df2cc30f..e0272fee 100644 --- a/OneSignalSDK.DotNet.Android.Core.Binding/OneSignalSDK.DotNet.Android.Core.Binding.csproj +++ b/OneSignalSDK.DotNet.Android.Core.Binding/OneSignalSDK.DotNet.Android.Core.Binding.csproj @@ -11,7 +11,9 @@ Resources Assets OneSignalSDK.DotNet.Android.Core.Binding - 28.0.3 + 28.0.3 class-parse @@ -57,4 +59,4 @@ - \ No newline at end of file + diff --git a/OneSignalSDK.DotNet.Android.Core.Binding/Transforms/EnumFields.xml b/OneSignalSDK.DotNet.Android.Core.Binding/Transforms/EnumFields.xml index e9af0eeb..e5ec0a0c 100755 --- a/OneSignalSDK.DotNet.Android.Core.Binding/Transforms/EnumFields.xml +++ b/OneSignalSDK.DotNet.Android.Core.Binding/Transforms/EnumFields.xml @@ -1,5 +1,5 @@  - + + + + + + + + - - - - - - - - - + + + - - - + - - - - - + + + + + + + diff --git a/examples/demo/Controls/LogView.xaml.cs b/examples/demo/Controls/LogView.xaml.cs index 2c1a66d1..4908173e 100644 --- a/examples/demo/Controls/LogView.xaml.cs +++ b/examples/demo/Controls/LogView.xaml.cs @@ -1,5 +1,5 @@ -using MauiIcons.Material; using MauiIcons.Core; +using MauiIcons.Material; using OneSignalDemo.Services; namespace OneSignalDemo.Controls; @@ -43,7 +43,7 @@ private void RebuildLogList() FontSize = 11, FontFamily = "DroidSansMono", VerticalOptions = LayoutOptions.Center, - AutomationId = $"log_entry_{i}_timestamp" + AutomationId = $"log_entry_{i}_timestamp", }; var level = new Label { @@ -54,7 +54,7 @@ private void RebuildLogList() FontAttributes = FontAttributes.Bold, VerticalOptions = LayoutOptions.Center, Margin = new Thickness(4, 0), - AutomationId = $"log_entry_{i}_level" + AutomationId = $"log_entry_{i}_level", }; var msg = new Label { @@ -63,7 +63,7 @@ private void RebuildLogList() FontSize = 11, FontFamily = "DroidSansMono", VerticalOptions = LayoutOptions.Center, - AutomationId = $"log_entry_{i}_message" + AutomationId = $"log_entry_{i}_message", }; row.Children.Add(ts); diff --git a/examples/demo/Controls/MultiPairDialogHelper.cs b/examples/demo/Controls/MultiPairDialogHelper.cs index 78945a25..2c77804a 100644 --- a/examples/demo/Controls/MultiPairDialogHelper.cs +++ b/examples/demo/Controls/MultiPairDialogHelper.cs @@ -163,13 +163,21 @@ IEnumerable keys var row = new HorizontalStackLayout { Spacing = 8 }; row.Children.Add(cb); row.Children.Add( - new Label { Text = key, VerticalOptions = LayoutOptions.Center, FontSize = 14 } + new Label + { + Text = key, + VerticalOptions = LayoutOptions.Center, + FontSize = 14, + } ); itemsLayout.Children.Add(row); } var cancelButton = DialogInputHelper.ActionButton("Cancel", "multi_select_cancel_button"); - var removeButton = DialogInputHelper.ActionButtonDisabled("Remove (0)", "multi_select_remove_button"); + var removeButton = DialogInputHelper.ActionButtonDisabled( + "Remove (0)", + "multi_select_remove_button" + ); void UpdateButton() { @@ -185,10 +193,7 @@ void UpdateButton() removeButton.Clicked += async (s, e) => { - var selected = checkboxes - .Where(c => c.Box.IsChecked) - .Select(c => c.Key) - .ToList(); + var selected = checkboxes.Where(c => c.Box.IsChecked).Select(c => c.Key).ToList(); await parentPage.ClosePopupAsync(selected); }; @@ -217,7 +222,10 @@ void UpdateButton() }, }; - var result = await parentPage.ShowPopupAsync>(content, DialogInputHelper.DialogOptions); + var result = await parentPage.ShowPopupAsync>( + content, + DialogInputHelper.DialogOptions + ); return result?.Result; } } diff --git a/examples/demo/Controls/Sections/AliasesSection.xaml b/examples/demo/Controls/Sections/AliasesSection.xaml index 9383bee8..89c9d5bb 100644 --- a/examples/demo/Controls/Sections/AliasesSection.xaml +++ b/examples/demo/Controls/Sections/AliasesSection.xaml @@ -1,29 +1,52 @@ + xmlns="http://schemas.microsoft.com/dotnet/2021/maui" + xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" + xmlns:mi="http://www.aathifmahir.com/dotnet/2022/maui/icons" + x:Class="OneSignalDemo.Controls.Sections.AliasesSection" +> + + + - - - + + + + - - - - - -