Skip to content

Commit

Permalink
Burkus.Mvvm.Maui POC
Browse files Browse the repository at this point in the history
  • Loading branch information
BurkusCat committed Oct 5, 2023
1 parent d3de198 commit af6be32
Show file tree
Hide file tree
Showing 88 changed files with 3,184 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug] "
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Reproduction project**
Add a link to a minimal, reproduction hosted on GitHub. Issues without a reproduction may not be investigated until one is added.

**Environment:**
- Visual Studio version: [e.g. 17.7.0]
- Platforms with bug: [e.g. Android 12, iOS 14 etc.]

**Additional context**
Add any other context about the problem here.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discussions and Questions
url: https://github.com/BurkusCat/Burkus.Mvvm.Maui/discussions
about: Please ask and answer questions here.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature] "
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Proposed APIs**
If possible, try to propose how the API might look. For example:
``` csharp
// INavigationService
Task RandomizePageOrder();

// Example usage
navigationService.RandomizePageOrder();
```

**Additional context**
Add any other context or screenshots about the feature request here.
27 changes: 27 additions & 0 deletions .github/workflows/ci-demo-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build Demo App for CI

on:
push:
branches: [ "main" ]
paths-ignore:
- "**.md"
pull_request:
branches: [ "main" ]

jobs:
build-sample-ci:

runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Install .NET MAUI
run: dotnet workload install maui
- name: Restore dependencies
run: dotnet restore samples\DemoApp.sln
- name: Build
run: dotnet build samples\DemoApp.sln -c Release
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build for CI

on:
push:
branches: [ "main" ]
paths-ignore:
- "**.md"
pull_request:
branches: [ "main" ]

jobs:
build-plugin-ci:

runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Install .NET MAUI
run: dotnet workload install maui
- name: Restore dependencies
run: dotnet restore src\Burkus.Mvvm.Maui.sln
- name: Build
run: dotnet build src\Burkus.Mvvm.Maui.sln -c Release
37 changes: 37 additions & 0 deletions .github/workflows/release-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Create a release on NuGet

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+"
jobs:
release-nuget:

runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- name: Verify commit exists in origin/main
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Install .NET MAUI
run: dotnet workload install maui
- name: Get version information from tag
id: get_version
uses: battila7/get-version-action@v2
- name: Restore dependencies
run: dotnet restore src\Burkus.Mvvm.Maui.sln
- name: Build
run: dotnet build src\Burkus.Mvvm.Maui.sln -c Release /p:Version=${{ steps.get_version.outputs.version-without-v }}
- name: Pack
run: dotnet pack src\Burkus.Mvvm.Maui.sln -c Release /p:Version=${{ steps.get_version.outputs.version-without-v }} --no-build --output .
- name: Push
run: dotnet nuget push Burkus.Mvvm.Maui.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }}
39 changes: 39 additions & 0 deletions Burkus.Mvvm.Maui.All.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34003.232
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DemoApp", "samples\DemoApp\DemoApp.csproj", "{E8625BA3-0495-44AB-AFE7-397CCAFD4520}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Burkus.Mvvm.Maui", "src\Burkus.Mvvm.Maui.csproj", "{C289478A-DA7F-4B87-A909-CF7FC5BBFF4D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Burkus.Mvvm.Maui.UnitTests", "tests\Burkus.Mvvm.Maui.UnitTests\Burkus.Mvvm.Maui.UnitTests.csproj", "{9E4BA358-5402-487E-B412-4864B3371BB9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E8625BA3-0495-44AB-AFE7-397CCAFD4520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E8625BA3-0495-44AB-AFE7-397CCAFD4520}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E8625BA3-0495-44AB-AFE7-397CCAFD4520}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{E8625BA3-0495-44AB-AFE7-397CCAFD4520}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E8625BA3-0495-44AB-AFE7-397CCAFD4520}.Release|Any CPU.Build.0 = Release|Any CPU
{E8625BA3-0495-44AB-AFE7-397CCAFD4520}.Release|Any CPU.Deploy.0 = Release|Any CPU
{C289478A-DA7F-4B87-A909-CF7FC5BBFF4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C289478A-DA7F-4B87-A909-CF7FC5BBFF4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C289478A-DA7F-4B87-A909-CF7FC5BBFF4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C289478A-DA7F-4B87-A909-CF7FC5BBFF4D}.Release|Any CPU.Build.0 = Release|Any CPU
{9E4BA358-5402-487E-B412-4864B3371BB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E4BA358-5402-487E-B412-4864B3371BB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E4BA358-5402-487E-B412-4864B3371BB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E4BA358-5402-487E-B412-4864B3371BB9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8826CED2-A47B-4D9C-9542-DF35BD8A5AAC}
EndGlobalSection
EndGlobal
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2023-10-15

### Added
- Builder extensions and BurkusMvvmBuilder
- ResolveBindingContext markup extension
- Navigation parameters and reserved navigation parameters
- INavigatingEvents
- INavigatedEvents
- DialogService
- ServiceResolver
- Initial documentation
36 changes: 36 additions & 0 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Reporting bugs
[Use this template to create a bug report.](https://github.com/BurkusCat/Burkus.Mvvm.Maui/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=%5BBug%5D+)

# Suggesting features
[Use this template to create a suggest features or enhancements.](https://github.com/BurkusCat/Burkus.Mvvm.Maui/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=%5BFeature%5D+) Remember the project/community may decide against a feature if it isn't a good fit for this library.

# Contributing pull requests
## Before coding anything...
If an issue doesn't already exist, it is probably a good idea to raise an issue on the GitHub for the bug/feature suggestion (see above). If you were to spend time making changes without doing this, then your pull request may not be accepted if the change is not wanted or it is implemented in a way that the project does not want. Especially for more significant changes, it is always better to discuss a proposed implementation on an issue first.

## Pre-requisites
- [Visual Studio 2022 - 17.7.0 or greater](https://visualstudio.microsoft.com/vs/community/) with the .NET Multi-platform App UI workload installed
- [XAML Styler](https://marketplace.visualstudio.com/items?itemName=TeamXavalon.XAMLStyler2022) for ensuring XAML is formatted consistently. It is a good idea to set it to run automatically on save.

NOTE: The above software is the recommended basics. You may be able to use other software versions or different pieces of software to contribute to this project.

## Folder structure

- `/.github` - files related to the repository hosted on GitHub
- `/art` - art assets for the library
- `/samples` - full .NET MAUI applications demonstrating the features of the library
- `/src` - the source for the library
- `/Abstractions` - contains interface files for services etc.
- `/Builders` - builder classes for configuring the library
- `/Extensions` - contains extension methods
- `/Models` - models and constants
- `/Properties` - contains some library configuration and string resources
- `/Services` - dependencies and services for the project including publicly exposed ones
- `/Utilities` - internal helpers for the library
- `/tests` - the area for test projects for the library
- `/Burkus.Mvvm.Maui.UnitTests` - unit tests for the library project

## Submitting a PR
- Try to rebase (`git rebase -i`) your PR onto `main` to tidy your git history https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase
- Update the unit tests (fix any existing tests and ensure new code has unit test coverage)
- Ensure you have the [XAML Styler](https://marketplace.visualstudio.com/items?itemName=TeamXavalon.XAMLStyler2022) extension installed and have run it on any XAML files you have changed to format them
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Burkus Ltd., Ronan Burke

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit af6be32

Please sign in to comment.