Closed
Bug 1117105
Opened 9 years ago
Closed 9 years ago
Better AJAX save feedback on editing Survey questions
Categories
(Webtools Graveyard :: Air Mozilla, defect, P3)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: peterbe, Unassigned)
References
Details
Attachments
(1 file)
11.90 KB,
image/png
|
Details |
When you edit a question that belongs to a survey you type in a textarea box and then press the "Save" button belonging to textarea. There's no feedback that it's in the progress of saving or that it has saved.
Reporter | ||
Comment 1•9 years ago
|
||
Also, note that the textarea gets updated after an AJAX save, so just after starting the AJAX request we should lock the textarea too. https://github.com/mozilla/airmozilla/blob/b704e6225ffe4384600a44707c0034cd79342123/airmozilla/manage/static/manage/js/survey-edit.js#L45
Reporter | ||
Comment 2•9 years ago
|
||
A simply solution would be something like:: $('button.btn-primary span').text('Saving...'); $.post(form.attr('action'), data) .then(function(response) { if (response.error) { alert('Unable to save. Error: ' + response.error); } else { textarea.val(response.question); $('button.btn-primary span').text('Saved'); setTimeout(function() { $('button.btn-primary span').text('Save'); }, 2 * 1000); } }).fail(function() { console.warn(arguments); alert('Unable to complete the save right now.'); });
Reporter | ||
Comment 3•9 years ago
|
||
Anurag? Something you would be interested in?
Comment 4•9 years ago
|
||
Sure. I was wondering, if instead of using an alert message we could produce an in page error message, on the lines of this attachment?
Attachment #8543997 -
Flags: feedback?(peterbe)
Comment 5•9 years ago
|
||
As in with the same alert error message, just in this form.
Reporter | ||
Comment 6•9 years ago
|
||
Comment on attachment 8543997 [details]
Screen Shot 2015-01-05 at 7.58.44 PM.png
I would say, let's not worry about the alert() right now. I really don't like alert() dialogs but it's fine. That code is only there if something desperately rare goes wrong. Which 99% of the time it won't.
Also, this particular bug is just about the feedback on the UI when saving. So if we wanted to work on the error message we can do that in another bug. I think it's a lower priority.
Attachment #8543997 -
Flags: feedback?(peterbe)
Updated•9 years ago
|
Priority: -- → P1
Reporter | ||
Updated•9 years ago
|
Priority: P1 → P3
Comment 7•9 years ago
|
||
Surveys seem to be used quite infrequently.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Updated•3 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•