Skip to content

Commit d25eb07

Browse files
authored
Merge pull request #249 from TimLariviere/releases/0.29.0
0.29.0
2 parents 352c983 + a121f30 commit d25eb07

File tree

5 files changed

+25
-53
lines changed

5 files changed

+25
-53
lines changed

Directory.Build.props

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<Project>
22
<!-- NuGet Specs -->
33
<PropertyGroup>
4-
<Version>0.28.0</Version>
4+
<Version>0.29.0</Version>
55
<Authors>Fabulous Contributors</Authors>
6-
<PackageVersion>0.28.0</PackageVersion>
7-
<PackageReleaseNotes>Added a dispatch method accessible in the app projects (https://github.com/fsprojects/Fabulous/pull/240)
8-
Added a debounche helper function (https://github.com/fsprojects/Fabulous/pull/237)</PackageReleaseNotes>
6+
<PackageVersion>0.29.0</PackageVersion>
7+
<PackageReleaseNotes>BREAKING CHANGES:
8+
Replaced Minimum and Maximum properties of Slider/Stepper by a single MinimumMaximum property (tuple) (https://github.com/fsprojects/Fabulous/pull/246)
9+
Replaced the "fscd" daemon (embedded in the Fabulous.LiveUpdate package) by a new dotnet CLI tool "fabulous-cli". See https://fsprojects.github.io/Fabulous/tools.html for more informations. (https://github.com/fsprojects/Fabulous/pull/247)</PackageReleaseNotes>
910
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
1011
<PackageLicenseUrl>https://github.com/fsprojects/Fabulous/blob/master/LICENSE.md</PackageLicenseUrl>
1112
<PackageProjectUrl>https://github.com/fsprojects/Fabulous</PackageProjectUrl>

RELEASE_NOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#### 0.29.0
2+
3+
BREAKING CHANGES:
4+
* Replaced Minimum and Maximum properties of Slider/Stepper by a single MinimumMaximum property (tuple) (https://github.com/fsprojects/Fabulous/pull/246)
5+
* Replaced the "fscd" daemon (embedded in the Fabulous.LiveUpdate package) by a new dotnet CLI tool "fabulous-cli". See https://fsprojects.github.io/Fabulous/tools.html for more informations. (https://github.com/fsprojects/Fabulous/pull/247)
6+
17
#### 0.28.0
28

39
* Added a dispatch method accessible in the app projects (https://github.com/fsprojects/Fabulous/pull/240)

src/Fabulous.Core/Xamarin.Forms.Core.fs

Lines changed: 12 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,6 @@ type View() =
149149
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
150150
static member val _ValueChangedAttribKey : AttributeKey<_> = AttributeKey<_>("ValueChanged")
151151
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
152-
static member val _MaximumAttribKey : AttributeKey<_> = AttributeKey<_>("Maximum")
153-
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
154-
static member val _MinimumAttribKey : AttributeKey<_> = AttributeKey<_>("Minimum")
155-
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
156152
static member val _IncrementAttribKey : AttributeKey<_> = AttributeKey<_>("Increment")
157153
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
158154
static member val _IsToggledAttribKey : AttributeKey<_> = AttributeKey<_>("IsToggled")
@@ -3154,8 +3150,7 @@ type View() =
31543150
/// Builds the attributes for a Stepper in the view
31553151
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
31563152
static member inline BuildStepper(attribCount: int,
3157-
?maximum: double,
3158-
?minimum: double,
3153+
?minimumMaximum: float * float,
31593154
?value: double,
31603155
?increment: double,
31613156
?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit,
@@ -3191,15 +3186,13 @@ type View() =
31913186
?created: obj -> unit,
31923187
?ref: ViewRef) =
31933188

3194-
let attribCount = match maximum with Some _ -> attribCount + 1 | None -> attribCount
3195-
let attribCount = match minimum with Some _ -> attribCount + 1 | None -> attribCount
3189+
let attribCount = match minimumMaximum with Some _ -> attribCount + 1 | None -> attribCount
31963190
let attribCount = match value with Some _ -> attribCount + 1 | None -> attribCount
31973191
let attribCount = match increment with Some _ -> attribCount + 1 | None -> attribCount
31983192
let attribCount = match valueChanged with Some _ -> attribCount + 1 | None -> attribCount
31993193

32003194
let attribBuilder = View.BuildView(attribCount, ?horizontalOptions=horizontalOptions, ?verticalOptions=verticalOptions, ?margin=margin, ?gestureRecognizers=gestureRecognizers, ?anchorX=anchorX, ?anchorY=anchorY, ?backgroundColor=backgroundColor, ?heightRequest=heightRequest, ?inputTransparent=inputTransparent, ?isEnabled=isEnabled, ?isVisible=isVisible, ?minimumHeightRequest=minimumHeightRequest, ?minimumWidthRequest=minimumWidthRequest, ?opacity=opacity, ?rotation=rotation, ?rotationX=rotationX, ?rotationY=rotationY, ?scale=scale, ?style=style, ?styleClass=styleClass, ?translationX=translationX, ?translationY=translationY, ?widthRequest=widthRequest, ?resources=resources, ?styles=styles, ?styleSheets=styleSheets, ?classId=classId, ?styleId=styleId, ?automationId=automationId, ?created=created, ?ref=ref)
3201-
match maximum with None -> () | Some v -> attribBuilder.Add(View._MaximumAttribKey, (v))
3202-
match minimum with None -> () | Some v -> attribBuilder.Add(View._MinimumAttribKey, (v))
3195+
match minimumMaximum with None -> () | Some v -> attribBuilder.Add(View._MinimumMaximumAttribKey, (v))
32033196
match value with None -> () | Some v -> attribBuilder.Add(View._ValueAttribKey, (v))
32043197
match increment with None -> () | Some v -> attribBuilder.Add(View._IncrementAttribKey, (v))
32053198
match valueChanged with None -> () | Some v -> attribBuilder.Add(View._ValueChangedAttribKey, (fun f -> System.EventHandler<Xamarin.Forms.ValueChangedEventArgs>(fun _sender args -> f args))(v))
@@ -3220,21 +3213,17 @@ type View() =
32203213
// update the inherited View element
32213214
let baseElement = (if View.ProtoView.IsNone then View.ProtoView <- Some (View.View())); View.ProtoView.Value
32223215
baseElement.UpdateInherited (prevOpt, curr, target)
3223-
let mutable prevMaximumOpt = ValueNone
3224-
let mutable currMaximumOpt = ValueNone
3225-
let mutable prevMinimumOpt = ValueNone
3226-
let mutable currMinimumOpt = ValueNone
3216+
let mutable prevMinimumMaximumOpt = ValueNone
3217+
let mutable currMinimumMaximumOpt = ValueNone
32273218
let mutable prevValueOpt = ValueNone
32283219
let mutable currValueOpt = ValueNone
32293220
let mutable prevIncrementOpt = ValueNone
32303221
let mutable currIncrementOpt = ValueNone
32313222
let mutable prevValueChangedOpt = ValueNone
32323223
let mutable currValueChangedOpt = ValueNone
32333224
for kvp in curr.AttributesKeyed do
3234-
if kvp.Key = View._MaximumAttribKey.KeyValue then
3235-
currMaximumOpt <- ValueSome (kvp.Value :?> double)
3236-
if kvp.Key = View._MinimumAttribKey.KeyValue then
3237-
currMinimumOpt <- ValueSome (kvp.Value :?> double)
3225+
if kvp.Key = View._MinimumMaximumAttribKey.KeyValue then
3226+
currMinimumMaximumOpt <- ValueSome (kvp.Value :?> float * float)
32383227
if kvp.Key = View._ValueAttribKey.KeyValue then
32393228
currValueOpt <- ValueSome (kvp.Value :?> double)
32403229
if kvp.Key = View._IncrementAttribKey.KeyValue then
@@ -3245,26 +3234,15 @@ type View() =
32453234
| ValueNone -> ()
32463235
| ValueSome prev ->
32473236
for kvp in prev.AttributesKeyed do
3248-
if kvp.Key = View._MaximumAttribKey.KeyValue then
3249-
prevMaximumOpt <- ValueSome (kvp.Value :?> double)
3250-
if kvp.Key = View._MinimumAttribKey.KeyValue then
3251-
prevMinimumOpt <- ValueSome (kvp.Value :?> double)
3237+
if kvp.Key = View._MinimumMaximumAttribKey.KeyValue then
3238+
prevMinimumMaximumOpt <- ValueSome (kvp.Value :?> float * float)
32523239
if kvp.Key = View._ValueAttribKey.KeyValue then
32533240
prevValueOpt <- ValueSome (kvp.Value :?> double)
32543241
if kvp.Key = View._IncrementAttribKey.KeyValue then
32553242
prevIncrementOpt <- ValueSome (kvp.Value :?> double)
32563243
if kvp.Key = View._ValueChangedAttribKey.KeyValue then
32573244
prevValueChangedOpt <- ValueSome (kvp.Value :?> System.EventHandler<Xamarin.Forms.ValueChangedEventArgs>)
3258-
match prevMaximumOpt, currMaximumOpt with
3259-
| ValueSome prevValue, ValueSome currValue when prevValue = currValue -> ()
3260-
| _, ValueSome currValue -> target.Maximum <- currValue
3261-
| ValueSome _, ValueNone -> target.Maximum <- 1.0
3262-
| ValueNone, ValueNone -> ()
3263-
match prevMinimumOpt, currMinimumOpt with
3264-
| ValueSome prevValue, ValueSome currValue when prevValue = currValue -> ()
3265-
| _, ValueSome currValue -> target.Minimum <- currValue
3266-
| ValueSome _, ValueNone -> target.Minimum <- 0.0
3267-
| ValueNone, ValueNone -> ()
3245+
updateStepperMinimumMaximum prevMinimumMaximumOpt currMinimumMaximumOpt target
32683246
match prevValueOpt, currValueOpt with
32693247
| ValueSome prevValue, ValueSome currValue when prevValue = currValue -> ()
32703248
| _, ValueSome currValue -> target.Value <- currValue
@@ -3283,8 +3261,7 @@ type View() =
32833261
| ValueNone, ValueNone -> ()
32843262

32853263
/// Describes a Stepper in the view
3286-
static member inline Stepper(?maximum: double,
3287-
?minimum: double,
3264+
static member inline Stepper(?minimumMaximum: float * float,
32883265
?value: double,
32893266
?increment: double,
32903267
?valueChanged: Xamarin.Forms.ValueChangedEventArgs -> unit,
@@ -3321,8 +3298,7 @@ type View() =
33213298
?ref: ViewRef<Xamarin.Forms.Stepper>) =
33223299

33233300
let attribBuilder = View.BuildStepper(0,
3324-
?maximum=maximum,
3325-
?minimum=minimum,
3301+
?minimumMaximum=minimumMaximum,
33263302
?value=value,
33273303
?increment=increment,
33283304
?valueChanged=valueChanged,
@@ -11050,12 +11026,6 @@ module ViewElementExtensions =
1105011026
/// Adjusts the ValueChanged property in the visual element
1105111027
member x.ValueChanged(value: Xamarin.Forms.ValueChangedEventArgs -> unit) = x.WithAttribute(View._ValueChangedAttribKey, (fun f -> System.EventHandler<Xamarin.Forms.ValueChangedEventArgs>(fun _sender args -> f args))(value))
1105211028

11053-
/// Adjusts the Maximum property in the visual element
11054-
member x.Maximum(value: double) = x.WithAttribute(View._MaximumAttribKey, (value))
11055-
11056-
/// Adjusts the Minimum property in the visual element
11057-
member x.Minimum(value: double) = x.WithAttribute(View._MinimumAttribKey, (value))
11058-
1105911029
/// Adjusts the Increment property in the visual element
1106011030
member x.Increment(value: double) = x.WithAttribute(View._IncrementAttribKey, (value))
1106111031

@@ -11684,12 +11654,6 @@ module ViewElementExtensions =
1168411654
/// Adjusts the ValueChanged property in the visual element
1168511655
let valueChanged (value: Xamarin.Forms.ValueChangedEventArgs -> unit) (x: ViewElement) = x.ValueChanged(value)
1168611656

11687-
/// Adjusts the Maximum property in the visual element
11688-
let maximum (value: double) (x: ViewElement) = x.Maximum(value)
11689-
11690-
/// Adjusts the Minimum property in the visual element
11691-
let minimum (value: double) (x: ViewElement) = x.Minimum(value)
11692-
1169311657
/// Adjusts the Increment property in the visual element
1169411658
let increment (value: double) (x: ViewElement) = x.Increment(value)
1169511659

src/Fabulous.CustomControls/Fabulous.CustomControls.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<Compile Include="Controls.fs" />
1414
</ItemGroup>
1515
<ItemGroup>
16+
<PackageReference Include="FSharp.Core" />
1617
<PackageReference Include="Xamarin.Forms" />
1718
</ItemGroup>
1819
<Import Project="..\..\Packages.targets" />

templates/content/blank/.template.config/template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"type": "parameter",
139139
"dataType": "string",
140140
"replaces": "FabulousPkgsVersion",
141-
"defaultValue": "0.28.0"
141+
"defaultValue": "0.29.0"
142142
},
143143
"NewtonsoftJsonPkg": {
144144
"type": "parameter",

0 commit comments

Comments
 (0)