-
Notifications
You must be signed in to change notification settings - Fork 58
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
UIP-2762 More convenient ubiquitous access of DOM/aria props #119
UIP-2762 More convenient ubiquitous access of DOM/aria props #119
Conversation
RavenNumber of Findings: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -243,12 +243,16 @@ class Accessor { | |||
/// The error message displayed when the accessor is not set. | |||
final String requiredErrorMessage; | |||
|
|||
/// Whether to skip generating an accessor for this field. | |||
final bool doNotGenerate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a constant annotation for this? @doNotGenerate
obviously not needed for this PR but might be nice for later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I thought about adding one but decided against it since this won't be used very often (we haven't had a need for it until now).
QA +10
Merging. |
Ultimate problem:
I was bored after work yesterday 😄
Adding aria/DOM props to components is a little clunky; you have to do something like this:
What would be nicer is a syntax like this:
How it was fixed:
aria
anddom
getters toUbiquitousDomPropsMixin
that provide typed views into a givenUiProps
class that allow for reading/writing aria/DOM props.doNotGenerate
option to@Accessor()
annotation to allow declaring fields in accessor (props, props mixin, state, state mixin) classes that shouldn't be generated into key-value-pair-backed getters/setters.aria
/dom
getters.Testing suggestions:
Potential areas of regression:
This could break consumer code if they've declared props named
aria
ordom
.