Skip to content
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: updating scrollview reseting scroll position #223

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JonnyBGod
Copy link

When adding, removing and updating items inside a scrollview it was rebuilding the node from scratch causing it to break the scroll experience by reseting the position to 0.

This way the ViewSequence is reused as according to best practices and the user experience becomes as expected.

I also took the liberty to make it more performant when removing items.

When adding, removing and updating items inside a scrollview it was rebuilding the node from scratch causing it to break the scroll experience by reseting the position to 0.

This way the ViewSequence is reused as according to best practices and the user experience becomes as expected.

I also took the liberty to make it more performant when removing items.
@zackbrown
Copy link
Contributor

Hey @JonnyBGod — thanks for this contribution! This will be a welcome performance enhancement for fa-scrollview. Could you please sign Famo.us's CLA so that we can merge this in? http://famo.us/cla

@JonnyBGod
Copy link
Author

Thank you.
Will sight the Famo.us http://famo.us/’s CLA.

Give me a couple of days to double check everything as I am still not fully satisfied with how the directive handles surfaces height changes.

On 08 Oct 2014, at 23:03, Zack Brown [email protected] wrote:

Hey @JonnyBGod https://github.com/JonnyBGod — thanks for this contribution! This will be a welcome performance enhancement for fa-scrollview. Could you please sign Famo.us's CLA so that we can merge this in?http://famo.us/cla http://famo.us/cla

Reply to this email directly or view it on GitHub #223 (comment).

@JonnyBGod
Copy link
Author

CLA signed

@zackbrown
Copy link
Contributor

Alright, thanks! As for managing surface height changes, that should be (and is) the responsibility of the Famo.us layer rather than the Famo.us/Angular layer.

We're about ready to flip the switch on Famo.us 0.3.0 in Famo.us/Angular—0.3.0 has a significantly improved Scrollview, including support for true-sized children. https://github.com/Famous/famous/blob/master/CHANGELOG.md

With that in mind, do you feel good about merging this in?

@JonnyBGod
Copy link
Author

Yes I just realised that the height problem is in famous layer.
As for version 0.3.0, I tested this PR with 0.3.0-rc and works fine.

With that said, feel free to merge.

On 09 Oct 2014, at 21:42, Zack Brown [email protected] wrote:

Alright, thanks! As for managing surface height changes, that should be (and is) the responsibility of the Famo.us layer rather than the Famo.us/Angular layer.

We're about ready to flip the switch on Famo.us 0.3.0 in Famo.us/Angular—0.3.0 has a significantly improved Scrollview, including support for true-sized children.https://github.com/Famous/famous/blob/master/CHANGELOG.md https://github.com/Famous/famous/blob/master/CHANGELOG.md
With that in mind, do you feel good about merging this in?


Reply to this email directly or view it on GitHub #223 (comment).

@JonnyBGod
Copy link
Author

Just to leave for future reference.

At the moment with version 0.3.0-rc you it is possible to use surfaces with [undefined, true] size.
However, for some reason you have to set it on the surface and cannot use fa-size on the modifier.

Also, it is not currently updating the positioning when the height of a surface changes. I guess we will have to wait for Famous/famous#122 to be replicated on scrollviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants