Bug 720853 - Backlog: implicit save (save on exit)
Summary: Backlog: implicit save (save on exit)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-UI
Version: 1.3
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Sprint-25
: 1.4.2
Assignee: Alex Eng
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Depends On: 728858 733581 739427
Blocks: Zanata-1.4.2
TreeView+ depends on / blocked
 
Reported: 2011-07-13 01:14 UTC by Ding-Yi Chen
Modified: 2011-10-28 07:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-10-28 07:02:46 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 733581 0 medium CLOSED Translation Editor: Clicking on search field should save the unsave content. 2021-02-22 00:41:40 UTC

Internal Links: 733581

Description Ding-Yi Chen 2011-07-13 01:14:14 UTC
Description of problem:
The content in translation editor cell should be saved when:
1) Move to other cells by either keyboard short cut or mouse click.
2) Click on fuzzy
3) Close browser tab
4) Perhaps browser tab lost focus?

Version-Release number of selected component (if applicable):
1.4-SNAPSHOT

Comment 1 James Ni 2011-07-14 03:39:19 UTC
2) Click on fuzzy

I think this is a bit of tricky, since we move the fuzzy button to the middle column, so if translation editor is opened and we click fuzzy button, definitely we don't want implicit save and close the editor, we need to active "Save" button. 

In other circumstance, if the translation editor is closed and we click fuzzy button, maybe we could save the content to database directly, or we ask user to open editor to click the save button? I think maybe we can discuss it when Sean back.

3) Close browser tab

I prefer not to save just abandon the content of editing.

4) browser tab lost focus

I try it on firefox 3.6.17, if i switch to other tabs in FireFox and switch back, the translation editor still open, so i guess we don't need to save?

Comment 2 James Ni 2011-07-14 03:41:48 UTC
2) Click on fuzzy

I think this is a bit of tricky, since we move the fuzzy button to the middle column, so if translation editor is opened and we click fuzzy button, definitely we don't want implicit save and close the editor, we need to active "Save" button. 

In other circumstance, if the translation editor is closed and we click fuzzy button, maybe we could save the content to database directly, or we ask user to open editor to click the save button? I think maybe we can discuss it when Sean back.

3) Close browser tab

I prefer not to save just abandon the content of editing.

4) browser tab lost focus

I try it on firefox 3.6.17, if i switch to other tabs in FireFox and switch back, the translation editor still open, so i guess we don't need to save?

Comment 3 Sean Flanigan 2011-07-26 07:47:23 UTC
2) should be more intuitive when we replace Fuzzy with Approved.  If the user is editing and clicks Approved, we close the editor, perform the implicit save and mark as approved (or not approved).  As long as the end result is that the message gets saved and the change to the Approved flag is saved too, it's fine.

3) well, it would be better to perform the implicit save if we can detect the browser close event easily, but if not it doesn't matter too much, since we provide an explicit save button.

4) if the browser is not generating an event for tab switching, then I don't think we need implicit save to happen.

Comment 4 Sean Flanigan 2011-08-12 01:10:16 UTC
Is this ready for testing?

Comment 5 James Ni 2011-08-12 01:40:08 UTC
Yes, the implicit save is performed:

1) Move to other cells by either keyboard short cut or mouse click, if content is changed, we do the implicit save and save as approved.  
2) Click on 'Save as Fuzzy', it will save as fuzzy and change the colour of vertical bar.  
3) Click source cell of table, it will also do the implicit save.

Comment 6 Ding-Yi Chen 2011-09-01 07:23:37 UTC
Test Objective:
1. If user update the cell with new text
 a. Ensure it is "Save as Approved", regardless its previous approve status.
 b. Ensure "Cancel" will revert the changes.

2. If user clear the cell
  a. Ensure it is clear as "New"
  b. Ensure "Cancel" will revert the changes.

3. Unchanged does not trigger the save.

Subjects:
Mouse clicks:
 Click on current cell
 Click on other cell
 Change to previous page/next page
 Click on link that leave the translation editor

Relevant Keyboard short cuts:
Alt+J and Alt-Up: Prev cell
Alt+K and Alt-Down: Next Cell
Alt+PgUp: Prev fuzzy/untranslated
Alt+PgDn: Next fuzzy/untranslated

Precondition: 
Row 1: Empty
Row 2: NeedReview, with text "hi"
Row 3: Approved, with text "hi"
Row 4: Empty
Row 5: NeedReview, with text "hi"
Row 6: Approved, with text "hi"
Row 7: Empty
Row 8: NeedReview, with text "hi"
Row 9: Approved, with text "hi"
Row 10: Empty
Row 11: NeedReview, with text "hi"
Row 12: Approved, with text "hi"
Row 13: Empty
Row 14: NeedReview, with text "hi"
Row 15: Approved, with text "hi"
Row 16: Empty
Row 17: NeedReview, with text "hi"
Row 18: Approved, with text "hi"

Test Cases:
1. Click on 1st row, then press Alt-k all the way down.
2. Press Alt-J all the way up.
3. Press Alt-Down all the way down
4. Press Alt-Up all the way up
5. Press Alt-PgDn all the way down
6. Press Alt-PgUn all the way up

7. On row 1, type "yo1", press Alt-k,
8. On row 2, type "yo1", press Alt-k,
9. On row 3, type "yo1", press Alt-k
10. On row 4, type "yo1", press Alt-Down
11. On row 5, type "yo1", press Alt-Down
12. On row 6, type "yo1", press Alt-Down
13. On row 7, type "yo1", click on the "Next entry" button

14. On row 12, type "yo2", press Alt-Up
15. On row 11, type "yo2", press Alt-Up
16. On row 10, type "yo2", press Alt-Up
17. On row  9, type "yo2", press Alt-j
18. On row  8, type "yo2", press Alt-j
19. On row  7, type "yo2", press Alt-j
20. On row 7, type "yo1", click on the "Prev entry" button

21. On row 6, type "yo3", press Alt-PgDn
22. On row 13, type "yo3", press Alt-PgDn
23. On row 14, type "yo3", press Alt-PgDn
24. On row 15, type "yo3", click on the "Next Fuzzy entry" button

25. On row 18, type "yo3", press Alt-PgUp
26. On row 17, type "yo3", press Alt-PgUp
27. On row 16, type "yo3", press Alt-PgUp
28. On row 15, type "yo3", click on the "Prev Fuzzy entry" button

29. On row 10, clear the cell, press Alt-Down
30. On row 11, clear the cell, press Alt-K

31. On row  8, clear the cell, press Alt-Up
32. On row  7, clear the cell, press Alt-J

33. On row 13, clear the cell, press Alt-PgDn
34. On row 16, clear the cell, press Alt-PgUp

35. On row 19, type "yo4", click on row 1
36. On row 1, type "yo4", click on row 3
37. On row 4, type "yo4", click on "next page"
38. On page 2, row 1, type "yo4", click on "prev page"

Comment 7 Ding-Yi Chen 2011-09-07 05:11:16 UTC
Failed tests:

1. Unsaved translation is lost when receiving prev/next fuzzy/untranslated events (by keyboard shortcut alt-PgUp, alt-PgDn, prev fuzzy/untranslated button, next fuzzy/untranslated button)

2. Unsaved translation is lost when user change page, which might be triggered by:
 a. Clicking on previous/next page button;
 b. Clicking on first/last page button;
 c. Pressing the alt-down on last entry of a page.
 d. Pressing the alt-up on first entry of a page.

Comment 8 Sean Flanigan 2011-09-07 06:10:39 UTC
See also bug

Comment 9 Alex Eng 2011-09-19 01:47:41 UTC
Problem resolved. 
Refer to https://bugzilla.redhat.com/show_bug.cgi?id=739422 for outstanding issue.

Comment 10 Sean Flanigan 2011-10-13 07:15:29 UTC
I think this is finished, with the exception of failed test #2, which is now bug 739422.  

Dean, what the situation with failed test #1, in comment 7?

Comment 11 Ding-Yi Chen 2011-10-17 02:56:05 UTC
VERIFIED with Zanata version 1.4.2-SNAPSHOT (20111014-1658).


Note You need to log in before you can comment on or make changes to this bug.