-
Notifications
You must be signed in to change notification settings - Fork 141
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
getListing exclude deleted items #720
Conversation
I'm waiting for this since we added it to the spec. "Nobody currently uses it" is a complete non-argument, when people can't currently use it with this library, since it was added to the spec, and while people are waiting for it. I'm still waiting for it for the initial reasons we added it to the spec. If you just don't want to do it now, be honest and keep the bug open, but don't say we intentionally leave it out of the library, although we added it to the spec in -02, because nobody uses it. Thanks. |
Cool, thanks! |
How is that a +1? I haven't reviewed yet. |
* listing.forEach(function(item) { | ||
* console.log(item); | ||
* }); | ||
* //listing is for instance: |
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.
This doesn't make sense. You just put a random object in a function in usable example code.
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.
fixed (if I understood your objection correctly)
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.
Yes, now it's usable, but I found the old example better somehow. But that's just me.
+1 |
+1 |
Thanks! Merged in 10187bb |
I changed my mind about the fix for #652, for two reasons:
I think we should do it this way. We already have a breaking change in the getListing interface anyway, so we may as well simplify it this way.
People can retrieve Content-Type information with getFile or getObject. I don't think any apps are currently using the other two pieces of metadata (ETag and Content-Length) now. In fact, I think most apps are not even using the Content-Type. For JSON-data it's irrelevant, and we can be sure no apps are looking at the Content-Type of binary documents, because -beta3 will be the first release in which retrieving binary documents actually works at all. :)
I wouldn't be opposed to adding a getMetaData function, though. But this will only start to make proper sense starting December 2014, when all servers are guaranteed to support HEAD requests.
For completeness, these are the problems I ran into:
sync.markChildren
is for. So that's where this metadata can be found. So far, so good.sync.needsFetch
https://github.com/remotestorage/remotestorage.js/blob/master/src/sync.js#L271. We would then also need to change cachinglayer.getLatest to return the remote metadata if it exists. And if we do it properly, we should actually also move this metadata to the 'common' version insync.autoMergeDocument
, unless the caching strategy is 'ALL', because there's no reason to leave that in the 'remote' version if we're not going to also fetch the body. But currently when creating a remote version with only metadata, we're postponing the change event until the body is also available. But that would be impossible if we're storing metadata of nodes we're not planning to fetch, so then I can't really oversee if these changes may also affect how and when remote change events are triggered.