Opened 10 years ago

Closed 7 years ago

#868 closed defect (fixed)

don't reload media page, use more ajax

Reported by: davidak Owned by:
Priority: minor Milestone:
Component: programming Keywords:
Cc: Parent Tickets:

Description

i noticed this issue when i listened to a cool song, send a comment and the song stops playing because the page is reloaded.
the same problem when you watch a video.

this should be solved with the use of ajax for commenting, add to collection, on page edit of title, description etc like flickr or youtube.

Attachments (2)

issue_868.patch (10.7 KB ) - added by Vijeth 7 years ago.
AJAX for posting comments
issue_868_rev.patch (4.9 KB ) - added by Vijeth 7 years ago.
Revised patch for graceful degradation when JS is disabled

Download all attachments as: .zip

Change History (6)

comment:1 by Aleksej, 10 years ago

Confirmed: you can open the comment editing field and write a comment w/o reloading the page, but sending the comment then reloads the page.

by Vijeth, 7 years ago

Attachment: issue_868.patch added

AJAX for posting comments

comment:2 by Vijeth, 7 years ago

Status: newreview

Hi,

I noticed that this is actually a major problem, since the media being played should not be stopped. I have added a patch file and drive link to a video to verify the fixes.

I have done code refactoring multiple times to make sure everything works as efficiently as possible, and there is no redundant code as such. So, it would be great if you guys looked into the design principles, and the AJAX code.

Drive Link : https://drive.google.com/open?id=0B3fdAW29sV-LMUg5VHJGZG5BUWc

Thanks,
Vijeth

Last edited 7 years ago by Vijeth (previous) (diff)

comment:3 by Vijeth, 7 years ago

I have added the AJAX part with graceful degradation so that users with JS disabled can comment like before (with page reloading).

Added a revised patch file and a new drive link to the video which verifies the fix

Drive link : https://drive.google.com/open?id=0B3fdAW29sV-LRXVEN3h0LU4ySlE

Thanks,
Vijeth

by Vijeth, 7 years ago

Attachment: issue_868_rev.patch added

Revised patch for graceful degradation when JS is disabled

comment:4 by Boris Bobrov, 7 years ago

Resolution: fixed
Status: reviewclosed

Thank you, Vijeth. I have tried the patch out and it works good. I am going to merge it. I am also adding you to "AUTHORS" as Vijeth Aradhya, please ping me in irc if i should change that :)

However, there one more thing that needs to be done is error reporting. Now it is just logged to console:

+                error: function(error) {
+                    console.log(error);
+                }

However, it would be good if a message was posted to the user with a red background. I am going to open a new bugreport now about it with low priority.

Note: See TracTickets for help on using tickets.