Skip to content

Commit 127bc37

Browse files
committed
Merge branch 'fix-22507' of https://github.com/Dhivya-SF4094/maui into fix-22507
2 parents 0965507 + 28ea8c6 commit 127bc37

File tree

8 files changed

+126
-122
lines changed

8 files changed

+126
-122
lines changed
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
description: Branch classification configuration for repository
22
resource: repository
3+
disabled: false
34
configuration:
45
branchClassificationSettings:
56
defaultClassification: nonproduction
67
ruleset:
7-
- name: prod-branches
8-
branchNames:
9-
- main
10-
- release/*
11-
- net10.0
12-
- net9.0
13-
- inflight/current
14-
classification: production
8+
- name: prod-branches
9+
branchNames:
10+
- main
11+
- release/*
12+
- internal/release/*
13+
- net10.0
14+
- net9.0
15+
- inflight/current
16+
classification: production

eng/pipelines/azure-pipelines-internal.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ schedules:
2828
- main
2929
- net10.0
3030
- inflight/current
31+
always: true
3132

3233
variables:
3334
- template: /eng/common/templates/variables/pool-providers.yml@self

src/Controls/src/Core/RadioButton/RadioButton.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public partial class RadioButton : TemplatedView, IElementConfiguration<RadioBut
6060
public static readonly BindableProperty ValueProperty =
6161
BindableProperty.Create(nameof(Value), typeof(object), typeof(RadioButton), null,
6262
propertyChanged: (b, o, n) => ((RadioButton)b).OnValuePropertyChanged(),
63-
coerceValue: (b, o) => o ?? b);
63+
coerceValue: (b, o) => o ?? b);
6464

6565
/// <summary>Bindable property for <see cref="IsChecked"/>.</summary>
6666
public static readonly BindableProperty IsCheckedProperty = BindableProperty.Create(

src/Controls/src/Core/RadioButton/RadioButtonGroupController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,16 @@ void UpdateGroupNames(Element element, string name, string oldName = null)
135135

136136
void SetSelectedValue(object radioButtonValue)
137137
{
138-
if(object.Equals(_selectedValue, radioButtonValue))
138+
if (object.Equals(_selectedValue, radioButtonValue))
139139
{
140140
return;
141141
}
142142

143143
_selectedValue = radioButtonValue;
144144

145145
#pragma warning disable CS0618 // TODO: Remove when we internalize/replace MessagingCenter
146-
MessagingCenter.Send<Element, RadioButtonGroupValueChanged>(_layout, RadioButtonGroup.GroupValueChangedMessage,
147-
new RadioButtonGroupValueChanged(_groupName, RadioButtonGroup.GetVisualRoot(_layout), radioButtonValue));
146+
MessagingCenter.Send<Element, RadioButtonGroupValueChanged>(_layout, RadioButtonGroup.GroupValueChangedMessage,
147+
new RadioButtonGroupValueChanged(_groupName, RadioButtonGroup.GetVisualRoot(_layout), radioButtonValue));
148148
#pragma warning restore CS0618 // Type or member is obsolete
149149

150150
}

src/Controls/tests/Core.UnitTests/RadioButtonTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public void GroupNullSelectionClearsAnySelection()
262262
public void ValuePropertyCoercedToItselfIfSetToNull()
263263
{
264264
var radioButton = new RadioButton();
265-
265+
266266
Assert.Equal(radioButton, radioButton.Value);
267267

268268
radioButton.Value = null;

src/Controls/tests/TestCases.HostApp/Issues/Issue31520.cs

Lines changed: 107 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -3,121 +3,121 @@ namespace Maui.Controls.Sample.Issues;
33
[Issue(IssueTracker.Github, 31520, "NavigatingFrom is triggered first when using PushAsync", PlatformAffected.Android)]
44
public class Issue31520 : NavigationPage
55
{
6-
public static int count = 0;
7-
public static Label statusLabel;
8-
public static Issue31520Page2 currentPage2;
6+
public static int count = 0;
7+
public static Label statusLabel;
8+
public static Issue31520Page2 currentPage2;
99

10-
public Issue31520() : base(new Issue31520Page1())
11-
{
10+
public Issue31520() : base(new Issue31520Page1())
11+
{
1212

13-
}
13+
}
1414
}
1515

1616
public class Issue31520Page1 : ContentPage
1717
{
18-
public Issue31520Page1()
19-
{
20-
SetupPageContent();
21-
22-
Disappearing += (s, e) =>
23-
{
24-
Issue31520.count++;
25-
};
26-
27-
NavigatingFrom += (s, e) =>
28-
{
29-
if (Issue31520.statusLabel is not null)
30-
{
31-
Issue31520.statusLabel.Text = (Issue31520.count == 0)
32-
? "NavigatingFrom triggered before Disappearing"
33-
: "NavigatingFrom triggered after Disappearing";
34-
35-
Issue31520.currentPage2?.UpdateNavigatingStatusLabel();
36-
}
37-
};
38-
}
39-
40-
private void SetupPageContent()
41-
{
42-
Title = "Page 1";
43-
44-
Issue31520.statusLabel = new Label
45-
{
46-
Text = "Ready",
47-
AutomationId = "statusLabel"
48-
};
49-
50-
var button = new Button
51-
{
52-
Text = "Push",
53-
AutomationId = "PushButton"
54-
};
55-
button.Clicked += OnCounterClicked;
56-
57-
Content = new VerticalStackLayout
58-
{
59-
Padding = new Thickness(30, 0),
60-
Spacing = 25,
61-
Children =
62-
{
63-
Issue31520.statusLabel,
64-
button
65-
}
66-
};
67-
}
68-
69-
private void OnCounterClicked(object sender, EventArgs e)
70-
{
71-
Navigation.PushAsync(new Issue31520Page2());
72-
}
18+
public Issue31520Page1()
19+
{
20+
SetupPageContent();
21+
22+
Disappearing += (s, e) =>
23+
{
24+
Issue31520.count++;
25+
};
26+
27+
NavigatingFrom += (s, e) =>
28+
{
29+
if (Issue31520.statusLabel is not null)
30+
{
31+
Issue31520.statusLabel.Text = (Issue31520.count == 0)
32+
? "NavigatingFrom triggered before Disappearing"
33+
: "NavigatingFrom triggered after Disappearing";
34+
35+
Issue31520.currentPage2?.UpdateNavigatingStatusLabel();
36+
}
37+
};
38+
}
39+
40+
private void SetupPageContent()
41+
{
42+
Title = "Page 1";
43+
44+
Issue31520.statusLabel = new Label
45+
{
46+
Text = "Ready",
47+
AutomationId = "statusLabel"
48+
};
49+
50+
var button = new Button
51+
{
52+
Text = "Push",
53+
AutomationId = "PushButton"
54+
};
55+
button.Clicked += OnCounterClicked;
56+
57+
Content = new VerticalStackLayout
58+
{
59+
Padding = new Thickness(30, 0),
60+
Spacing = 25,
61+
Children =
62+
{
63+
Issue31520.statusLabel,
64+
button
65+
}
66+
};
67+
}
68+
69+
private void OnCounterClicked(object sender, EventArgs e)
70+
{
71+
Navigation.PushAsync(new Issue31520Page2());
72+
}
7373
}
7474

7575
public class Issue31520Page2 : ContentPage
7676
{
77-
private Label navigatingStatusLabel;
78-
79-
public Issue31520Page2()
80-
{
81-
Issue31520.currentPage2 = this;
82-
83-
Appearing += (s, e) =>
84-
{
85-
Issue31520.count++;
86-
};
87-
88-
Title = "Page 2";
89-
90-
var button = new Button
91-
{
92-
Text = "Pop",
93-
AutomationId = "ChildPageButton"
94-
};
95-
button.Clicked += OnButtonClicked;
96-
97-
navigatingStatusLabel = new Label
98-
{
99-
Text = Issue31520.statusLabel?.Text ?? "Ready",
100-
AutomationId = "NavigatingStatusLabel"
101-
};
102-
103-
Content = new StackLayout
104-
{
105-
Children =
106-
{
107-
navigatingStatusLabel,
108-
button
109-
}
110-
};
111-
}
112-
113-
public void UpdateNavigatingStatusLabel()
114-
{
115-
if (navigatingStatusLabel is not null && Issue31520.statusLabel is not null)
116-
navigatingStatusLabel.Text = Issue31520.statusLabel.Text;
117-
}
118-
119-
private void OnButtonClicked(object sender, EventArgs e)
120-
{
121-
Navigation.PopAsync();
122-
}
77+
private Label navigatingStatusLabel;
78+
79+
public Issue31520Page2()
80+
{
81+
Issue31520.currentPage2 = this;
82+
83+
Appearing += (s, e) =>
84+
{
85+
Issue31520.count++;
86+
};
87+
88+
Title = "Page 2";
89+
90+
var button = new Button
91+
{
92+
Text = "Pop",
93+
AutomationId = "ChildPageButton"
94+
};
95+
button.Clicked += OnButtonClicked;
96+
97+
navigatingStatusLabel = new Label
98+
{
99+
Text = Issue31520.statusLabel?.Text ?? "Ready",
100+
AutomationId = "NavigatingStatusLabel"
101+
};
102+
103+
Content = new StackLayout
104+
{
105+
Children =
106+
{
107+
navigatingStatusLabel,
108+
button
109+
}
110+
};
111+
}
112+
113+
public void UpdateNavigatingStatusLabel()
114+
{
115+
if (navigatingStatusLabel is not null && Issue31520.statusLabel is not null)
116+
navigatingStatusLabel.Text = Issue31520.statusLabel.Text;
117+
}
118+
119+
private void OnButtonClicked(object sender, EventArgs e)
120+
{
121+
Navigation.PopAsync();
122+
}
123123
}

src/Controls/tests/TestCases.HostApp/Issues/Issue7045.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ public partial class Issue7045 : Shell
99
public Issue7045()
1010
{
1111
InitializeComponent();
12-
NavigateButton.Clicked += async (s, e) => await Current.GoToAsync($"//DetialPage"); ;
12+
NavigateButton.Clicked += async (s, e) => await Current.GoToAsync($"//DetialPage");
13+
;
1314
DetailPage.BindingContext = this;
1415
}
1516
}

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31539.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS // BackButtonTitle is only applicable for iOS and macOS
1+
#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS // BackButtonTitle is only applicable for iOS and macOS
22
using NUnit.Framework;
33
using UITest.Appium;
44
using UITest.Core;

0 commit comments

Comments
 (0)