-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[RNMobile] Update Slider to reflect changes immediately #22421
Conversation
Size Change: 0 B Total Size: 1.16 MB ℹ️ View Unchanged
|
…-control' into rnmobile/feat/real-time-range-control
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.
LGTM!
One thing to mention for future references is that the PR description is a bit outdated because both the block list optimization and the transient edits issues were addressed. ✅
I need to NOTE that it is not a performant way of doing that kind of thing in React Native since the communication is async and we can lose frames. Especially in our case, because there are a lot of things that happen on each change of attribute. We shouldn't rely on the value from redux when we "animate" the height etc.
I agree with this, luckily after the optimizations you did in the other PRs it is working fine for these cases. But definitely something to keep in mind.
I tested the Spacer
Buttons
and Cover
blocks on both main apps and demo for iOS and Android.
Great work @dratwas !
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.
Thanks for your review! @lukewalczak I pushed new changes that fix the issue you mentioned. Could you please check it? :) |
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.
Input issue is fixed! 🎉
Hey @lukewalczak could you please re-check that one more time? After a long time all blockers are resolved and I updated this PR :) |
I've observed one more issue: there is an option to add mutiple |
Hey, @geriux could you please check this PR one more time? Luke is on holidays now :) I already fixed the issue with multiple dots. Now adding of dots is not allowed if the |
Of course! will do 👍 |
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.
LGTM!
Tested it on both iOS and Android, following the test cases and also different tests with Cover, Columns / Column (Using decimals), Latest posts, and Buttons block.
Nice work!
Description
This PR fixes wordpress-mobile/gutenberg-mobile#2192
gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#2286
In this PR i use
onValueChange
instead ofonSlidingComplete
to set the value.Outdated
Unfortunately in the current state, it is laggy because of performance issues in block-list. (The whole app is re-rendered on every change). I tried these changes with that PR (https://github.com//pull/22144) - and it works much better. I suggest merging the PR with optimization first.I need to NOTE that it is not a performant way of doing that kind of thing in React Native since the communication is async and we can lose frames. Especially in our case, because there are a lot of things that happen on each change of attribute. We shouldn't rely on the value from redux when we "animate" the height etc. It doesn't mean that we shouldn't use
onValueChange
instead ofonSlidingComplete
but we should change how it is handled in Block. As an example, In the spacer block, we could rely on the local state and set the attribute with a debounce effect. Thanks to that the height should be more responsive because right now I can feel the delay.There is also an issue with the undo mechanism that I described here - wordpress-mobile/gutenberg-mobile#2192 (comment)
This issue was fixed, however it introduced a regression and had to be reverted.
How has this been tested?
2
Outdated
In the current state, the undo level is created for every change that means 10 undo levels will be created when sliding from 0 to 10 (https://github.com/wordpress-mobile/gutenberg-mobile/issues/2192#issuecomment-630010164)Screenshots
Types of changes
Update Range Control to reflect changes immediately
Checklist: