Skip to content

Commit 1430eea

Browse files
authored
fix: PinView with Cancel button changes and other CD changes (#172)
1 parent ce37924 commit 1430eea

File tree

19 files changed

+348
-262
lines changed

19 files changed

+348
-262
lines changed

.github/workflows/main_cd.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,43 @@ name: Create a release on NuGet
33
on:
44
push:
55
tags:
6-
- "v[0-9]+.[0-9]+.[0-9]+"
7-
- "v[0-9]+.[0-9]+.[0-9]+-pre[0-9]+"
6+
- "v[0-9]+\\.[0-9]+\\.[0-9]+"
7+
- "v[0-9]+\\.[0-9]+\\.[0-9]+-pre"
8+
89
jobs:
910
release-nuget:
10-
1111
runs-on: windows-latest
1212

1313
steps:
1414
- uses: actions/checkout@v4
15+
1516
- name: Verify commit exists in origin/master
17+
shell: pwsh
1618
run: |
1719
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
18-
git branch --remote --contains | grep origin/master
20+
if (-not (git branch --remote --contains | Select-String "origin/master")) {
21+
throw "Tag is not on origin/master. Aborting release."
22+
}
23+
1924
- name: Get version information from tag
2025
id: get_version
26+
shell: pwsh
27+
run: |
28+
$version = "${{ github.ref_name }}".TrimStart("v")
29+
echo "version_without_v=$version" >> $env:GITHUB_OUTPUT
30+
31+
- name: Pack NuGet package
2132
run: |
22-
$version="${{github.ref_name}}".TrimStart("v")
23-
"version-without-v=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
24-
- name: Pack
25-
run: dotnet pack MAUI.FreakyControls\MAUI.FreakyControls\Maui.FreakyControls.csproj -c Release -p:PackageVersion=${{ steps.get_version.outputs.version-without-v }}
26-
- name: Push
27-
run: dotnet nuget push MAUI.FreakyControls\MAUI.FreakyControls\bin\Release\FreakyControls.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }}
33+
dotnet pack MAUI.FreakyControls\MAUI.FreakyControls\Maui.FreakyControls.csproj -c Release -p:PackageVersion=${{ steps.get_version.outputs.version_without_v }}
34+
35+
- name: Push NuGet package
36+
shell: pwsh
37+
run: |
38+
$version = "${{ steps.get_version.outputs.version_without_v }}"
39+
$nupkgs = Get-ChildItem -Recurse -Filter *.nupkg | Where-Object { $_.FullName -like "*$version*" -and $_.FullName -notlike "*.symbols.nupkg" }
40+
41+
if ($nupkgs.Count -ne 1) {
42+
throw "Expected exactly one matching .nupkg, found $($nupkgs.Count)"
43+
}
44+
45+
dotnet nuget push $nupkgs[0].FullName -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}

MAUI.FreakyControls/MAUI.FreakyControls/FreakyButton/FreakyButton.xaml

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
66
xmlns:converter="clr-namespace:Maui.FreakyControls.Converters"
7+
xmlns:fc="clr-namespace:Maui.FreakyControls"
78
xmlns:freakyEffects="clr-namespace:Maui.FreakyEffects.TouchEffects;assembly=Maui.FreakyEffects"
89
x:Name="this"
9-
freakyEffects:TouchEffect.Color="{Binding NativeAnimationColor, Source={x:Reference this}}"
10+
freakyEffects:TouchEffect.Color="{Binding NativeAnimationColor, Source={x:Reference this}, x:DataType=fc:FreakyButton, x:DataType=fc:FreakyButton}"
1011
HeightRequest="55">
1112
<ContentView.Resources>
1213
<converter:InverseBoolConverter x:Key="InverseBoolConverter" />
@@ -16,66 +17,66 @@
1617
<TapGestureRecognizer Tapped="Button_Tapped" />
1718
</ContentView.GestureRecognizers>
1819
<Border
19-
Padding="{Binding Padding, Source={x:Reference this}}"
20-
BackgroundColor="{Binding BackgroundColor, Source={x:Reference this}}"
21-
Stroke="{Binding BorderColor, Source={x:Reference this}}"
22-
StrokeThickness="{Binding BorderWidth, Source={x:Reference this}}">
20+
Padding="{Binding Padding, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
21+
BackgroundColor="{Binding BackgroundColor, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
22+
Stroke="{Binding BorderColor, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
23+
StrokeThickness="{Binding BorderWidth, Source={x:Reference this}, x:DataType=fc:FreakyButton}">
2324
<Border.StrokeShape>
24-
<RoundRectangle CornerRadius="{Binding CornerRadius, Source={x:Reference this}}" />
25+
<RoundRectangle CornerRadius="{Binding CornerRadius, Source={x:Reference this}, x:DataType=fc:FreakyButton}" />
2526
</Border.StrokeShape>
2627
<Grid
2728
x:Name="mainGrid"
2829
Padding="5,0,5,0"
2930
BackgroundColor="Transparent"
3031
ColumnDefinitions="Auto, 3*, Auto"
31-
ColumnSpacing="{Binding Spacing, Source={x:Reference this}}"
32+
ColumnSpacing="{Binding Spacing, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
3233
HorizontalOptions="Fill">
3334
<ContentView
3435
Grid.Column="0"
3536
BackgroundColor="Transparent"
3637
CascadeInputTransparent="True"
37-
Content="{Binding LeadingIcon, Source={x:Reference this}}"
38-
HeightRequest="{Binding IconSize, Source={x:Reference this}}"
39-
IsVisible="{Binding LeadingIcon, Converter={StaticResource ContentToInvisibilityConverter}, Source={x:Reference this}}"
38+
Content="{Binding LeadingIcon, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
39+
HeightRequest="{Binding IconSize, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
40+
IsVisible="{Binding LeadingIcon, Converter={StaticResource ContentToInvisibilityConverter}, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
4041
VerticalOptions="Center"
41-
WidthRequest="{Binding IconSize, Source={x:Reference this}}" />
42+
WidthRequest="{Binding IconSize, Source={x:Reference this}, x:DataType=fc:FreakyButton}" />
4243

4344
<Label
4445
x:Name="txtLabel"
4546
Grid.Column="1"
46-
CharacterSpacing="{Binding CharacterSpacing, Source={x:Reference this}}"
47-
FontAttributes="{Binding FontAttributes, Source={x:Reference this}}"
48-
FontAutoScalingEnabled="{Binding FontAutoScalingEnabled, Source={x:Reference this}}"
49-
FontFamily="{Binding FontFamily, Source={x:Reference this}}"
50-
FontSize="{Binding FontSize, Source={x:Reference this}}"
51-
HorizontalTextAlignment="{Binding HorizontalTextAlignment, Source={x:Reference this}}"
52-
LineBreakMode="{Binding LineBreakMode, Source={x:Reference this}}"
53-
Text="{Binding Text, Source={x:Reference this}}"
54-
TextColor="{Binding TextColor, Source={x:Reference this}}"
55-
TextTransform="{Binding TextTransform, Source={x:Reference this}}"
56-
TextType="{Binding TextType, Source={x:Reference this}}"
57-
VerticalTextAlignment="{Binding VerticalTextAlignment, Source={x:Reference this}}" />
47+
CharacterSpacing="{Binding CharacterSpacing, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
48+
FontAttributes="{Binding FontAttributes, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
49+
FontAutoScalingEnabled="{Binding FontAutoScalingEnabled, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
50+
FontFamily="{Binding FontFamily, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
51+
FontSize="{Binding FontSize, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
52+
HorizontalTextAlignment="{Binding HorizontalTextAlignment, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
53+
LineBreakMode="{Binding LineBreakMode, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
54+
Text="{Binding Text, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
55+
TextColor="{Binding TextColor, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
56+
TextTransform="{Binding TextTransform, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
57+
TextType="{Binding TextType, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
58+
VerticalTextAlignment="{Binding VerticalTextAlignment, Source={x:Reference this}, x:DataType=fc:FreakyButton}" />
5859

5960
<ActivityIndicator
6061
x:Name="activityIndicator"
6162
Grid.Column="1"
62-
HeightRequest="{Binding ActivityIndicatorSize, Source={x:Reference this}}"
63+
HeightRequest="{Binding ActivityIndicatorSize, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
6364
HorizontalOptions="Center"
64-
IsRunning="{Binding IsBusy, Source={x:Reference this}}"
65+
IsRunning="{Binding IsBusy, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
6566
TranslationY="35"
6667
VerticalOptions="Center"
67-
WidthRequest="{Binding ActivityIndicatorSize, Source={x:Reference this}}"
68-
Color="{Binding BusyColor, Source={x:Reference this}}" />
68+
WidthRequest="{Binding ActivityIndicatorSize, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
69+
Color="{Binding BusyColor, Source={x:Reference this}, x:DataType=fc:FreakyButton}" />
6970

7071
<ContentView
7172
Grid.Column="2"
7273
BackgroundColor="Transparent"
7374
CascadeInputTransparent="True"
74-
Content="{Binding TrailingIcon, Source={x:Reference this}}"
75-
HeightRequest="{Binding IconSize, Source={x:Reference this}}"
76-
IsVisible="{Binding TrailingIcon, Converter={StaticResource ContentToInvisibilityConverter}, Source={x:Reference this}}"
75+
Content="{Binding TrailingIcon, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
76+
HeightRequest="{Binding IconSize, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
77+
IsVisible="{Binding TrailingIcon, Converter={StaticResource ContentToInvisibilityConverter}, Source={x:Reference this}, x:DataType=fc:FreakyButton}"
7778
VerticalOptions="Center"
78-
WidthRequest="{Binding IconSize, Source={x:Reference this}}" />
79+
WidthRequest="{Binding IconSize, Source={x:Reference this}, x:DataType=fc:FreakyButton}" />
7980
</Grid>
8081
</Border>
8182
</ContentView>

MAUI.FreakyControls/MAUI.FreakyControls/FreakyChip/FreakyChip.xaml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,47 @@
66
xmlns:controls="clr-namespace:Maui.FreakyControls"
77
xmlns:freakyEffects="clr-namespace:Maui.FreakyEffects.TouchEffects;assembly=Maui.FreakyEffects"
88
x:Name="this"
9-
freakyEffects:TouchEffect.Color="{Binding AnimationColor, Source={x:Reference this}}">
9+
xmlns:fc="clr-namespace:Maui.FreakyControls"
10+
freakyEffects:TouchEffect.Color="{Binding AnimationColor, Source={x:Reference this}, x:DataType=fc:FreakyChip}">
1011
<Border
1112
x:Name="border"
12-
Padding="{Binding Padding, Source={x:Reference this}}"
13-
Stroke="{Binding Stroke, Source={x:Reference this}}"
14-
StrokeThickness="{Binding StrokeThickness, Source={x:Reference this}}">
13+
Padding="{Binding Padding, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
14+
Stroke="{Binding Stroke, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
15+
StrokeThickness="{Binding StrokeThickness, Source={x:Reference this}, x:DataType=fc:FreakyChip}">
1516
<Border.StrokeShape>
16-
<RoundRectangle CornerRadius="{Binding CornerRadius, Source={x:Reference this}}" />
17+
<RoundRectangle CornerRadius="{Binding CornerRadius, Source={x:Reference this}, x:DataType=fc:FreakyChip}" />
1718
</Border.StrokeShape>
1819
<Grid ColumnDefinitions="Auto, *, Auto">
1920
<controls:FreakySvgImageView
2021
x:Name="leadingIcon"
2122
Grid.Column="0"
22-
Base64String="{Binding LeadingBase64String, Source={x:Reference this}}"
23-
ImageColor="{Binding ImageColor, Source={x:Reference this}}"
23+
Base64String="{Binding LeadingBase64String, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
24+
ImageColor="{Binding ImageColor, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
2425
InputTransparent="True"
25-
ResourceId="{Binding LeadingResourceId, Source={x:Reference this}}"
26-
SvgAssembly="{Binding SvgAssembly, Source={x:Reference this}}"
26+
ResourceId="{Binding LeadingResourceId, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
27+
SvgAssembly="{Binding SvgAssembly, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
2728
SvgMode="AspectFit" />
2829
<Label
2930
x:Name="chipLabel"
3031
Grid.Column="1"
31-
FontAttributes="{Binding FontAttributes, Source={x:Reference this}}"
32-
FontAutoScalingEnabled="{Binding FontAutoScalingEnabled, Source={x:Reference this}}"
33-
FontFamily="{Binding FontFamily, Source={x:Reference this}}"
34-
FontSize="{Binding FontSize, Source={x:Reference this}}"
35-
HorizontalTextAlignment="{Binding HorizontalTextAlignment, Source={x:Reference this}}"
36-
Text="{Binding Text, Source={x:Reference this}}"
37-
TextDecorations="{Binding TextDecorations, Source={x:Reference this}}"
38-
TextTransform="{Binding TextTransform, Source={x:Reference this}}"
39-
TextType="{Binding TextType, Source={x:Reference this}}"
40-
VerticalTextAlignment="{Binding VerticalTextAlignment, Source={x:Reference this}}" />
32+
FontAttributes="{Binding FontAttributes, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
33+
FontAutoScalingEnabled="{Binding FontAutoScalingEnabled, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
34+
FontFamily="{Binding FontFamily, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
35+
FontSize="{Binding FontSize, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
36+
HorizontalTextAlignment="{Binding HorizontalTextAlignment, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
37+
Text="{Binding Text, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
38+
TextDecorations="{Binding TextDecorations, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
39+
TextTransform="{Binding TextTransform, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
40+
TextType="{Binding TextType, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
41+
VerticalTextAlignment="{Binding VerticalTextAlignment, Source={x:Reference this}, x:DataType=fc:FreakyChip}" />
4142
<controls:FreakySvgImageView
4243
x:Name="trailingIcon"
4344
Grid.Column="2"
44-
Base64String="{Binding TrailingBase64String, Source={x:Reference this}}"
45-
ImageColor="{Binding ImageColor, Source={x:Reference this}}"
45+
Base64String="{Binding TrailingBase64String, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
46+
ImageColor="{Binding ImageColor, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
4647
InputTransparent="True"
47-
ResourceId="{Binding TrailingResourceId, Source={x:Reference this}}"
48-
SvgAssembly="{Binding SvgAssembly, Source={x:Reference this}}"
48+
ResourceId="{Binding TrailingResourceId, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
49+
SvgAssembly="{Binding SvgAssembly, Source={x:Reference this}, x:DataType=fc:FreakyChip}"
4950
SvgMode="AspectFit" />
5051
</Grid>
5152
</Border>

MAUI.FreakyControls/MAUI.FreakyControls/FreakyCodeView/FreakyCodeView.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
x:Class="Maui.FreakyControls.FreakyCodeView"
44
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
6+
xmlns:fc="clr-namespace:Maui.FreakyControls"
67
x:Name="this">
78
<Grid>
89
<Entry x:Name="hiddenTextEntry" Opacity="0">
@@ -13,7 +14,7 @@
1314
</OnPlatform>
1415
</Entry.FontSize>
1516
</Entry>
16-
<HorizontalStackLayout x:Name="CodeItemContainer" Spacing="{Binding ItemSpacing, Source={x:Reference this}}">
17+
<HorizontalStackLayout x:Name="CodeItemContainer" Spacing="{Binding ItemSpacing, Source={x:Reference this}, x:DataType=fc:FreakyCodeView}">
1718
<HorizontalStackLayout.GestureRecognizers>
1819
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped" />
1920
</HorizontalStackLayout.GestureRecognizers>

MAUI.FreakyControls/MAUI.FreakyControls/FreakyCodeView/FreakyCodeView.xaml.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ namespace Maui.FreakyControls;
99
public partial class FreakyCodeView : ContentView
1010
{
1111
#region Events
12-
1312
public event EventHandler<FreakyCodeCompletedEventArgs> CodeEntryCompleted;
14-
1513
#endregion Events
1614

1715
#region Constructor and Initializations

0 commit comments

Comments
 (0)