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

Question: show shimmer while scrolling fast #7

Open
ydv0121 opened this issue Jun 15, 2021 · 8 comments
Open

Question: show shimmer while scrolling fast #7

ydv0121 opened this issue Jun 15, 2021 · 8 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ydv0121
Copy link

ydv0121 commented Jun 15, 2021

is it possible to show shimmer in whitespace when scrolling fast in big list?

@ydv0121 ydv0121 changed the title feature-request/ show shimmer while scroll fast feature-request/ show shimmer while scrolling fast Jun 15, 2021
@ydv0121 ydv0121 changed the title feature-request/ show shimmer while scrolling fast Question: show shimmer while scrolling fast Jun 15, 2021
@marcocesarato marcocesarato added the enhancement New feature or request label Jun 15, 2021
@marcocesarato
Copy link
Owner

Hi @ydv0121 , this isn't possibile because the blank space is a space from the last item to the end of the scrollview (not visibile) and if we sobstitute it with items the performance drops but there is a possible workaround to make an illusion of a shimmer. This workaround is to add a Image as repeated background. So in the end users should choice the image to repeat (like an image with a single stripe) or a component similar (like a react-native-svg that do the same thing)

Here and example with a repeated image:

test.mp4

If this is a good solution for you I can implement it.

@ydv0121
Copy link
Author

ydv0121 commented Jun 16, 2021

@marcocesarato yes it's great instead of white spaces in big list.
Thanks

marcocesarato added a commit that referenced this issue Jun 16, 2021
marcocesarato added a commit that referenced this issue Jun 16, 2021
marcocesarato added a commit that referenced this issue Jun 16, 2021
@marcocesarato
Copy link
Owner

Added on 1.3.8 as experimental feature. I have encountered problems with screen resolutions and image resolution so this feature needs to be refined.

Using placeholder={true} you will see the default placeholder.
Using placeholderImage={require('./assets/yourImage.png')} you can set your pattern of image to repeat.
Using placeholderComponent you can set a component like an svg.

Let me know if you run into any issues and how this feature can be improved.

@marcocesarato
Copy link
Owner

I saw some bugs on android, so it need some improvements.

@ydv0121
Copy link
Author

ydv0121 commented Jun 17, 2021

yes there is also UI glitch. so it's not good idea to show shimmer in white space?

@marcocesarato
Copy link
Owner

yes there is also UI glitch. so it's not good idea to show shimmer in white space?

Probably the best solution is to use and SVG pattern or find a similar solution, but at the moment it's better don't implement an SVG pattern as default (because need a to add a new dependency) until found a new solution.

@marcocesarato marcocesarato added the help wanted Extra attention is needed label Jun 19, 2021
@dougg0k
Copy link

dougg0k commented Jun 25, 2021

You could give the option and recommend the svg library to whoever is using and want shimmer. Maybe even restrict and make it required so no glitchs appear.

@ydv0121
Copy link
Author

ydv0121 commented Jun 26, 2021

i am trying to integrate this module with biglist https://github.com/tomzaku/react-native-shimmer-placeholder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants