energy-data / energydata.info

energydata.info - open data and analytics for a sustainable energy future
http://energydata.info
MIT License
26 stars 6 forks source link

Comments can't be deleted #241

Closed jodiegardiner closed 5 years ago

jodiegardiner commented 6 years ago

@shandaoz

Are you experiencing this when you try to delete ANY comment? Only your own? Only others?

jodiegardiner commented 6 years ago

Well, I think I've gotten to the bottom of it right away. Currently only ckan sysadmins can delete comments. Whereas your account is an Admin of the World Bank Group Organization (not quite the same thing).

So I suppose we need to decide who is permitted to delete comments? Options:

Let me know what you think.

As an aside, we should make sure your account is a sysadmin account as Org Admins should only be able to modify datasets within their own Org and would I be right in saying your responsibilities for the site go beyond that?

shandaoz commented 6 years ago

Yes, I am experiencing this when I am deleting my own comments and the comments you made.

Users should be able to edit and delete comments created by only themselves, and not other users'. The ENERGYDATA team would like to have the ability to delete an inappropriate comment made by regular users.

jodiegardiner commented 6 years ago

We posted at the same time :)

It seems you answered my question without seeing it anyway. I will make it so that sysadmins can delete any and users can delete their own. With the ENERGYDATA team being made sysadmin users.

shandaoz commented 6 years ago

Oh! We did post at the same time!

Thanks! The ENERGYDATA team would like to be made sysadmins users. However, if an user accidentally made a spelling mistake or want to change the content of their comment, they would not be able to delete their own comments? (Since I did not locate an edit option to edit submitted comments)

jodiegardiner commented 6 years ago

Hi @shandaoz

This feature should work now, can you test it please?

I have set it so that sysadmins can delete every comment, and users can delete their own. There is an edit button on any posts which you have created yourself (or all posts if you are a sysadmin).

I have also upgraded your user account to sysadmin status.

You can try creating a new user for the purposes of testing this (as everything is open for you now that you are a sysadmin). I have done so and see the expected behaviour.

I have noticed one or two other issues with the UI so I'll fix those next. Please close this issue once you have tested and are satisfied. I will open another for the other work.

shandaoz commented 6 years ago

Tested @jodiegardiner

I can now delete my own as well as a regular user's comments. However, there are 3 other issues from testing on this dataset: https://energydata.staging.derilinx.com/dataset/afghanistan-wind-speed

  1. Although you don't have to input a subject title when you reply to an existing comment, the title column displays either as "None" or "No Subject". Can these titles be removed? 16

  2. When I want to edit my own replied comment to your comment, I am only allowed to edit yours. Perhaps this is because we are both sysadmins. 14

  3. Comment submission button is missing after 3 comments have been made. Is there are limit to how many comments can be displayed on a dataset page? 17

jodiegardiner commented 6 years ago

Hi Shandao - the original issue and the three extra issues you mention here are now fixed on staging. Please re-test these issues and close the ticket if satisfied.

shandaoz commented 6 years ago

Hi Jodie, thanks for fixing the 3 issues. I have a few more concern over the display of comments. As I created more comments and replies, the dataset page stretches very long and looks inconsistent. It will be difficult for users to reach the comments box at the bottom of the page to submit their own comments. Additionally, it is confusing to identify whom the users are replying to. https://energydata.staging.derilinx.com/dataset/afghanistan-wind-speed#comment_ab994608-1cc3-42e5-b070-473879984f93

Proposal:

  1. When we have a large number of replies for a dataset, can we for example, (choose to) display the first few comments, with a button under the last displayed comment that says "(show) more comments"?

  2. In the case of replies, can the username of whomever an user is replying to be shown either in the title or input box? For example: if I replied to yours, it could show up as "Replying to Jodie". I also noticed that the input boxes gets smaller with the number of replies, and the boxes looks a bit inconsistent with comments and replies. If the username could be shown, then the boxes could all be the same size.

Questions:

  1. When a user is replying to another user's comment, would the owner of the original comment receive a notification either in his mailbox or dashboard, so as to facilitate further conversations? For example: If I was replying to a comment you made, you will receive an notification that I replied.

18

derwas commented 6 years ago

@shandaoz are replies to comments necessary?

shandaoz commented 6 years ago

@derwas @jodiegardiner

  1. No, replies to comments are not necessary, but can the reply option be made available to Sysadmins, so our comments could show up directly below whomever we want to get back to, so that the comment boxes can be kept one level smaller?

  2. I just realized that that the comment box displays the real-name of users. Please have only the username of the users displayed. 111

  3. In the case of a dataset receiving a large number of comments (Such as more than 10. Please refer to my proposal 1 from yesterday), can we for example, (choose to) display the first few comments, with a button under the last displayed comment that says "(show) more comments"? Is this something that can be built by today?

jodiegardiner commented 6 years ago
  1. Only sysadmins can reply now.
  2. Fixed
  3. In progress.
jodiegardiner commented 6 years ago

Another update:

I turned on the email notifications and updated the template I use. If you post a comment now you will receive a notification email to the address you provided yesterday.

shandaoz commented 6 years ago

Great! Once the third point is covered and tested, then we are ready for implementation!

jodiegardiner commented 6 years ago

There is now a show/hide button if there are extra comments. Still working on making it look good.

shandaoz commented 6 years ago
  1. The show/hide button works great! However, the display of the show/hide button looks a bit strange. Could you centralize the "show more" and "hide", and close their word box? (Please refer to the screenshots below)

  2. The username of users who made comments have vanished from the title of the comment boxes.

  3. In the case of a receiving a large number of comments, can we have the ability to move the best 3 comments to the top, so they are shown above all the other comments?

hide show more hide

jodiegardiner commented 6 years ago

Hey,

The show more is properly aligned now and the usernames are back (they were there, they were just the same colour as the background...)

screen shot 2018-09-06 at 11 54 05

The final point is pretty complicated to implement. It's by no means impossible but it is not a quick fix.

We can discuss it today in the meeting.

shandaoz commented 6 years ago
jodiegardiner commented 6 years ago

This was a lot more time consuming than you might think. I had to rip out all the authentication code. CKAN (like most applications) does not want you to be able to write to the database without authentication. But we got there in the end.

shandaoz commented 6 years ago

Great work Jodie! Glad it worked out at the end! (The process sounds very troublesome) Just three small issues that may have gotten reverted.

  1. The Sysadmins cannot reply to user comments.
  2. The Show more and Hide button is not centralized and half of the text box blended into the background again. show more
  3. We used have 3-4 comments at the bottom of dataset page before hiding the rest of the comments. Could we have a consistent number of comments (4) displaying on top of all other comments? feature
jodiegardiner commented 6 years ago
jodiegardiner commented 6 years ago

Show/hide now works properly.

shandaoz commented 6 years ago

Hi Jodie! I noticed that the comments section has been changed according to our last call. It looks good! The ENERGYDATA team has discussed the new look and has one more comment and a issue to report.

Issue: When more than 2 comments are expended, comments other than the first comment are hidden behind the "post comment" box. dddddddddd

Comment: Hide the "post comment" box at the bottom of the dataset page and create a expandable button that reads "post comment" or "leave a comment" next to the total number of comments, so that "comments" and "post comment" expands separately. Therefore, only when visitors click the button will they be able to leave a comment. dddddddddd1

jodiegardiner commented 6 years ago

Hi @shandaoz.

Hope you are well!

The issue and comment have been addressed and you can see the results on staging now.

e.g. https://energydata.staging.derilinx.com/dataset/afghanistan-wind-speed

shandaoz commented 6 years ago

Hey Jodie! I'm well thanks! Hope you are doing great as well :) The results look FANTASTIC, but just one teeny-tiny thing. When "post a comment" is expanded, all the comments are also displayed under the "post a comment" box. Could you remove all the already made comments and just have "post a comment" box when that is expanded? 111111

jodiegardiner commented 6 years ago

We could but I reasoned that if you are interested enough to want to post a comment, then it would make sense to also be able to see the others. Having the user require two clicks, one to see the comments, then one to see the comment form seems like an extra step that could be frustrating/poor UX.

Having said all that, your wish is my command! If you disagree then by all means, I can make that change easily. Just let me know.

shandaoz commented 6 years ago

LOL. I agree with you comment and like how you created the expand comments that users can choose to expand or close them under the post a comment. I will show this to the team and will get back to you on whether we all agree to keep this as it is.

Quick Question: Why is the number of likes now included in the metadata? It looks a bit redundant as we already have the numbers displayed at the top of the page.

jodiegardiner commented 6 years ago

Excellent question! I have removed this now. (Site is rebuilding so you should see this in a few minutes).

shandaoz commented 6 years ago

Great! It's removed now. I will get back to you on the comments :) Our plan is to have all user engagement features on staging rolled out to production once the comment feature is ready to go.

shandaoz commented 5 years ago

We are happy with the comment feature!

jodiegardiner commented 5 years ago

(ᵔᵕᵔ)/

On 22 Oct 2018, at 14:46, shandaoz notifications@github.com wrote:

We are happy with the comment feature!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/energy-data/energydata.info/issues/241#issuecomment-431840446, or mute the thread https://github.com/notifications/unsubscribe-auth/AUX4nfyZYaodOOccU4ES2Y5uw8DKYnXuks5uncxBgaJpZM4WRyTo.