Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Hide empty outings in feed #2149

Merged
merged 1 commit into from
Aug 1, 2018
Merged

Hide empty outings in feed #2149

merged 1 commit into from
Aug 1, 2018

Conversation

cbeauchesne
Copy link
Member

This small modification will hide empty outings in home page.

It handle the case where cards are on user page, and in this case, it won't hide anything.

Copy link
Member

@brunobesson brunobesson left a comment

Choose a reason for hiding this comment

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

This should work. The problem is IMHO that this should be handled from the API side instead.
Anyway, to go forward, we could merge this in a first step. @asaunier what do you think?

@cbeauchesne
Copy link
Member Author

cbeauchesne commented Aug 1, 2018

Actually, I thought about this way to do thing. Regardless the fact that modify API is far from possible, it will be much more complicated : service should not be variable dependant, eg it should not filter results by default. So we must add a argument to this service, in order to allow &quality=empty,empty in url.

In my opinion, I think it's damn complicated, for such a specific usage.

@cbeauchesne cbeauchesne merged commit 6ce35c5 into master Aug 1, 2018
@cbeauchesne
Copy link
Member Author

arf je suis allé trop vite... dsl

Si faut rollbacker, dites moi.

@asaunier
Copy link
Member

asaunier commented Aug 5, 2018

@asaunier what do you think?

Well, I guess it does the job (hide the empty outings from the feed except in the user profile one) and it is a quite simple change.
But isn't it a bit a hack? it's a bit a pity to load data that won't be loaded. As you said, it would make more sense to filter on the API side.

A problem we could have on the API side (which made me say it's not that simple to make that kind of filtering): I am not sure the quality attribute is available in the feed_document_changes table, making it easy to filter on that attribute. (edit: it's not) If we add the attribute to the table, we have to make sure it is updated when the actual quality of the document changes. Remember that feed cards are updated when creating the document, associating participants to an outing, uploading images => not when updating the document itself.

But perhaps it is easier than I think. For instance I have just tested on the demo and when I change the activity of an outing, the activity of the card is updated and the card is strip out from the feed if the new activity does not match the user's activities filter. Then perhaps we could use the same system for quality?

I have just created an API issue for this c2corg/v6_api#727 and assigned it to me in case I find time and motivation :P (I have the same difficulties to install the API and data on my laptop than you). Feel free to assign yourself too if you are interested.

@asaunier asaunier deleted the hide-empty-outing-in-feed branch August 5, 2018 10:26
@asaunier
Copy link
Member

asaunier commented Sep 1, 2018

Say a user has created a bunch of empty outings recently. With this approach the home feed will load but all empty docs will be removed, leaving only a few items visible (or maybe none if all are empty) until the user scrolls the feed (if he figures out to do it...).
This doesn't look like a very robust solution 😉

I am working on a change on the API side c2corg/v6_api#728
Unfortunately I have no dev environment to work and test :/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants