Skip to content
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

added hoverable list in feeds section #120

Merged
merged 5 commits into from
Feb 14, 2018

Conversation

chetanya-shrimali
Copy link
Contributor

Added list to feeds section showing list of likers on hover as addressed in issue #21

@chetanya-shrimali
Copy link
Contributor Author

please review @sebastian-code!!

@sebastian-code
Copy link
Collaborator

Thanks @chetanya-shrimali for the PR, please, change line 64 in .gitignore file to something more generic, to keep out the idea files and folder outside the git control.

@sebastian-code
Copy link
Collaborator

Hi @chetanya-shrimali after some testing I found than the code has the following bugs:

  1. Hovering the cursor over the like button, only shows your name, no matter how many users liked the feed post.
  2. Hovering the cursor only shows the likers list when the logged in user liked that feed post.
  3. The functionality doesn't works in realtime; when you like a feed post, you need to reload the page to show you the list of likers, but still shows you only your name, as stated in the first error.

Please fix it.

@chetanya-shrimali
Copy link
Contributor Author

Okk!! I'll fix it! But please tell me more about 2nd point. Also when i tried logging in with 2 different accounts. It gave me both the users who liked. Still i try to figure it out. Also do we have a gitter channel for bootcamp?

@sebastian-code
Copy link
Collaborator

To answer your question on the 2nd point, the functionality only works if the user has liked that feed post previously, if the user is still able to like the feed post, the functionality doesn't work.

@NothingxFluctuation
Copy link

Sebastian-code I want to add admin feature in this website so I can supervise the content and feeds posted by users, but I'm getting an error and unable to do it in conventional way (setting admin in url and settings) what should I do?/

@chetanya-shrimali
Copy link
Contributor Author

Hey, @sebastian-code I was recently working on the pr and how do you think we should solve the refresh in real-time issue. shall we use Knockout js?

@sebastian-code
Copy link
Collaborator

I personally dislike to add libraries when the project is only going to use it only once, and just for that small activity. Bootcamp relies a lot on AJAX calls to update this kind of information, isn't that enough?

The other thing is than I'm planning to incorporate WebSockets (maybe with django-channels... someday... hopefully) which in turn deprecates AJAX and many other libraries, and I want to avoid unnecessary efforts to achieve this migration.

@chetanya-shrimali
Copy link
Contributor Author

Yaa, that's true @sebastian-code. AJAX would do the task.

@chetanya-shrimali
Copy link
Contributor Author

I'll use setInterval() function.

solved the issue regarding 1 and 2 point addressed above.
Updated the bootstrap, jquery scripts to latest version.
@sebastian-code
Copy link
Collaborator

sebastian-code commented Oct 4, 2017

Hi @chetanya-shrimali this is great, now the problems 1 and 2 are solved, thanks for that; at this point only the third error persists.

When you like a feed post, the list doesn't updates for none of the logged in users, and all of them need to reload the page to be able to see the list of users who liked that feed post.

Additionally, If you unlike a feed post, the hoverable list will keep showing the logged in user who unliked the feed post, unless you reload the page.

@chetanya-shrimali
Copy link
Contributor Author

Yaa, @sebastian-code only problem that persists is the update in real-time. I was getting an error on AJAX calls regarding the url.

@sebastian-code
Copy link
Collaborator

Have you considered using a new AJAX view to answer that call?

@sebastian-code
Copy link
Collaborator

Hi @NothingxFluctuation

Please remember than that request is not related to this topic, being this a discussion about a PR to the project. What you are asking is related to support.

To answer your question, that happens because when DEBUG = True, the development server from django handles that, but when changed, you require a production deployment setup, using a WSGI server and a proper web server.

For more information I recommend to you to look into the documentation

@chetanya-shrimali
Copy link
Contributor Author

@sebastian-code can you please elaborate!!

@sebastian-code
Copy link
Collaborator

A single view that returns a JSON object just with the desired information to update the components of the DOM.

@sebastian-code sebastian-code merged commit bbcfc4b into vitorfs:develop Feb 14, 2018
sebastian-code added a commit that referenced this pull request Feb 14, 2018
…olves #21 and checks a pending item in #66. Still work to do, but is a nice feature.
sebastian-code added a commit that referenced this pull request Jul 4, 2018
…olves #21 and checks a pending item in #66. Still work to do, but is a nice feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants