| Summary: | Editor: Load the latest contents when editor get focus. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Editor | Assignee: | Silenio Quarti <Silenio_Quarti> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ken_walker, Mike_Wilson, Silenio_Quarti, simon_kaegi |
| Version: | 0.5 | ||
| Target Milestone: | 3.0 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
libing wang
Problem could still occur if the editor that had focus already contained the file that was changed elsewhere. Can we check timestamps on save to prevent overwrite? Is there anything we could do to recover at that point? (e.g. client side diff of the contents?) (In reply to comment #1) > Can we check timestamps on save to prevent overwrite? Is there anything we > could do to recover at that point? (e.g. client side diff of the contents?) we do check and catch the error/warn user, but if the tab has been sitting there awhile you might even forget what changed. I agree that showing diffs at that point would be helpful. (In reply to comment #2) > (In reply to comment #1) > > > Can we check timestamps on save to prevent overwrite? Is there anything we > > could do to recover at that point? (e.g. client side diff of the contents?) > > we do check and catch the error/warn user, but if the tab has been sitting > there awhile you might even forget what changed. I agree that showing diffs > at that point would be helpful. Right, the "out of sync" message tells that we are checking the time stamps. Introducing a two-pane compare widget is worthwhile. But we then need a "comparing state" in the editor page. Opening a compare page will be hard because the current contents of the file is hard to be part of the compare URL unless we are doing local storage magic. This is fixed in latest. There are too many commits to list here. The feature is disabled by default. It can be enabled in the "Editor Settings" page (see bug#369885 for auto-save settings as well). Current behavior: when the editor gets focus, if the contents is out of sync and the editor is not dirty, the latest content is loaded. If the editor is dirty, a confirmation dialog is shown that lets the user decide whether to reload the latest content or not. If yes, the local changes are lost. We could improve this by showing a compare editor. If the user says no, the confirmation dialog will not show anymore until the editor is saved again in another page. |