From 4b9c1396c53d29f0d0724f21e46ed43fc5cbc8c5 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 13 Nov 2019 23:44:47 +0000 Subject: [PATCH 1/2] [Build] Update version numbers to ship from yaml (#8437) * Update version numbers * Update Version.targets * Fix variables * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml * Update azure-pipelines.yml --- Version.targets | 16 +++++++++++----- azure-pipelines.yml | 15 ++++++++++++++- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Version.targets b/Version.targets index 301489cbb..841f927c3 100644 --- a/Version.targets +++ b/Version.targets @@ -1,22 +1,24 @@  nightly + pre\d $(SYSTEM_PULLREQUEST_TARGETBRANCH) $(BUILD_SOURCEBRANCHNAME) - - $(NightlyTag) - -$(GitSemVerLabel) - - + + $([System.Text.RegularExpressions.Regex]::Match($(GitTag), $(RegexPre))) + $(PreOut) + $(NightlyTag) + -$(GitSemVerLabel) + @@ -34,7 +36,11 @@ +$(VersionMetadataLabel) $(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch) $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)$(VersionMetadataPlusLabel) + $(GitSemVerMajor).$(GitSemVerMinor).$(GitBaseVersionPatch).$(BUILDVERSION)$(GitSemVerDashLabel)$(VersionMetadataPlusLabel) + $(GitSemVerMajor).$(GitSemVerMinor).$(GitBaseVersionPatch).$(BUILDVERSION42)$(GitSemVerDashLabel)$(VersionMetadataPlusLabel) + $(GitSemVerMajor).$(GitSemVerMinor).$(GitBaseVersionPatch).$(BUILDVERSION43)$(GitSemVerDashLabel)$(VersionMetadataPlusLabel) + $(GitSemVerMajor).$(GitSemVerMinor).$(GitBaseVersionPatch).$(BUILDVERSION44)$(GitSemVerDashLabel)$(VersionMetadataPlusLabel) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b304802d2..673d0194c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,13 @@ variables: - name: SolutionFile value: Xamarin.Forms.sln - name: BuildVersion - value: $[counter('$(Build.SourceBranchName)_counter', 1)] + value: $[counter(variables['Build.SourceBranch'], 1)] +- name: BuildVersion42 + value: $[counter('4.2.0', 910311)] +- name: BuildVersion43 + value: $[counter('4.3.0', 991211)] +- name: BuildVersion44 + value: $[counter('4.4.0', 991210)] - name: NUGET_VERSION value: 5.0.2 - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE @@ -44,6 +50,13 @@ pr: - 4.* - 3.* +schedules: +- cron: "0 0 * * *" + displayName: Daily midnight build + branches: + include: + - master + jobs: - template: build/steps/build-windows.yml parameters: From ab0d3f12684059efb3a805094fb1a302b88806a5 Mon Sep 17 00:00:00 2001 From: Jon Robinson Levy Date: Fri, 15 Nov 2019 14:54:35 +0100 Subject: [PATCH 2/2] Fix 7361 - [UWP] Stepper buttons not becoming enabled again, when disabled more than once. (#8191) * Adding test class Issue7361 * Adding checks to prevent PseudoDisable from being called once _plus- or _minusStateCache is set. * Improving Instructions in Issue7361 test page. --- .../Issue7361.cs | 99 +++++++++++++++++++ ...rin.Forms.Controls.Issues.Shared.projitems | 1 + Xamarin.Forms.Platform.UAP/StepperControl.cs | 8 +- 3 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7361.cs diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7361.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7361.cs new file mode 100644 index 000000000..e5c4d7134 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7361.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; + +namespace Xamarin.Forms.Controls.Issues +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.Github, 7361, "[UWP] Stepper display error when using Slider", PlatformAffected.UWP)] + public class Issue7361 : TestContentPage + { + Slider TheSlider; + Stepper TheStepper; + Label ValueLabel; + + public Issue7361() + { + Title = "Issue 7361"; + } + + protected override void Init() + { + StackLayout layout = new StackLayout(); + layout.Orientation = StackOrientation.Vertical; + + var instructions = new Label + { + Margin = new Thickness(6), + Text = "Slide slider to the extreme Right and Left, check that the Stepper to the right's +/- buttons work as expected, " + + "becoming disabled at the Max and Min positions of the Slider, and then enabled again as the Slider moves towards the center." + }; + + StackLayout controlsLayout = new StackLayout(); + controlsLayout.Orientation= StackOrientation.Horizontal; + controlsLayout.HorizontalOptions = LayoutOptions.FillAndExpand; + + TheSlider = new Slider + { + Maximum = 100, + Minimum = 1, + HorizontalOptions = LayoutOptions.FillAndExpand, + MinimumTrackColor = Color.LightPink, + MaximumTrackColor = Color.LightPink + }; + controlsLayout.Children.Add(TheSlider); + + TheStepper = new Stepper + { + Maximum = 100, + Minimum = 1, + Increment = 1 + }; + controlsLayout.Children.Add(TheStepper); + + StackLayout labelLayout = new StackLayout(); + labelLayout.Orientation = StackOrientation.Horizontal; + labelLayout.HorizontalOptions = LayoutOptions.FillAndExpand; + + Label valueHeaderLabel = new Label + { + Text = "Value:", + FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)) + }; + labelLayout.Children.Add(valueHeaderLabel); + + ValueLabel = new Label + { + Text = "", + FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)) + }; + labelLayout.Children.Add(ValueLabel); + + layout.Children.Add(instructions); + layout.Children.Add(controlsLayout); + layout.Children.Add(labelLayout); + + Content = layout; + + TheSlider.Value = 50; + TheStepper.Value = 50; + TheSlider.ValueChanged += SliderChanged; + TheStepper.ValueChanged += StepperChanged; + } + + private void SliderChanged(object sender, ValueChangedEventArgs e) + { + TheStepper.Value = e.NewValue; + ValueLabel.Text = e.NewValue.ToString(); + } + + private void StepperChanged(object sender, ValueChangedEventArgs e) + { + TheSlider.Value = e.NewValue; + ValueLabel.Text = e.NewValue.ToString(); + } + } + +} diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems index a38a000da..1ab2bfb39 100644 --- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems @@ -33,6 +33,7 @@ Code + Code diff --git a/Xamarin.Forms.Platform.UAP/StepperControl.cs b/Xamarin.Forms.Platform.UAP/StepperControl.cs index 4c7fd1713..5c010a59c 100644 --- a/Xamarin.Forms.Platform.UAP/StepperControl.cs +++ b/Xamarin.Forms.Platform.UAP/StepperControl.cs @@ -223,17 +223,17 @@ namespace Xamarin.Forms.Platform.UWP double increment = Increment; if (_plus != null) { - if (value + increment > Maximum) + if (value + increment > Maximum && _plusStateCache is null) _plusStateCache = PseudoDisable(_plus); - else + else if (value + increment <= Maximum) PsuedoEnable(_plus, ref _plusStateCache); } if (_minus != null) { - if (value - increment < Minimum) + if (value - increment < Minimum && _minusStateCache is null) _minusStateCache = PseudoDisable(_minus); - else + else if (value - increment >= Minimum) PsuedoEnable(_minus, ref _minusStateCache); } }