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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix "No activity" message in Last Activities isn't shown sometimes #10385
Conversation
Even though you can go forward with this, it's not a good solution. First off, you need to look over the cell uses to check whether the controller implements the announcement or not (for instance, I realized this bug because the controller did it but displayed nothing afterwards). The bad approach here is the fact of having an "activities" (plural) cell. That's something it should be handled by the element (controller) who actually instantiates the activity (singular) cell. But let's say that's ok and we need the plural cell, then, what's wrong done in the cell logic is that Or you have a very complex component, with ability to hide/show items, render announcements, paginators, results_per_page components, etc... or you keep atomic components, and you use them as small pills wherever you want to do it (in the controllers) |
I think this "activities" cell, is not really needed in the way is being used. |
I have searched in the application for any usage of the activity cell, and i have found several places. and i think the UserTimelineCell is not being used. Also, considering the data aggregation, that is required in order to determine whether a resource needs or does not need to be displayed, I think the fix is not so easy. In order to implement any viable pagination to this we would need to add an additional parameter, like "last Id" to store the last displayed activity id, so that we could manually the pagination, by injecting to the query a "where id < $lastID", then hydrate and construct the needed params for the next page. I see few possible solutions:
|
0f0bb75
to
efd7900
Compare
FYI, I've removed the unused section in the template |
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.
I tried it locally and it works on my machine.
I have a couple suggestions, and also some doubts regarding the history of this PR. I don't know if all the doubts commented by @Crashillo were actually taken into account, as the git commit history isn't visible, with that many push forces. Can you chime in @Crashillo? Are you happy with the current approach?
Reviewing the code, @andreslucena, I think this a better approach since you have move that filtering logic to the query layer (that's separation of concerns 馃憤) In that way, the cell will receive and display the same amount of items, that was the purpose. Nice! |
@andreslucena now the PR seems to be ready now :) |
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.
LGTM 馃憤馃徑
馃帺 What? Why?
As per #10384 has been described that participatory spaces do not display any activity cards, nor the message there are no activities.
This Pr fixes this.
馃搶 Related Issues
Link your PR to an issue
Testing