react-native-masonry icon indicating copy to clipboard operation
react-native-masonry copied to clipboard

v0.5.0 Release Candidate

Open brh55 opened this issue 6 years ago • 12 comments

Current Release: v0.5.0-alpha.1 Released as alpha as it fixes major bugs in v0.4.0 and is stable enough. Once everything has properly been vetted, we will release as stable.

Tasks

  • [x] Add priority arrangement (#5)
  • [x] Fix duplicated images (#81, #41, #61)
  • [x] Add Infinite Loading (#87)
  • [ ] Pass key properties
  • [ ] Finish testing
  • [ ] Update readme documentation

Bugs

Please post any bugs and issues on here

brh55 avatar Jun 12 '18 17:06 brh55

Duplicate image issue has been resolved in v0.5.0, but other two issues still persist. Although, single column render issue is not consistent on ios but it is consistent on android. I am attaching an image as a reference. Is there any quick fix for this? and the second issue is left biased render as you can see in ios simulator.

41281508-6c53a854-6de6-11e8-9a50-0ba9bac4e9c8

ahmedjamshed avatar Jun 12 '18 17:06 ahmedjamshed

@ahmedjamshed what are "other two issues" exactly?

brh55 avatar Jun 12 '18 17:06 brh55

Issues still persist are

  1. left biased rendering as you can see on ios simulator
  2. Single column rendering on Android and sometimes on ios as well, when images are cached

ahmedjamshed avatar Jun 12 '18 17:06 ahmedjamshed

  1. Left bias is default behavior, it will load based on what is resolved first. But with v0.5.0, not documented yet, you can use priority='balance', and it will do best effort to balance columns based on current state.

brh55 avatar Jun 12 '18 19:06 brh55

  1. Not entirely sure, I haven't done any testing on android. I would believe it has to do with some intermediate state changes during image fetching.

brh55 avatar Jun 12 '18 20:06 brh55

Can I improve that by returning false in shouldcomponentupdate until images are fully loaded? I can check that with fast image. or can you suggest any another solution ?

ahmedjamshed avatar Jun 13 '18 06:06 ahmedjamshed

@ahmedjamshed The problem is bricks are resolved async so you'll probably run into issues there. Considering using redux to manage the async state, or migrate data.task to the new version which supports task cancellation and cancelled any unresolved bricks in component state.

brh55 avatar Jun 13 '18 18:06 brh55

@brh55 Also support infinite loading

srameshr avatar Jun 22 '18 07:06 srameshr

@srameshr My apologize, I was referring to lazy loading, but in actuality I mistaken it with infinite loading. Optimized loading is already handled with flatlist.

You can use onEndReached and a onEndReachedThreshold

brh55 avatar Jun 22 '18 17:06 brh55

@brh55

When I pass some navigation action as an onPress handler to bricks all my bricks suddenly disappear.

I think this is caused by resolveBricks called with an empty bricks array here: https://github.com/brh55/react-native-masonry/blob/v0.5.0/components/Masonry.js#L102

In my case, the data is not changing after onPress so brickDiff is an empty array (and appendedData is true): screen shot 2018-06-27 at 20 27 13

so resolveBricks is called like this:

		if (appendedData) {
			const offSet = this.props.bricks.length;
			this.setState({
				_uniqueCount
			}, this.resolveBricks({...nextProps, bricks:[]}, offSet));
		}

sashabratchikov avatar Jun 27 '18 16:06 sashabratchikov

Hi @brh55 great project.

You might want to consider https://github.com/Flipkart/recyclerlistview as a replacement of ListView to improve performance

dkt201474 avatar Jul 08 '18 02:07 dkt201474

Hi, any plan to releasing this new version ?

lc3t35 avatar Dec 02 '18 13:12 lc3t35