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
fix: delegate should be set on nativeTextViewProtected #8881
Conversation
just like textfields. Fixes components extending this one
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.
Interesting -- I have to be honest, having nativeTextViewProtected
confuses me, and I was thinking maybe either something legacy, or potentially a extended class might have it own separate nativeTextViewProtected
.
So I just scanned the entire NS source code for nativeTextViewProtected
to see if their is somewhere that this is actually using a variable and not just the textbase.getter. It is used 178 times in the code; however ALL of them extend text-base-common so they all are using the getter that returns nativeViewProtected
as the value that is being changed.
It is used in:
Label, editable-text-base, text-view, text-field, and finally text-base. However all of them extend text-base; which is where they get access to the getter nativeTextViewProtected
which is just a getter that returns nativeViewProtected
Can anyone think of a good reason to not rename all instances of nativeTextViewProtected
back to nativeViewProtected
to simplify the codebase? (However leaving the nativeTextViewProtected
getter so that we don't break any third party plugin code...)
Please note nativeViewProtected
is used by View
which is one of the base classes ALL views extend from, so having the name change in a few of the components but be still mapped to the same base value seems confusing to me...
Edit: this comment makes more sense AFTER the review -- it was done after the review; so realize that this is after I made comments on the code changes..
Please dont do that. That was done in a effort with the old N team to make it work with material native plugins where a text field/textview is made of 2 views : the layout and the actual text field. So some properties must be applied to one and some to the other. This brings a lot of flexibility to plugins developers. By changing that you will break all my material plugins ! |
This comment was marked as abuse.
This comment was marked as abuse.
I told you it helps in separating what should be applied to the textview and what should be applied to the layout. And of course you will break plugins if you remove it ! |
This comment was marked as abuse.
This comment was marked as abuse.
Really bold, uppercase? Seriously.... It fixes delegate being set on the wrong view on iOS (the layout and not the view).if |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
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.
Based on the code Igor linked me to; I believe this is a valid use case to eliminate extra work on the plugin author without being a major issue for the framework. We do need to document this getter and we created a PR #8886 and any comments would be helpful
just like textfields. Fixes components extending this one
just like textfields. Fixes components extending this one
PR Checklist
What is the current behavior?
What is the new behavior?
Fixes/Implements/Closes #[Issue Number].