-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Blazor API Review: UIEventArgs types #12550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@SteveSandersonMS - I see you as the main arbiter of what data should exposed from the DOM here. One thought I had - do we want |
It used to be used by the framework to know what |
Action items:
|
@javiercn - can you do a pass here and see if there's anything on these types that doesn't make sense in Blazor? IE: we expose something that you can't realistically use. |
Hmmm, it's hard to make sense of a lot of these things without knowing the context they are being used on. For other things, Id recommend looking at the typescript definitions https://github.com/microsoft/TypeScript/blob/master/lib/lib.dom.d.ts |
We copied a lot of this based on the .ts definitions already. |
Fixes: #12550 Removes UIEventArgs in favor of EventArgs as the base class. Moving Type into all of our event args types - this is important because many of the events types are used for multiple events. The only think about this that isn't perfect is that we have keep special casing change because of how binding works. I renamed the type to drop the `UI` prefix. It's not possible to define a subclass in the Web project because of the way covariance works (or doesn't work) in .NET.
Fixes: #12550 Removes UIEventArgs in favor of EventArgs as the base class. Moving Type into all of our event args types - this is important because many of the events types are used for multiple events. The only think about this that isn't perfect is that we have keep special casing change because of how binding works. I renamed the type to drop the `UI` prefix. It's not possible to define a subclass in the Web project because of the way covariance works (or doesn't work) in .NET.
Fixes: #12550 Removes UIEventArgs in favor of EventArgs as the base class. Moving Type into all of our event args types - this is important because many of the events types are used for multiple events. The only think about this that isn't perfect is that we have keep special casing change because of how binding works. I renamed the type to drop the `UI` prefix. It's not possible to define a subclass in the Web project because of the way covariance works (or doesn't work) in .NET.
I have found this change breaking many things. |
It's been renamed to |
Summary
These are the eventargs types used to dispatch events in Blazor. These are split into general events in the
M.A.Components
library and web-specific events in theM.A.Components.Web
library.The
UIEventArgs
type is the base class for event payloads. TheUIChangeEventArgs
type has to be in this layer because it's used by bind. For these types we want to make sure we're not exposing too much web.The other types in the
.Web
library map directly to DOM types and should reflect the underlying data. However, we want to review these are remove members that are misleading. If there are things that can't be used in any useful way, we should probably not have them as part of the API.Components APIs
Web APIs
The text was updated successfully, but these errors were encountered: