Open SteveSandersonMS opened 3 years ago
- This one looks like a genuine bug in WebForms hosting. If we want the sync context semantics to be the same across all hosting models, looks like more work is needed.
We want the semantics to be the same, otherwise libraries won't work properly.
Lazy loading isn't really applicable on WebView, but we should consider whether we want it to work anyway so that the same components would work across WebAssembly and WebView
Yeah, lazy-loading won't practically work in WebView the same way it does on WASM. We can probably have an implementation of WebViewLazyAssemblyLoader
that virtually no-ops when invoked so that components are cross-compat.
Looking pretty good in Android so far...
❓ = unknown / not tested | ❌ = doesn't work | ✔ = works |
---|
Scenario | WPF | WinForms | MAUI WinUI | MAUI MacCat | MAUI iOS | MAUI Droid | Comments |
---|---|---|---|---|---|---|---|
1. AddRemoveChildComponents (Add/remove child components) |
✔ | ✔ | |||||
2. AfterRenderInteropComponent (After-render interop component) |
✔ | ✔ | |||||
3. AsyncEventHandlerComponent (Async event handlers) |
✔ | ✔ | |||||
4. AuthTest.AuthRouter (Auth cases) |
❌ | ❌ | |||||
5. AuthTest.CascadingAuthenticationStateParent (Cascading authentication state) |
❌ | ❌ | |||||
6. BindCasesComponent (bind cases) |
✔ | ||||||
7. CascadingValueTest.CascadingValueSupplier (Cascading values) |
✔ | ||||||
8. ComponentRefComponent (Component ref component) |
✔ | ||||||
9. ConcurrentRenderParent (Concurrent rendering) |
✔ | ||||||
10. ConfigurationComponent (Configuration) |
❌ | ||||||
11. ContentEditable (Content-editable) |
✔ | ||||||
12. CounterComponent (Counter) |
✔ | ||||||
13. CounterComponentUsingChild (Counter using child component) |
✔ | ||||||
14. CounterComponentWrapper (Counter wrapped in parent) |
✔ | ||||||
15. CulturePicker (Culture Picker) |
❌ | ||||||
16. DataDashComponent (data-* attribute rendering) |
✔ | ||||||
17. DispatchingComponent (Dispatching to sync context) |
|||||||
18. DuplicateAttributesComponent (Duplicate attributes) |
|||||||
19. DynamicComponentRendering (DynamicComponent rendering) |
|||||||
20. ElementFocusComponent (Element focus component) |
|||||||
21. ElementRefComponent (Element ref component) |
|||||||
22. ErrorComponent (Error throwing) |
|||||||
23. ErrorBoundaryTest.ErrorBoundaryContainer (Error boundary cases) |
|||||||
24. EventBubblingComponent (Event bubbling) |
|||||||
25. EventCallbackTest.EventCallbackCases (EventCallback) |
|||||||
26. EventCustomArgsComponent (Event custom arguments) |
|||||||
27. EventDisablingComponent (Event disabling) |
|||||||
28. EventDuringBatchRendering (Event during batch rendering) |
|||||||
29. EventPreventDefaultComponent (Event preventDefault) |
|||||||
30. ExternalContentPackage (External content package) |
|||||||
31. FocusEventComponent (Focus events) |
|||||||
32. Forms.InputFocusComponent (Input Focus) |
|||||||
33. Forms.NotifyPropertyChangedValidationComponent (INotifyPropertyChanged validation) |
|||||||
34. Forms.SimpleValidationComponent (Simple validation) |
|||||||
35. Forms.SimpleValidationComponentUsingExperimentalValidator (Simple validation using experimental validator) |
|||||||
36. Forms.TypicalValidationComponent (Typical validation) |
|||||||
37. Forms.TypicalValidationComponentUsingExperimentalValidator (Typical validation using experimental validator) |
|||||||
38. Forms.InputFileComponent (Input file) |
|||||||
39. NavigateOnSubmit (Navigate to submit) |
|||||||
40. GlobalizationBindCases (Globalization Bind Cases) |
|||||||
41. GracefulTermination (Graceful Termination) |
|||||||
42. HierarchicalImportsTest.Subdir.ComponentUsingImports (Imports statement) |
|||||||
43. HtmlBlockChildContent (ChildContent HTML Block) |
|||||||
44. HtmlEncodedChildContent (ChildContent HTML Encoded Block) |
|||||||
45. HtmlMixedChildContent (ChildContent Mixed Block) |
|||||||
46. HttpClientTest.BinaryHttpRequestsComponent (Binary HttpClient tester) |
|||||||
47. HttpClientTest.CookieCounterComponent (HttpClient cookies) |
|||||||
48. HttpClientTest.HttpRequestsComponent (HttpClient tester) |
|||||||
49. InputEventComponent (Input events) |
|||||||
50. InteropComponent (Interop component) |
|||||||
51. InteropOnInitializationComponent (Interop on initialization) |
|||||||
52. JsonSerializationCases (JSON serialization) |
|||||||
53. KeyCasesComponent (Key cases) |
|||||||
54. KeyPressEventComponent (Key press event) |
|||||||
55. LaggyTypingComponent (Laggy typing) |
|||||||
56. LimitCounterComponent (Limit counter component) |
|||||||
57. LocalizedText (Localized Text) |
|||||||
58. LogicalElementInsertionCases (Logical element insertion cases) |
|||||||
59. LoggingComponent (Logging) |
|||||||
60. LongRunningInterop (Long running interop) |
|||||||
61. MarkupBlockComponent (Markup blocks) |
|||||||
62. MouseEventComponent (Mouse events) |
|||||||
63. MovingCheckboxesComponent (Moving checkboxes diff case) |
|||||||
64. MultipleChildContent (Multiple child content) |
|||||||
65. NavigationFailureComponent (Navigation failure) |
|||||||
66. ParentChildComponent (Parent component with child) |
|||||||
67. PropertiesChangedHandlerParent (Parent component that changes parameters on child) |
|||||||
68. RazorTemplates (Razor Templates) |
|||||||
69. Reconnection.ReconnectionComponent (Reconnection server-side blazor) |
|||||||
70. RedTextComponent (Red text) |
|||||||
71. ReliabilityComponent (Server reliability component) |
|||||||
72. RenderFragmentToggler (Render fragment renderer) |
|||||||
73. RenderAttributesBeforeConnectedCallback (Render attributes before ConnectedCallback) |
|||||||
74. ReorderingFocusComponent (Reordering focus retention) |
|||||||
75. RouterTest.NavigationManagerComponent (NavigationManager Test) |
|||||||
76. RouterTest.TestRouter (Router) |
|||||||
77. RouterTest.TestRouterWithOnNavigate (Router with OnNavigate) |
|||||||
78. RouterTest.TestRouterWithLazyAssembly (Router with dynamic assembly) |
|||||||
79. RouterTest.TestRouterWithAdditionalAssembly (Router with additional assembly) |
|||||||
80. SelectVariantsComponent (Select with component options) |
|||||||
81. SignalRClientComponent (SignalR client) |
|||||||
82. StringComparisonComponent (StringComparison) |
|||||||
83. SvgComponent (SVG) |
|||||||
84. TextOnlyComponent (Plain text) |
|||||||
85. ToggleEventComponent (Toggle Event) |
|||||||
86. TouchEventComponent (Touch events) |
|||||||
87. VirtualizationComponent (Virtualization) |
|||||||
88. VirtualizationDataChanges (Virtualization data changes) |
|||||||
89. HotReload.RenderOnHotReload (Render on hot reload) |
The pending work here is to automate using Photino in the dotnet/aspnetcore repo.
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
We now have test apps that can run the Blazor E2E tests from
BasicTestApp
within a WinForms or WPFBlazorWebView
(see https://github.com/dotnet/aspnetcore/pull/31021). This represents the majority of Blazor's E2E test cases. Most already pass without trouble, some fail for expected reasons (they aren't applicable scenarios, or can't work until SWA is added), and a few fail unexpectedly and probably indicate a missing piece of implementation or an actual bug. This issue is to track getting them all to work or at least explaining why they aren't applicable.Note that I've only checked the following within WinForms hosting, just because I got to it first. There's no reason to think that WPF or MAUI hosting would behave differently (except if MAUI is on Mono, in which case certain dependency edge cases could vary).
Test cases
[x] BasicTestApp.AddRemoveChildComponents (Add/remove child components)
[x] BasicTestApp.AfterRenderInteropComponent (After-render interop component)
[x] BasicTestApp.AsyncEventHandlerComponent (Async event handlers)
[ ] BasicTestApp.AuthTest.AuthRouter (Auth cases)
[ ] BasicTestApp.AuthTest.CascadingAuthenticationStateParent (Cascading authentication state)
[x] BasicTestApp.BindCasesComponent (bind cases)
[x] BasicTestApp.CascadingValueTest.CascadingValueSupplier (Cascading values)
[x] BasicTestApp.ComponentRefComponent (Component ref component)
[x] BasicTestApp.ConcurrentRenderParent (Concurrent rendering)
[ ] BasicTestApp.ConfigurationComponent (Configuration)
IWebAssemblyHostEnvironment
.[x] BasicTestApp.ContentEditable (Content-editable)
[x] BasicTestApp.CounterComponent (Counter)
[x] BasicTestApp.CounterComponentUsingChild (Counter using child component)
[x] BasicTestApp.CounterComponentWrapper (Counter wrapped in parent)
[ ] BasicTestApp.CulturePicker (Culture Picker)
[x] BasicTestApp.DataDashComponent (data- attribute rendering)
[ ] BasicTestApp.DispatchingComponent (Dispatching to sync context)
[x] BasicTestApp.DuplicateAttributesComponent (Duplicate attributes)
[x] BasicTestApp.DynamicComponentRendering (DynamicComponent rendering)
[x] BasicTestApp.ElementFocusComponent (Element focus component)
[x] BasicTestApp.ElementRefComponent (Element ref component)
[x] BasicTestApp.ErrorComponent (Error throwing)
[x] BasicTestApp.EventBubblingComponent (Event bubbling)
[x] BasicTestApp.EventCallbackTest.EventCallbackCases (EventCallback)
[x] BasicTestApp.EventCustomArgsComponent (Event custom arguments)
[x] BasicTestApp.EventDisablingComponent (Event disabling)
[x] BasicTestApp.EventDuringBatchRendering (Event during batch rendering)
[x] BasicTestApp.EventPreventDefaultComponent (Event preventDefault)
[x] BasicTestApp.ExternalContentPackage (External content package)
[x] BasicTestApp.FocusEventComponent (Focus events)
[x] BasicTestApp.FormsTest.InputFocusComponent (Input Focus)
[x] BasicTestApp.FormsTest.NotifyPropertyChangedValidationComponent (INotifyPropertyChanged validation)
[x] BasicTestApp.FormsTest.SimpleValidationComponent (Simple validation)
[ ] BasicTestApp.FormsTest.SimpleValidationComponentUsingExperimentalValidator (Simple validation using experimental validator)
Could not load type 'BasicTestApp.FormsTest.SimpleValidationComponentUsingExperimentalValidator'
[x] BasicTestApp.FormsTest.TypicalValidationComponent (Typical validation)
[ ] BasicTestApp.FormsTest.TypicalValidationComponentUsingExperimentalValidator (Typical validation using experimental validator)
Could not load type 'BasicTestApp.FormsTest.TypicalValidationComponentUsingExperimentalValidator'
[x] BasicTestApp.FormsTest.InputFileComponent (Input file)
[ ] BasicTestApp.NavigateOnSubmit (Navigate to submit)
[x] BasicTestApp.GlobalizationBindCases (Globalization Bind Cases)
[ ] BasicTestApp.GracefulTermination (Graceful Termination)
[x] BasicTestApp.HierarchicalImportsTest.Subdir.ComponentUsingImports (Imports statement)
[x] BasicTestApp.HtmlBlockChildContent (ChildContent HTML Block)
[x] BasicTestApp.HtmlEncodedChildContent (ChildContent HTML Encoded Block)
[x] BasicTestApp.HtmlMixedChildContent (ChildContent Mixed Block)
[ ] BasicTestApp.HttpClientTest.BinaryHttpRequestsComponent (Binary HttpClient tester)
HttpClient
is independent of the code here. Validating it in more detail requires figuring out exactly what the automated tests would do (e.g., which URLs they request).[ ] BasicTestApp.HttpClientTest.CookieCounterComponent (HttpClient cookies)
HttpClient
is independent of the code here. Validating it in more detail requires figuring out exactly what the automated tests would do (e.g., which URLs they request).[ ] BasicTestApp.HttpClientTest.HttpRequestsComponent (HttpClient tester)
HttpClient
is independent of the code here. Validating it in more detail requires figuring out exactly what the automated tests would do (e.g., which URLs they request).[x] BasicTestApp.InputEventComponent (Input events)
[x] BasicTestApp.InteropComponent (Interop component)
[x] BasicTestApp.InteropOnInitializationComponent (Interop on initialization)
[x] BasicTestApp.JsonSerializationCases (JSON serialization)
[x] BasicTestApp.KeyCasesComponent (Key cases)
[x] BasicTestApp.KeyPressEventComponent (Key press event)
[x] BasicTestApp.LaggyTypingComponent (Laggy typing)
[x] BasicTestApp.LimitCounterComponent (Limit counter component)
[x] BasicTestApp.LocalizedText (Localized Text)
[x] BasicTestApp.LogicalElementInsertionCases (Logical element insertion cases)
[ ] BasicTestApp.LoggingComponent (Logging)
[x] BasicTestApp.LongRunningInterop (Long running interop)
[x] BasicTestApp.MarkupBlockComponent (Markup blocks)
[x] BasicTestApp.MouseEventComponent (Mouse events)
[x] BasicTestApp.MovingCheckboxesComponent (Moving checkboxes diff case)
[x] BasicTestApp.MultipleChildContent (Multiple child content)
[x] BasicTestApp.NavigationFailureComponent (Navigation failure)
[x] BasicTestApp.ParentChildComponent (Parent component with child)
[x] BasicTestApp.PropertiesChangedHandlerParent (Parent component that changes parameters on child)
[x] @GetTestServerProjectComponent("Components.TestServer.ProtectedBrowserStorageUsageComponent") (Protected browser storage usage)
ProtectedBrowserStorage
doesn't make sense in WebView (same as in WebAssembly)[x] @GetTestServerProjectComponent("Components.TestServer.ProtectedBrowserStorageInjectionComponent") (Protected browser storage injection)
ProtectedBrowserStorage
doesn't make sense in WebView (same as in WebAssembly)[x] BasicTestApp.RazorTemplates (Razor Templates)
[x] BasicTestApp.Reconnection.ReconnectionComponent (Reconnection server-side blazor)
[x] BasicTestApp.RedTextComponent (Red text)
[x] BasicTestApp.ReliabilityComponent (Server reliability component)
[x] BasicTestApp.RenderFragmentToggler (Render fragment renderer)
[x] BasicTestApp.RenderAttributesBeforeConnectedCallback (Render attributes before ConnectedCallback)
[x] BasicTestApp.ReorderingFocusComponent (Reordering focus retention)
[x] BasicTestApp.RouterTest.NavigationManagerComponent (NavigationManager Test)
[ ] BasicTestApp.RouterTest.TestRouter (Router)
[ ] BasicTestApp.RouterTest.TestRouterWithOnNavigate (Router with OnNavigate)
[ ] BasicTestApp.RouterTest.TestRouterWithLazyAssembly (Router with dynamic assembly)
LazyAssemblyLoader
[ ] BasicTestApp.RouterTest.TestRouterWithAdditionalAssembly (Router with additional assembly)
[x] BasicTestApp.SelectVariantsComponent (Select with component options)
[ ] BasicTestApp.SignalRClientComponent (SignalR client)
[x] BasicTestApp.StringComparisonComponent (StringComparison)
[x] BasicTestApp.SvgComponent (SVG)
[x] BasicTestApp.TextOnlyComponent (Plain text)
[x] BasicTestApp.ToggleEventComponent (Toggle Event)
[ ] BasicTestApp.TouchEventComponent (Touch events)
[x] BasicTestApp.VirtualizationComponent (Virtualization)
[x] BasicTestApp.VirtualizationDataChanges (Virtualization data changes)