Skip to content

Commit 2861d10

Browse files
authored
Users/vnbaaij/several fixes (#1464)
* Fix #1450 * Fix #1448 * Fix demo notification center panel * Revert editor.config changes * Fix Tests
1 parent 55d58bc commit 2861d10

12 files changed

+27
-25
lines changed

.editorconfig

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,26 +270,26 @@ dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
270270

271271
dotnet_naming_symbols.interface.applicable_kinds = interface
272272
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
273-
dotnet_naming_symbols.interface.required_modifiers =
273+
dotnet_naming_symbols.interface.required_modifiers =
274274

275275
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
276276
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
277-
dotnet_naming_symbols.types.required_modifiers =
277+
dotnet_naming_symbols.types.required_modifiers =
278278

279279
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
280280
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
281-
dotnet_naming_symbols.non_field_members.required_modifiers =
281+
dotnet_naming_symbols.non_field_members.required_modifiers =
282282

283283
# Naming styles
284284

285-
dotnet_naming_style.pascal_case.required_prefix =
286-
dotnet_naming_style.pascal_case.required_suffix =
287-
dotnet_naming_style.pascal_case.word_separator =
285+
dotnet_naming_style.pascal_case.required_prefix =
286+
dotnet_naming_style.pascal_case.required_suffix =
287+
dotnet_naming_style.pascal_case.word_separator =
288288
dotnet_naming_style.pascal_case.capitalization = pascal_case
289289

290290
dotnet_naming_style.begins_with_i.required_prefix = I
291-
dotnet_naming_style.begins_with_i.required_suffix =
292-
dotnet_naming_style.begins_with_i.word_separator =
291+
dotnet_naming_style.begins_with_i.required_suffix =
292+
dotnet_naming_style.begins_with_i.word_separator =
293293
dotnet_naming_style.begins_with_i.capitalization = pascal_case
294294

295295
# Default severity for analyzer diagnostics with category 'Usage'
@@ -338,4 +338,4 @@ end_of_line = lf
338338
indent_size = 4
339339
tab_width = 4
340340
end_of_line = crlf
341-
charset = utf-8-bom
341+
charset = utf-8-bom

examples/Demo/Shared/Components/NotificationCenterPanel.razor

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
<FluentStack>
77
<FluentSpacer />
8-
98
<FluentAnchor Appearance="@Appearance.Hypertext" Href="" OnClick="@(e => MessageService.Clear(App.MESSAGES_NOTIFICATION_CENTER) )">
109
Dismiss all
1110
</FluentAnchor>

src/Core/Components/List/FluentSelect.razor

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@namespace Microsoft.FluentUI.AspNetCore.Components
1+
@namespace Microsoft.FluentUI.AspNetCore.Components
22
@inherits ListComponentBase<TOption>
33
@typeparam TOption
44
<CascadingValue Value="_internalListContext" Name="ListContext" TValue="InternalListContext<TOption>" IsFixed="true">
@@ -15,9 +15,8 @@
1515
appearance="@Appearance.ToAttributeValue()"
1616
current-value="@Value"
1717
required="@Required"
18-
1918
@onkeydown="@OnKeydownHandlerAsync"
2019
@attributes="AdditionalAttributes">
2120
@_renderOptions
2221
</fluent-select>
23-
</CascadingValue>
22+
</CascadingValue>

src/Core/Components/List/ListComponentBase.razor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,10 @@ protected virtual async Task OnKeydownHandlerAsync(KeyboardEventArgs e)
531531
return;
532532
}
533533

534-
var id = await Module!.InvokeAsync<string>("getAriaActiveDescendant", Id);
534+
// This delay is needed for WASM to be able to get the updated value of the active descendant.
535+
// Without it, the value sometimes lags behind and you then need two keypresses to move to the next/prev option.
536+
await Task.Delay(1);
537+
string? id = await Module!.InvokeAsync<string>("getAriaActiveDescendant", Id);
535538

536539
FluentOption<TOption> item = _internalListContext.Options.First(i => i.Id == id);
537540

src/Core/Components/Slider/FluentSlider.razor

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@namespace Microsoft.FluentUI.AspNetCore.Components
1+
@namespace Microsoft.FluentUI.AspNetCore.Components
22
@inherits FluentInputBase<TValue>
33
@typeparam TValue
44
@attribute [CascadingTypeParameter(nameof(TValue))]
@@ -13,7 +13,8 @@
1313
orientation="@Orientation.ToAttributeValue()"
1414
mode="@Mode.ToAttributeValue()"
1515
id="@Id"
16-
@bind-value="CurrentValueAsString"
16+
@bind-value="@CurrentValueAsString"
17+
current-value="@CurrentValueAsString"
1718
disabled="@Disabled"
1819
name=@Name
1920
required=@Required>

src/Core/Components/Toast/FluentToast.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
Appearance="Appearance.Hypertext"
3535
@onfocusin="@PauseTimeout"
3636
@onfocusout="@ResumeTimeout"
37-
@onclick="HandleTopActionClick">
37+
OnClick="HandleTopActionClick">
3838
@_parameters.TopAction
3939
</FluentAnchor>
4040
break;
@@ -56,7 +56,7 @@
5656
Appearance="Appearance.Hypertext"
5757
@onfocusin="@PauseTimeout"
5858
@onfocusout="@ResumeTimeout"
59-
@onclick="HandlePrimaryActionClick">
59+
OnClick="HandlePrimaryActionClick">
6060
@_parameters.PrimaryAction
6161
</FluentAnchor>
6262
}
@@ -68,7 +68,7 @@
6868
Appearance="Appearance.Hypertext"
6969
@onfocusin="@PauseTimeout"
7070
@onfocusout="@ResumeTimeout"
71-
@onclick="HandleSecondaryActionClick">
71+
OnClick="HandleSecondaryActionClick">
7272
@_parameters.SecondaryAction
7373
</FluentAnchor>
7474
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
<fluent-slider class="horizontal" min="0" max="100" step="10" id="xxx" value="0" blazor:onchange="1" blazor:elementreference="xxx"></fluent-slider>
2+
<fluent-slider class="horizontal" min="0" max="100" step="10" id="xxx" current-value="0" value="0" blazor:onchange="1" blazor:elementreference="xxx"></fluent-slider>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
<fluent-slider class="horizontal" min="-1.5" max="7" step="0.5" id="xxx" value="3.5" blazor:onchange="1" blazor:elementreference="xxx"></fluent-slider>
2+
<fluent-slider class="horizontal" min="-1.5" max="7" step="0.5" id="xxx" current-value="3.5" value="3.5" blazor:onchange="1" blazor:elementreference="xxx"></fluent-slider>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
<fluent-slider class="horizontal" min="0" max="100" step="10" orientation="horizontal" id="xxx" value="0" blazor:onchange="1" blazor:elementreference="xxx"></fluent-slider>
2+
<fluent-slider class="horizontal" min="0" max="100" step="10" orientation="horizontal" id="xxx" current-value="0" value="0" blazor:onchange="1" blazor:elementreference="xxx"></fluent-slider>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
<fluent-slider class="vertical" min="0" max="100" step="10" orientation="vertical" id="xxx" value="0" blazor:onchange="1" blazor:elementreference="xxx"></fluent-slider>
2+
<fluent-slider class="vertical" min="0" max="100" step="10" orientation="vertical" id="xxx" current-value="0" value="0" blazor:onchange="1" blazor:elementreference="xxx"></fluent-slider>

0 commit comments

Comments
 (0)