-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Migrate setNativeProps to state in OptionsSelector #11053
Comments
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
We had to revert the migration because a regression here - #11239 This is the only related change that caused it. And it is expected because we're using controlled selection (async setState). App/src/components/OptionsSelector/BaseOptionsSelector.js Lines 253 to 254 in 813b3d4
|
Exploring a fix |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a production regression has occurred a Root Cause Analysis is required. Please follow the instructions here. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
1 similar comment
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a production regression has occurred a Root Cause Analysis is required. Please follow the instructions here. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
no updates here. couldn't make time |
Update: I have no idea what was causing the regression and how to fix it #11239 Thoughts: The following reasons make me think that it's a purely performance related issue. To fix it, we'll have to make OptionsSelector more performant.
App/src/components/OptionsSelector/BaseOptionsSelector.js Lines 253 to 254 in 813b3d4
^ It's the most basic form of controlled selection.
|
@luacmartins @roryabraham I'm curious about your thoughts on #11053 (comment) How should we proceed?
|
Can't promise anything, but I'm going try looking into this a bit |
I think this is correct. There's a noticeable delay between user input and state update, which was not present with
I'm fine with this. FWIW we already have inconsistent behavior with the Split Bill page for example, where selecting a participant completely clears the input. iou.mov |
Agree that this is an acceptable cost.
Agree, though it might be possible that this performance regression could be further alleviated by using |
@roryabraham I know that you're looking into this, but it looks like we all agree that solution # 1 (get rid of controlled selection) is the way to go. Please let me know if I should create a PR to replace controlled selection with clearing the input (as shown here #11053 (comment)) |
@rushatgabhane yes, let's move on with getting rid of controlled selection. |
I don't feel great about losing that feature, let's be sure to create a follow-up issue to try re-implementing after Fabric is enabled |
Tracking issue #11679 |
Hey, just want to add to the discussion that this.textInputRef.setSelection(start, end) This way we can avoid having controlled inputs which are bad for performance + preserve the highlight functionality. (note: sorry if I am writing out of context, was just quickly glimpsing and thought this information might adds value) |
Thanks, that's very helpful @hannojg! @luacmartins @roryabraham However setSelectionRange doesn't work on web. It prevents me from selecting rows!! Spent time on this, but I'm not sure what I'm not wrong. Screen.Recording.2022-10-11.at.9.17.36.PM.mov |
Yes, i can give it a shot, although I am heavily focused on mobile, but will def try! |
Sorry @rushatgabhane but where is the PR where you started working on it? Would like to continue from there |
@hannojg my bad, I had made a typo 🤦♂️😭
|
Not sure why this isn't closed, but we can close it! #8503 (comment) |
Coming from #8503, enabling Fabric requires us to migrate off setNativeProps. We should move usages of setNativeProps to state in OptionsSelector
The text was updated successfully, but these errors were encountered: