-
Notifications
You must be signed in to change notification settings - Fork 10
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
Deep linking (closes #331) #338
Deep linking (closes #331) #338
Conversation
fddf95e
to
263c024
Compare
@arcturus r? (ping-pong sorry) |
@@ -0,0 +1,6 @@ | |||
|
|||
module.exports = { | |||
INCOMPLETE: 'incomplete', |
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.
FETCHING
isFetching: false, | ||
value: null, | ||
}, | ||
items: {}, |
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.
itemsCache
?
@@ -2,8 +2,8 @@ | |||
* Dependencies |
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.
Change filename to item-detail.js
@@ -0,0 +1,101 @@ | |||
'use strict'; |
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.
-> item-container.js
@@ -5,8 +5,8 @@ | |||
*/ |
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.
list-item.js
openItem: PropTypes.string, | ||
items: PropTypes.object, | ||
setOpenItem: PropTypes.func, | ||
dispatch: PropTypes.func.isRequired, |
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.
Maybe can remove some of these?
const items = state.itemsNearby | ||
.map(url => resolveItem(url)) | ||
.filter(item => !!item); | ||
function mapStateToProps({ items, itemsNearby, userFlags, indicateScanning }) { |
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.
Remove items
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.
Ignore
@@ -35,20 +35,25 @@ class ApiMetadata: ApiBase { | |||
// | |||
// data["objects"] = elems |
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.
Remove comment
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.
*Update
Follow ups:
|
@wilsonpage after rebasing to latest master (it has a patch from @samgiles for react-native version) it does kind of work in iphone. It at least tryies to load the view, it loads the basic, and then the app dies cause an exception in the new postArray method, need to debug more to understand whats going on. |
More feedback about what's going on. It's important to take into account the environment where I am, surronded by beacons that we constantly receive, so I have hundreds of calls to app render scene home in a matter of 10 seconds. Either that or we are constantly triggering model change, and also calling fetchItemIfNeeded even if it's going to end soon, we still have an enormous number of calls to that function. That is making the animation to open the item to be very slow and to compite for resources. When we load an item that is in the cache everything seems to work ok. |
Yes, I can confirm that in the simulator without so many update cause of btle beacons everything works way smoother. We can consider this like an aggressive environment, but we should think on adding some throttling to that update coming from BLE. |
Change redux state architecture to fetch/resolve items on demand Our data architecture was modelled around a single view that holds items found nearby. With the addtional of deep linking and the ability to render items that may not be nearby we needed to decouple 'nearby items' from 'items' in our app state and provide way to load item data when an item hasn't come from the scanner.
f672a67
to
0f723ff
Compare
|
Shiiiiip it once travis is green :) |
No description provided.