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

add placeholder functionality #409

Closed
wants to merge 5 commits into from
Closed

add placeholder functionality #409

wants to merge 5 commits into from

Conversation

baldarian
Copy link

Display placeholder in case image is loading or happened any errors.

@dlferro
Copy link

dlferro commented Feb 19, 2019

Curious to see if any performance testing has been done with this. I believe I've done something similar in the past, however I ran into issues with 100+ instances running.

@baldarian
Copy link
Author

Curious to see if any performance testing has been done with this. I believe I've done something similar in the past, however I ran into issues with 100+ instances running.

@baldarian baldarian closed this Feb 20, 2019
@baldarian baldarian reopened this Feb 20, 2019
@baldarian
Copy link
Author

Curious to see if any performance testing has been done with this. I believe I've done something similar in the past, however I ran into issues with 100+ instances running.

Currently our app uses this feature. Haven't noticed any issues.

@smkhalsa
Copy link

Is there anything pending before this can get merged?

@EgidioCaprino
Copy link

We'd love to see this merged too

Copy link

@badeleux badeleux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing types for ts, and flow

@baldarian
Copy link
Author

Missing types for ts, and flow

added ✔️

@baldarian
Copy link
Author

The error thrown by CI is related to the version of node.
Check here for more information: jestjs/jest#8069

@Ilphrin
Copy link

Ilphrin commented Apr 12, 2019

This PR adds exactly what we need, is there anything blocking the merge? :3

@EgidioCaprino
Copy link

@Ilphrin nobody knows...

@Ilphrin
Copy link

Ilphrin commented Apr 12, 2019

@DylanVann Do you need help in maintaining the package or managing the PRs? Your project is really cool, and as our team rely on it, that would be awesome if new features/fixes arrives :D

@@ -82,6 +82,7 @@ export interface OnProgressEvent {

export interface FastImageProperties {
source: FastImageSource | number
placeholder?: React.ReactNode
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can allow number here too? So that one could write:

import myPlaceholderPicture from 'src/images/myPlaceholderPicture.png';

....
	<FastImage source={{ uri: myUri }} placeholder={myPlaceholderPicture} />

Instead of being forced to do this, for example:

import { Image } from 'react-native';
import myPlaceholderPicture from 'src/images/myPlaceholderPicture.png';

....
	<FastImage source={{ uri: myUri }} placeholder={<Image source={myPlaceHolderImage}} />} />

Though I am assuming that the default placeholder for an image is another image.

@ivanmoskalev
Copy link

@Ilphrin same offer, see #462

@Ilphrin
Copy link

Ilphrin commented May 6, 2019

@baldarian any news on this PR? :3 There is a conflict in index.js and I've made a proposal for a fix. When this is ok Dylan can take a look at this I think ^^

@pampang
Copy link

pampang commented May 23, 2019

It would be pretty cool if this new feature can be merged into the project.

@Ilphrin
Copy link

Ilphrin commented May 23, 2019

Sure! But before theses conflicts need to be resolved :/

@@ -2,6 +2,8 @@ module.exports = {
parser: 'babel-eslint',
env: {
es6: true,
browser: true,
node: true,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, why did you modified the eslintrc? ^^

@gmapnl
Copy link

gmapnl commented Jun 12, 2019

Up ! This feature will be very useful, when can we have it ? :)

@osikes
Copy link

osikes commented Jun 27, 2019

Would be very excited if this were to be merged. Without placeholder, this library isn't very useful to me.

@dwatring
Copy link

Also necessary for my needs.

@Ilphrin
Copy link

Ilphrin commented Jul 4, 2019

@gmapnl @osikes @dwatring This PR has a few conflicting files, the author needs to fix these conflicts before Dylan can review this :/

@osikes
Copy link

osikes commented Jul 4, 2019

(Just my 2 cents), after digging around more into the very awesome react-native-fast-image 🔥 , I don't think this PR is a good solution for placeholder. The PR #498, is a much better solution for iOS, as it lets the native side do it's thang. This PR has timeouts, which i get very nervous about performance over bridge, especially thinking of lists of hundreds of images, all relying on placeholder prop.

The placeholder support on android glide, is supported in a newer version of glide as well.

@lucasfeijo
Copy link

Can't believe this hasn't been merged yet.

@Ilphrin
Copy link

Ilphrin commented Jul 5, 2019

@osikes Oh that's cool you looked that much into it! #498 is cool but it is sad that it only adds support for iOS, having both would be cool, even though as a first step I guess it'd be ok. What do you think @DylanVann? :3

@lucasfeijo this project is the work of people who use their spare time to give devs a pretty awesome tool, you just need to be patient, and if you wish to make things go faster you can always help ;)

@lucasfeijo
Copy link

lucasfeijo commented Jul 5, 2019

@Ilphrin I wasn't trying to be condescending, just disappointed, I would love to help, but I just stumbled upon this issue in my project (lack of placeholder) recently, I'll try to see if I can be of any help.

@Ilphrin
Copy link

Ilphrin commented Jul 6, 2019

No problem text messages can be easily misunderstood ;) If you can help that'd be awesome!
In our team we have the exact same issue with the placeholder, don't worry I know your feeling xD

@bogdancochioras-clarisoft

Can this be resolved and merged? It would be a nice feature.

@Peretz30
Copy link

hey guys, any updates?

@bintoll
Copy link

bintoll commented Jan 21, 2020

Hello! Really wonder to see this merged =)

@tatiesmars
Copy link

how much work is left? I wonder if this could be merged so we could all used a placeholder and drop some custom implementation that we all probably doing.

@ferranuap
Copy link

Any plan on merge this? Thanks.

@baldarian baldarian closed this Apr 5, 2020
@PeterOla
Copy link

PeterOla commented Nov 1, 2021

2021
Still no update on placeholder

@fukemy
Copy link

fukemy commented Apr 14, 2022

this lib is DEAD?

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.